Create async orders
This endpoint enables you to create asynchronous orders for distributing rewards under a specific account. It's designed for multiple line items, where you need to send rewards to recipients with various delivery methods. The asynchronous orders are efficient and suitable for large-scale reward campaigns.
Use the following endpoint to create a batch of asynchronous orders:
| Endpoint | Purpose |
|---|---|
POST {URI}/asyncOrders | Create a batch of reward orders that will be processed asynchronously. |
Use case
Acme Corp runs quarterly employee recognition and customer loyalty programs. Each cycle, they distribute hundreds of digital and physical rewards to recipients across different regions and departments. They use async order placement with this endpoint to submit reward orders with multiple line items in a single request. They can track delivery status via the GET /asyncOrders endpoints without exposing reward credentials while customizing delivery methods per recipient (email, SMS, physical mail). They can receive webhook notifications when orders are completed.
The following body parameters are used with this endpoint:
Body params | Data type | Requirement | Description |
|---|---|---|---|
externalRefID | string | required | An idempotent field that can be used for your order cross-reference and to prevent accidental order duplication. This value is returned in the order response, order details, and order history. The string has a maximum of 100 alphanumeric characters. |
customerIdentifier | string | required | Specify the customer associated with the order. Must be the customer that the |
accountIdentifier | string | required | Specify the account from which this order will be deducted. The string must be 5-100 characters long. |
sender | object | optional | Use to set the sender’s name and email address if they differ from the default platform setting. The sender overrides the default platform sender settings. |
-firstName | string | optional | Always optional, string, 100 characters max |
-lastName | string | optional | Always optional, string, 100 characters max |
string | optional | Always optional, string | |
campaign | string | optional | Campaign that may be used to group orders under a particular campaign. The maximum length is 1024 characters, including special characters such as @, #, %, etc. |
purchaseOrderNumber | string | optional | Associates a purchase order number with the order. The string may have up to 100 characters. |
notes | string | optional | Additional order-level notes. The string may have up to 150 characters. |
lineItems | array | required | Contains the order details, including recipient, reward, and delivery method. At least one line item is required. |
-externalRefLineItemID | string | required | Idempotent field that can be used for client-side order line item cross reference and used to map failed and success line items on client side. The string may have up to 150 characters. |
-recipient | object | required | Required if Per new validation rules:
|
-firstName | string | required if | Required if |
-lastName | string | required if | Required if |
string | required if | Required if | |
-mobileNumber | string | required if | Required if
|
-address | object | required if | Required if
|
-companyName | string | optional | Optional, Typically used when shipping to a corporate address. |
-streetLine1 | string | required if | Required if |
-streetLine2 | string | optional if | Optional if |
-city | string | required if | Required if |
-stateOrProvince | string | required if | Required if |
-postalCode | string | required if | Required if |
-country | string | required if | Required if |
utid | string | required | The unique identifier for the reward you are sending, as provided in the Get Catalog call. |
amount | number | required | Specify the face value of the reward. Always needed, including for fixed value items. |
deliveryMethod | string | required | Specify the
|
deliveryDate | date | optional | Specify the date to deliver the reward to the recipient. It must be at least 7 days in the future. If not specified, the reward will be immediately send. |
etid | string | optional | Used with |
ptid | string | required if | Printed Reward Link Template identifier is used only for Printed Reward Links. It's provided in the Tango Portal on the Printed Template page. |
expirationDate | datetime | optional | The expiration date for Promo Links. Sets the exact calendar date the Promo Link will expire, following the ISO 8601 format. See Promo Link acceptance criteria. |
emailSubject | string | optional | If not specified, a default email subject will be used for the specified reward. |
message | string | optional | Gift message. The string may have up to 1024 characters. |
lineItemNote | string | optional | Optional line item notes (up to 150 characters) |
(🚧coming soon) shippingMethod | string | optional | It is used to specify how a reward should be shipped to the recipient. |
(🚧coming soon) phyiscalMethod | string | optional | Is used to specify the reward physical delivery. |
*See the description for more information.
External reference ID
To prevent duplicate order submissions, added validation logic to the POST {URI}/asyncOrders endpoint to detect and block duplicate externalRefIDs . If the externalRefID was previously used in POST {URI}/Orders, the request fails with a descriptive error message. If the externalRefID was previously used in POST {URI}/asyncOrders , the endpoint returns the status of the existing order.
The following example illustrates the payload for using this endpoint and its parameters.
{
"externalRefID": "string",
"status": "string",
"totalLineItems": 0,
"createdAt": "2025-10-23T21:52:43.041Z",
"failedLineItems": [
{
"lineItemId": "string",
"externalRefLineItemID": "string",
"utid": "string",
"errors": [
{
"field": "string",
"errorCodeValue": 0,
"errorCodeName": "string",
"message": "string"
}
]
}
],
"duplicateLineItemRefIds": {
"additionalProp": 0
}
}Here is the successful response example:
{
"externalRefID": "ORDER-2025-001",
"order": {
"externalRefID": "ORDER-2025-001",
"status": "pending",
"totalLineItems": "2",
"created_at": "2025-05-07T10:00:00Z"
}
}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. |
| 201 | A new resource has been successfully created in response to the request. |
| 400 | The server could not understand the request due to invalid syntax. |
| 401 | Authentication is required and has either not been provided or failed. |
| 402 | There are insufficient funds. |
| 403 | The server understood the request but refused to authorize it. |
| 422 | The server understands the request but cannot process it due to semantic errors. |
| 429 | Exceeded the allowable TPS rate limit. It indicates that the user has sent too many requests within a given time frame, and the server is rate-limiting further requests. |
| 500 | An error occurred on the server, but the server cannot provide a more specific description of the exact problem. |
| 503 | The server is currently unable to handle the request due to temporary overload or maintenance. |
Updated 1 day ago
