curl --request GET \
--url https://{cluster}.voucherify.io/v1/async-actions/{asyncActionId} \
--header 'X-App-Id: <api-key>' \
--header 'X-App-Token: <api-key>'{
"id": "aa_0af9b22296cf473a10",
"type": "CAMPAIGN.VOUCHERS_IMPORT",
"status": "DONE",
"result": {
"message": "0 voucher(s) imported successfully, 3 failed.",
"failed": [
{
"code": "CODE9",
"reason": "unit: must be a number, property is required (actual value is 'EUR')"
},
{
"code": "CODE8",
"reason": "unit: must be a number, property is required (actual value is 'EUR')"
},
{
"code": "CODE7",
"reason": "unit: must be a number, property is required (actual value is 'EUR')"
}
],
"done_count": 0,
"failed_count": 3
},
"created_at": "2023-01-20T07:23:43.289Z",
"updated_at": "2023-01-20T07:23:44.044Z",
"request_id": "v-0c553fdb325688d510",
"progress": 100,
"processing_time": 755,
"object": "async_action"
}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 |
|
| 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 |
| 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 |
| VOUCHERS.METADATA_UPDATE | POST /vouchers/metadata/async |
| ORDERS | |
| ORDERS.IMPORT | POST /orders/import |
| METADATA KEY PURGE | |
| CAMPAIGNS.METADATA_KEY_PURGE CUSTOMERS.METADATA_KEY_PURGE PRODUCTS.METADATA_KEY_PURGE VOUCHERS.METADATA_KEY_PURGE ORDERS.METADATA_KEY_PURGE | No API endpoint equivalent. You can perform this action through the Dashboard. See Dashboard documentation: Dashboard > Project Settings |
curl --request GET \
--url https://{cluster}.voucherify.io/v1/async-actions/{asyncActionId} \
--header 'X-App-Id: <api-key>' \
--header 'X-App-Token: <api-key>'{
"id": "aa_0af9b22296cf473a10",
"type": "CAMPAIGN.VOUCHERS_IMPORT",
"status": "DONE",
"result": {
"message": "0 voucher(s) imported successfully, 3 failed.",
"failed": [
{
"code": "CODE9",
"reason": "unit: must be a number, property is required (actual value is 'EUR')"
},
{
"code": "CODE8",
"reason": "unit: must be a number, property is required (actual value is 'EUR')"
},
{
"code": "CODE7",
"reason": "unit: must be a number, property is required (actual value is 'EUR')"
}
],
"done_count": 0,
"failed_count": 3
},
"created_at": "2023-01-20T07:23:43.289Z",
"updated_at": "2023-01-20T07:23:44.044Z",
"request_id": "v-0c553fdb325688d510",
"progress": 100,
"processing_time": 755,
"object": "async_action"
}Authorizations
Path Parameters
Unique ID of the asynchronous operation.
"aa_0afb3d009a55814a48"
Response
Returns detailed information about the async action result.
Response body schema for GET v1/async-actions/{asyncActionId}.
Async action unique ID.
"aa_0adad13d6f057f088e"
Type of async action.
CAMPAIGN.VOUCHERS_IMPORT, CAMPAIGN.VOUCHERS_IMPORT_CSV, CAMPAIGN.VOUCHERS_UPDATE, CAMPAIGN.VOUCHERS_DELETE, CAMPAIGN.VOUCHERS_GENERATE, CAMPAIGNS.METADATA_KEY_PURGE, CUSTOMERS.IMPORT_CSV, CUSTOMERS.BULK_UPDATE, CUSTOMERS.METADATA_UPDATE, CUSTOMERS.METADATA_KEY_PURGE, PRODUCTS.BULK_UPDATE, PRODUCTS.METADATA_UPDATE, PRODUCTS.METADATA_KEY_PURGE, PRODUCTS.IMPORT_CSV, SKUS.IMPORT_CSV, VOUCHERS.IMPORT, VOUCHERS.IMPORT_CSV, VOUCHERS.BULK_UPDATE, VOUCHERS.METADATA_UPDATE, VOUCHERS.METADATA_KEY_PURGE, ORDERS.IMPORT, ORDERS.METADATA_KEY_PURGE Status of the async action. Informs you whether the async action has already been completed.
DONE, ENQUEUED, FAILED, IN_PROGRESS Status of async action processing. Informs about the async action status, whether it failed, succeeded, or the status is unknown.
FAILED, SUCCESS, UNKNOWN Timestamp representing the date and time when the async action was scheduled in ISO 8601 format.
"2022-06-23T11:21:45.578Z"
Timestamp representing the date and time when the async action was updated. The value is shown in the ISO 8601 format.
"2022-06-23T11:21:46.795Z"
Unique request ID.
"v-0b45cee140c3c9b5ca"
The length of time it took to process the request in milliseconds.
1217
% progress to completion of the asynchronous action.
0 <= x <= 100The type of the object represented by JSON. This object stores information about the async_action.
async_action Result schema for a CAMPAIGN.VOUCHERS_IMPORT async action type.
- CAMPAIGN.VOUCHERS_IMPORT
- CAMPAIGN.VOUCHERS_IMPORT_CSV
- CAMPAIGN.VOUCHERS_UPDATE
- CAMPAIGN.VOUCHERS_DELETE
- CAMPAIGN.VOUCHERS_GENERATE
- CAMPAIGNS.METADATA_KEY_PURGE
- CUSTOMERS.IMPORT_CSV
- CUSTOMERS.BULK_UPDATE
- CUSTOMERS.METADATA_UPDATE
- CUSTOMERS.METADATA_KEY_PURGE
- PRODUCTS.BULK_UPDATE
- PRODUCTS.METADATA_UPDATE
- PRODUCTS.IMPORT_CSV
- SKUS.IMPORT_CSV
- PRODUCTS.METADATA_KEY_PURGE
- VOUCHERS.IMPORT
- VOUCHERS.IMPORT_CSV
- VOUCHERS.BULK_UPDATE
- VOUCHERS.METADATA_UPDATE
- VOUCHERS.METADATA_KEY_PURGE
- ORDERS.IMPORT
- ORDERS.METADATA_KEY_PURGE
Show child attributes
Show child attributes
Was this page helpful?

