Update async orders

Update an Async order under a specific Account


This endpoint in the Tango API allows you to update an asynchronous order. Use this endpoint to update only non‑fulfillment fields such as: campaign, purchase order number, and notes. You can correct or enhance information associated with the order for internal tracking, reporting, PO reconciliation, or program categorization, but not the reward amount, recipients, reward credentials, etc.

Use the following endpoint to update async orders placed under your platform:

EndpointPurpose
PATCH {URI}/asyncOrders/customers/{customerIdentifier}/ accounts/{accountIdentifier}/{externalRefID}To update an async order under a specific account.

Benefits

  • Ability to update or correct metadata like campaign names, purchase order numbers, or notes associated with the order, which is useful for tracking and reporting.
  • Ensures accurate records for compliance, auditing, and reconciliation.

Use case

Acme Health offers a wellness program in which patients who complete annual check-ups receive a $25 digital gift card. Orders are created asynchronously in batches at the end of each week. Sometimes metadata associated with these orders—such as campaign tags, purchase order numbers, or notes—may be incorrect or missing. To fix this, Acme Health uses the PATCH endpoint to update specific fields of an existing order without reissuing the reward.

The following path parameter indicates which specific asynchronous order the request is acting upon:

Path paramsData typeRequirementDescription
customerIdentifierstringrequiredUnique ID for the customer.
accountIdentifierstringrequiredUnique ID for the account under the customer.
externalRefIDstringrequiredReference ID of the original order to be updated. 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.

The following body params can be modified using the PATCH endpoint:

Body paramsData typeDescription
campaignstringThe campaign field can be used to administratively categorize a specific order. Must be between 0 and 1024 characters in length. (Optional)
purchaseOrderNumberstringThe Purchase Order Number associated with this order.
notesstringOrder notes up to 150 characters. (Optional)

Response message

The following example shows the payload for when you use this endpoint with a successful response:

{
  "referenceOrderID": "string",
  "externalRefID": "string",
  "orderStatus": "COMPLETE",
  "createdAt": "date",
  "completedAt": null,
  "customerIdentifier": "string",
  "accountIdentifier": "string",
  "sender": null,
  "amountCharged": null,
  "campaign": "string",
  "purchaseOrderNumber": "string",
  "notes": "string",
  "totalLineItems": integer,
  "pagination": null,
  "orderErrors": null,
  "lineItems": []
}

The response body provides:

FieldWhat does it tell you
externalRefID(Required) The external reference ID of the async order you updated. This is the unique idempotency key you originally provided when creating the async order.
statusThe current async processing status (e.g., pending, queued, completed, failed). Returned after the update request.
totalLineItemsTotal number of line items associated with this async order.
createdAtTimestamp showing when the async order was originally created.
failedLineItemsList of line items that failed validation during the update request. Each entry includes: lineItemId, externalRefLineItemID, utid, and an errors[] array with field, errorCodeValue, errorCodeName, and message.
lineItemIdTango’s internal identifier for the line item that failed validation.
externalRefLineItemIDYour idempotent reference ID for this line item.
utidReward UTID for the line item.
errorsOne or more validation errors associated with this line item.
fieldThe specific field that failed validation, such as: amount, recipient.email, etc.
errorCodeValueNumeric error code for the validation failure.
errorCodeNameReadable and internal code name for the error type.
messageHuman‑readable explanation of the error.
duplicateLineItemRefIdsAn object containing any duplicate line item reference IDs detected during the update request (keys are line item reference IDs, values are counts).

The possible response codes for this endpoint are as follows. For details, see i18nkey codes and their error messages:

Response codeMeaning
200The request was successful.
400The server could not understand the request due to invalid syntax.
401Authentication is required and has either not been provided or failed.
429Exceeded the allowable TPS rate limit. It indicates that the user has sent too many requests in a given amount of time, and the server is rate-limiting further requests
500Something went wrong on the server, but the server cannot be more specific about the exact problem.
503The server is currently unable to handle the request due to temporary overload or maintenance.

© 2026 Tango API are provided by Tango, a division of BHN, Inc.