Async Actions
Get Async Action
Check the result of a scheduled asynchronous operation.
The table below lists the possible types of async actions. The types are different for each endpoint generating the async action.
| Types by Context | Endpoint |
|---|---|
| CAMPAIGN | |
| CAMPAIGN.VOUCHERS_IMPORT | POST /campaigns/{campaignId}/import |
| CAMPAIGN.VOUCHERS_IMPORT_CSV | POST /campaigns/{campaignId}/importCSV |
| CAMPAIGN.VOUCHERS_UPDATE | PUT /campaigns/{campaignId} |
| CAMPAIGN.VOUCHERS_DELETE | DELETE /campaigns/{campaignId} |
| CAMPAIGN.VOUCHERS_GENERATE | <ul><li>POST /campaigns: asynchronous for campaigns with more than 1 voucher, synchronous for campaign with 1 voucher</li><li>POST /campaigns/{campaignId}/vouchers</li></ul> |
| CUSTOMERS | |
| CUSTOMERS.IMPORT_CSV | POST /customers/importCSV |
| CUSTOMERS.BULK_UPDATE | POST /customers/bulk/async |
| CUSTOMERS.METADATA_UPDATE | POST /customers/metadata/async |
| PRODUCTS | |
| PRODUCTS.BULK_UPDATE | POST /products/bulk/async<br /> |
| PRODUCTS.METADATA_UPDATE | POST /products/metadata/async |
| PRODUCTS.IMPORT_CSV | POST /products/importCSV |
| SKUS.IMPORT_CSV | POST /skus/importCSV |
| VOUCHERS | |
| VOUCHERS.IMPORT | POST /vouchers/import |
| VOUCHERS.IMPORT_CSV | POST /vouchers/importCSV |
| VOUCHERS.BULK_UPDATE | POST /vouchers/bulk/async<br /> |
| VOUCHERS.METADATA_UPDATE | POST /vouchers/metadata/async |
| ORDERS | |
| ORDERS.IMPORT | POST /orders/import |
| METADATA KEY PURGE | |
| CAMPAIGNS.METADATA_KEY_PURGE<br />CUSTOMERS.METADATA_KEY_PURGE<br />PRODUCTS.METADATA_KEY_PURGE<br />VOUCHERS.METADATA_KEY_PURGE<br />ORDERS.METADATA_KEY_PURGE | No API endpoint equivalent. You can perform this action through the Dashboard. See Dashboard documentation: Dashboard > Project Settings |
get/v1/async-actions/{asyncActionId}
Response
Returns detailed information about the async action result.
Example response
{
"id": "aa_0adad13d6f057f088e",
"created_at": "2022-06-23T11:21:45.578Z",
"updated_at": "2022-06-23T11:21:46.795Z",
"request_id": "v-0b45cee140c3c9b5ca",
"processing_time": 1217,
"result": {
"message": "2 sku(s) imported successfully, 6 failed.",
"failed": [
{
"row": 2,
"reason": "Resource sku with id size-small is in use by products with ids [prod_0b0e3441c2462eff2c]"
}
]
}
}