Approval
Checks the approval for given resource
In case of any validation problems, the below errorCodes
can be returned:
APPROVAL-400011: Requested user is not assigned to any company
Required scopes
approval.approval_read_own
Authorizations
Path parameters
tenantstring · min: 3 · max: 16RequiredPattern:
Your Emporix tenant's name. Note: The tenant name should always be written in lowercase.
^[a-z][a-z0-9]+$
Body
resourceTypestring · enumRequiredPossible values:
Base schema for an approval resource type
resourceIdstringRequired
An identifier of the resource for approval
actionstring · enumRequiredPossible values:
Base schema for an approval action type
Responses
200
Approval permitted response
application/json
Responseall of
Base schema for approval permitted response
400
Bad request due to validation, incorrect parameters, etc.
application/json
401
Unauthorized
application/json
403
Access forbidden. The caller is not allowed to access this resource.
application/json
post
POST /approval/{tenant}/approval/permitted HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 65
{
"resourceId": "cartId",
"resourceType": "CART",
"action": "CHECKOUT"
}
{
"status": "APPROVED",
"action": "CHECKOUT",
"permitted": true,
"approvalId": "64ef8d12b6385140afea1603"
}
Was this helpful?