API referenceApprovals
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.
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 GET 'https://api-ecmr-dev.lucaspiera.com/functions/v1/approvals/497f6eca-6276-4993-bfeb-53cbbbba6f08'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"}