Skip to main content
GET
/
v1
/
async-actions
/
{asyncActionId}
Get Async Action
curl --request GET \
  --url https://{cluster}.voucherify.io/v1/async-actions/{asyncActionId} \
  --header 'Authorization: Bearer <token>' \
  --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

X-App-Id
string
header
required
X-App-Token
string
header
required
Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

asyncActionId
string
required

Unique ID of the asynchronous operation.

Example:

"aa_0afb3d009a55814a48"

Response

Returns detailed information about the async action result.

Response body schema for GET v1/async-actions/{asyncActionId}. This is an object representing an asynchronous action.

id
string

Async action unique ID.

Example:

"aa_0adad13d6f057f088e"

type
enum<string>

Type of async action.

Available options:
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
enum<string>

Status of the async action. Informs you whether the async action has already been completed.

Available options:
DONE,
ENQUEUED,
FAILED,
IN_PROGRESS
operation_status
enum<string>

Status of async action processing. Informs about the async action status, whether it failed, succeeded, or the status is unknown.

Available options:
FAILED,
SUCCESS,
UNKNOWN
created_at
string<date-time>

Timestamp representing the date and time when the async action was scheduled in ISO 8601 format.

Example:

"2022-06-23T11:21:45.578Z"

updated_at
string<date-time>

Timestamp representing the date and time when the async action was updated. The value is shown in the ISO 8601 format.

Example:

"2022-06-23T11:21:46.795Z"

request_id
string

Unique request ID.

Example:

"v-0b45cee140c3c9b5ca"

processing_time
integer

The length of time it took to process the request in milliseconds.

Example:

1217

progress
integer

% progress to completion of the asynchronous action.

Required range: 0 <= x <= 100
object
enum<string>
default:async_action

The type of the object represented by JSON. This object stores information about the async_action.

Available options:
async_action
result
object

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
I