Get a list of reason codes for each action
This endpoint in Tango API allows you to return a list of reason codes that can be used with asynchronous order operations. These codes typically describe why an action occurred, such as updates, cancellations, failures, or other order-processing events. For reason codes used with individual line item actions, see Get all reason codes.
Endpoint
Use the following endpoint to retrieve the available reason codes for asynchronous order actions:
| Endpoint | Purpose |
|---|---|
GET {URI} /asyncOrders/reasonCodes | Retrieve reason codes for each supported action. |
Use case
Acme Health needs to cancel an asynchronous reward order submitted in error. Before sending the cancellation request, Acme calls GET {URI}/asyncOrders/reasonCodes to retrieve the available reason codes and their descriptions. Acme selects an appropriate code from the CANCEL group to use with the cancellation action.
Examples
Here's is a successful response. The response contains a reasonCodes object that groups available reason codes by action, such as FREEZE, UNFREEZE, or CANCEL. Within each group, each key is a reason code and its value is the description. Select a code from the group that matches the action you want to perform.
{
"reasonCodes": {
"additionalProp": {
"additionalProp": "string"
}
}
}
Response
Response
The possible response codes for this endpoint are as follows. For details, see i18nkey codes and their error messages:
| Response code | Meaning |
|---|---|
| 200 | The request was successful. |
| 400 | The server could not understand the request due to invalid syntax. |
| 401 | Authentication is required and has either not been provided or failed. |
| 500 | Something went wrong on the server, but the server cannot be more specific about the exact problem. |
Updated 3 days ago
