/cart/complete-order/{processId}
Description
The Complete Order Status API endpoint returns the state of an order as received by the /cart/complete-order
call. This endpoint is needed when the response to the /cart/complete-order
has a status
of PENDING
, and no asyncCallbackUrl
was provided for the system to inform the caller of a status
change. Calling this endpoint will provide an update.
Supported Methods
- GET
Supported Media Types
Request
- application/json
Response
- application/json
Request
/cart/complete-order/{processId}
HEADERS
RCO | Multitude | Key | Type | Description |
---|---|---|---|---|
R | 1 | User-Agent | String | An identifying string in Product/Version format, where Version is a SemVer-compliant string, that uniquely identifies your application. |
R | 1 | Authorization | String | It's required to use the "Bearer" authentication scheme to transmit the access token. |
R | 1 | Accept | String | The only supported response type for this endpoint is application/json. |
O | 0-1 | Accept-Encoding | String | gzip compression is supported. |
R | 1 | Content-Type | String | PThe only supported request type for this endpoint is application/json. |
R | 1 | PAC-Application-ID | String | The application identifier for which API access has been authorized; this value is typically expressed in reverse domain notation and is bound to an API key provided by Paciolan during provisioning. |
R | 1 | PAC-API-Key | String | The API key provided by Paciolan for this application. |
R | 1 | PAC-Channel-Code | String | The channel partner identifier issued to your organization by the Paciolan Partner Services team partner on-boarding. |
R | 1 | Request-ID | String | The integrator's external request ID for support traceablility and issue debugging. This string should be a UUID V4 value. |
Response
HEADERS
Property | Type | Description |
---|---|---|
Request-ID | String | The same ID provided in the header of the request call returned back. |
Content-Type | String | Supported type is application/json. |
Response Object
At a minimum, the following two properties will be returned in the response if the status
is PENDING
.
Property | Type | Description |
---|---|---|
processId | String | A unique ID for the request that is/has executed. |
status | Enum ["PENDING", "COMPLETE", "ERROR"] | The status of the order. A status of "PENDING" will require a followup polling call to this /complete-order/{processId} if no asyncCallbackUrl was provided in the request of the /complete-order . |
A full response will be provided if the status
returned is set as COMPLETE
. See the Complete Order Response Object.
Error Response Object
Property | Type | Description |
---|---|---|
error | Object | Error details |
→ type | String | Error type that has occurred |
→ appErrorCode | String | Internal error code used for support. Depending on type returned, this code may be needed to handle error response differently |
→ developerMessage | String | Generic description of error that occured |
Error Types
Error Type | Error Desc | App Error Code | HTTP Status Code | HTTP Status Desc | Retry Possible | Retry Count | Ultimate action | MS Error Level |
---|---|---|---|---|---|---|---|---|
AUTHORIZATION_FAILURE | Missing required headers (PAC-Channel-Code, PAC-Application-ID, or PAC-Organization-ID) | MS-401 | 401 | Unauthorized | No | 0 | Caller to analyze | ERROR |
INVALID_CHANNEL_CONFIG | ||||||||
INVALID_PARAMETER_VALUE | ||||||||
JSON_PARSE_ERROR | ||||||||
UNAUTHORIZED_REQUEST | A PAC-Organization-ID provided that does not have the correct access controls set up | MS-403 | 403 | Forbidden | No | 0 | Caller to analyze | ERROR |
UNHANDLED_EXCEPTION | A call made where the API can't properly connect/read the internal channel configuration | MS-500 | 500 | Internal Server Error | Yes | 3 | Caller to inform Provider | FATAL |
ORDER_NOT_FOUND | An order for the processId provided was not found | MS-404 | 404 | Not Found | No | 0 | Caller to analyze | ERROR |
Examples
Request
curl 'https://link-sandbox.paciolan.info/v1/cart/complete-order/123456' \
-H 'User-Agent: MyApplication/1.0' \
-H 'Authorization: Bearer <BearerToken>'
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'PAC-Application-ID: com.mycompany.myapp' \
-H 'PAC-API-Key: <ApiKey>' \
-H 'PAC-Channel-Code: my-application' \
-H 'Request-ID: <RequestID>'
Responses
Status COMPLETE (Success) Response
See the Complete Order success response example.
Status PENDING Response
{
"processId": "d4e5f6",
"status": "PENDING"
}
Status ERROR Response
{
"processId": "d4e5f6",
"status": "ERROR",
"error": {
"type": "ORDER_ALREADY_COMPLETED",
"developerMessage": "The order has already been completed and cannot be completed again.",
"appErrorCode": "MS-409"
}
}
Order Not Found
{
"error": {
"type": "ORDER_NOT_FOUND",
"appErrorCode": "MS-404",
"developerMessage": "Order with processId={123456} not found"
}
}