younifyd
Menu

List Async Actions

List Async Actions

GET/v1/async-actions

Use it in a workflow

  1. Add a step and choose the Voucherify connector.
  2. Pick the List Async Actions action (under Async Actions).
  3. Fill in the fields below, then reference the result from later steps as {{listAsyncActions.response.data}}.

Request

Query parameters

limitinteger

Limit the number of asynchronous actions that the API returns in the response.

end_datestring (date-time)

Limits results to actions scheduled before the `end_date`. The date format needs to be consistent with ISO 8601 format (`2016-11-16T14:14:31Z` or `2016-11-16`).

Response

Returns 200 with an object. Read it in later steps with {{listAsyncActions.response.data.<field>}}.

objectstring

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

One oflistDefault "list"

data_refstring

Identifies the name of the JSON property that contains the array of asynchronous actions.

One ofasync_actionsDefault "async_actions"

async_actionsarray<object>
idstring

Async action unique ID.

typestring

Type of async action.

One ofCAMPAIGN.VOUCHERS_IMPORTCAMPAIGN.VOUCHERS_IMPORT_CSVCAMPAIGN.VOUCHERS_UPDATECAMPAIGN.VOUCHERS_DELETECAMPAIGN.VOUCHERS_GENERATECAMPAIGNS.METADATA_KEY_PURGECUSTOMERS.IMPORT_CSVCUSTOMERS.BULK_UPDATECUSTOMERS.METADATA_UPDATECUSTOMERS.METADATA_KEY_PURGEPRODUCTS.BULK_UPDATEPRODUCTS.METADATA_UPDATEPRODUCTS.METADATA_KEY_PURGEPRODUCTS.IMPORT_CSVSKUS.IMPORT_CSVVOUCHERS.IMPORTVOUCHERS.IMPORT_CSVVOUCHERS.BULK_UPDATEVOUCHERS.METADATA_UPDATEVOUCHERS.METADATA_KEY_PURGEORDERS.IMPORTORDERS.METADATA_KEY_PURGE

statusstring

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

One ofDONEENQUEUEDFAILEDIN_PROGRESS

operation_statusstring

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

One ofFAILEDSUCCESSUNKNOWN

created_atstring (date-time)

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

updated_atstring (date-time)

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

request_idstring

Unique request ID.

processing_timeinteger

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

progressinteger

% progress to completion of the asynchronous action.

objectstring

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

One ofasync_actionDefault "async_action"

has_moreboolean

As query results are always limited by parameters, the `has_more` flag indicates if there are more records available. This lets you know if you can run another request to get more records returned in the results.

json
{
  "object": "list",
  "data_ref": "async_actions",
  "async_actions": [
    {
      "id": "aa_0adad13d6f057f088e",
      "type": "CAMPAIGN.VOUCHERS_IMPORT",
      "status": "DONE",
      "operation_status": "FAILED",
      "created_at": "2022-06-23T11:21:45.578Z",
      "updated_at": "2022-06-23T11:21:46.795Z",
      "request_id": "v-0b45cee140c3c9b5ca",
      "processing_time": 1217,
      "progress": 0,
      "object": "async_action"
    }
  ],
  "has_more": false
}

Need more? See the Voucherify guide for connection setup and behaviour shared by every action.