eCMRhub.docs
API referenceApprovals

Reject (a person only)

POST
/functions/v1/approvals/{approvalId}/reject

A person of the company rejects the call. Connections, API keys and the assistant are refused.

Authorization

apikeybearerAuth
headerapikey<token>
headerAuthorizationBearer <JWT>

Path Parameters

approvalId*string
Formatuuid

Response Body

Success

application/json
  1. response
id*string
Formatuuid
operation*string
status*string
Value in"pending""approved""rejected""consumed""expired"
requestedBy*
summary*|null
input*
url*string
createdAt*string
Formatdate-time
decidedAt*|null
decidedBy*string|null
expiresAt*string
Formatdate-time
Example Request
curl -X POST 'https://api-ecmr-dev.lucaspiera.com/functions/v1/approvals/497f6eca-6276-4993-bfeb-53cbbbba6f08/reject'
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"}