API referenceApprovals
Approve (a person only)
POST
A person of the company approves the call. Connections, API keys and the assistant are refused.
apikeybearerAuthheader
apikey<token>header
AuthorizationBearer <JWT>approvalId*stringFormat
uuidSuccess
application/json- response
id*stringFormat
uuidoperation*stringstatus*stringValue in
"pending""approved""rejected""consumed""expired"requestedBy*summary*|nullinput*url*stringcreatedAt*stringFormat
date-timedecidedAt*|nulldecidedBy*string|nullexpiresAt*stringFormat
date-timecurl -X POST 'https://api-ecmr-dev.lucaspiera.com/functions/v1/approvals/497f6eca-6276-4993-bfeb-53cbbbba6f08/approve'Example Response
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "operation": "string", "status": "pending", "requestedBy": { "connectionId": "84b500d7-71c8-4b1f-adf4-f1eb0000973d", "name": "string" }, "summary": { "subject": "string", "action": "string", "items": [ { "id": "string" } ], "batch": { "total": 0 }, "includesSave": true }, "input": { "property1": null, "property2": null }, "url": "string", "createdAt": "2019-08-24T14:15:22Z", "decidedAt": "2019-08-24T14:15:22Z", "decidedBy": "string", "expiresAt": "2019-08-24T14:15:22Z"}API reference
The Hub HTTP API from its OpenAPI contract. Base URL, headers, conventions, and one page per endpoint.
Read an approval GET
One approval with its status (pending, approved, rejected, consumed, expired). Poll it after 428 APPROVAL_REQUIRED, then repeat the call with the x-ecmr-approval header.