Approval
Checks the approval for given resource. The endpoint verifies whether a user is authorized to perform a specific action on a given resource within a tenant. The user must be a Requestor or an Approver to have the required approval.approval_read_own scope.
In case of any validation problems, the below errorCodes can be returned:
APPROVAL-400011: Requested user is not assigned to any company
To generate a customer access token, go to the Logging in a customer endpoint.
Your Emporix tenant name. Note: The tenant name should always be written in lowercase.
^[a-z][a-z0-9]+$Type of resource under approval.
An identifier of the resource for approval.
Base schema for an approval action type.
Approval permitted response.
Base schema for approval permitted response.
Base schema for an approval action type.
Base schema for the approval status.
Indicates if the operation is permitted.
Identifier of the approval.
Bad request due to validation, incorrect parameters, etc.
Unauthorized.
Access forbidden. The caller is not allowed to access this resource.
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"
}Last updated
Was this helpful?

