API referenceApprovals
List approvals
GET
Approvals newest first, optionally by status. A person sees the whole company's; an OAuth connection or an API key sees only its own.
apikeybearerAuthheader
apikey<token>header
AuthorizationBearer <JWT>status?stringValue in
"pending""approved""rejected""consumed""expired"Success
application/json- response
items*array<>curl -X GET 'https://api-ecmr-dev.lucaspiera.com/functions/v1/approvals'Example Response
{ "items": [ { "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" } ]}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.
Reject (a person only) POST
A person of the company rejects the call. Connections, API keys and the assistant are refused.