> ## Documentation Index
> Fetch the complete documentation index at: https://docs.voucherify.io/llms.txt
> Use this file to discover all available pages before exploring further.

# List Async Actions

> Track asynchronous operations scheduled in your project.  

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`](/api-reference/campaigns/import-vouchers-to-campaign) |
| CAMPAIGN.VOUCHERS_IMPORT_CSV | **POST**   [`/campaigns/{campaignId}/importCSV`](/api-reference/campaigns/import-vouchers-to-campaign-by-csv) |
| CAMPAIGN.VOUCHERS_UPDATE | **PUT** [`/campaigns/{campaignId}`](/api-reference/campaigns/update-campaign) |
| CAMPAIGN.VOUCHERS_DELETE | **DELETE** [`/campaigns/{campaignId}`](/api-reference/campaigns/delete-campaign) |
| CAMPAIGN.VOUCHERS_GENERATE | <ul><li>**POST** [`/campaigns`](/api-reference/campaigns/create-campaign): asynchronous for campaigns with more than 1 voucher, synchronous for campaign with 1 voucher</li><li>**POST**    [`/campaigns/{campaignId}/vouchers`](/api-reference/campaigns/add-vouchers-to-campaign)</li></ul> |
| **CUSTOMERS** |  |
| CUSTOMERS.IMPORT_CSV | **POST** [`/customers/importCSV`](/api-reference/customers/import-and-update-customers-using-csv) |
| CUSTOMERS.BULK_UPDATE | **POST** [`/customers/bulk/async`](/api-reference/customers/update-customers-in-bulk) |
| CUSTOMERS.METADATA_UPDATE | **POST** [`/customers/metadata/async`](/api-reference/customers/update-customers-metadata-in-bulk) |
| **PRODUCTS** |  |
| PRODUCTS.BULK_UPDATE | **POST** [`/products/bulk/async`](/api-reference/products/update-products-in-bulk)<br /> |
| PRODUCTS.METADATA_UPDATE | **POST** [`/products/metadata/async`](/api-reference/products/update-products-metadata-in-bulk) |
| PRODUCTS.IMPORT_CSV | **POST** [`/products/importCSV`](/api-reference/products/import-products-using-csv) |
| SKUS.IMPORT_CSV | **POST** [`/skus/importCSV`](/api-reference/products/import-skus-using-csv) |
| **VOUCHERS** |  |
| VOUCHERS.IMPORT | **POST** [`/vouchers/import`](/api-reference/vouchers/import-vouchers) |
| VOUCHERS.IMPORT_CSV | **POST** [`/vouchers/importCSV`](/api-reference/vouchers/import-vouchers-using-csv) |
| VOUCHERS.BULK_UPDATE | **POST** [`/vouchers/bulk/async`](/api-reference/vouchers/update-vouchers-in-bulk)<br /> |
| VOUCHERS.METADATA_UPDATE | **POST** [`/vouchers/metadata/async`](/api-reference/vouchers/update-vouchers-metadata-in-bulk) | 
| **ORDERS** |  |
| ORDERS.IMPORT | **POST** [`/orders/import`](/api-reference/orders/import-orders) |
| **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](/prepare/metadata#maintenance) |



## OpenAPI

````yaml /openapi/async-actions.json get /v1/async-actions
openapi: 3.0.1
info:
  title: Voucherify API - Async Actions
  version: v2018-08-01
  description: >-
    Voucherify promotion engine REST API. Please see
    https://docs.voucherify.io/docs for more details.
  contact:
    name: Voucherify Team
    url: https://www.voucherify.io/contact-support
    email: support@voucherify.io
  termsOfService: https://www.voucherify.io/legal/subscription-agreement
  license:
    name: MIT
    url: https://github.com/voucherifyio/voucherify-js-sdk/blob/main/LICENSE
servers:
  - url: https://{cluster}.voucherify.io
    description: Base URL
    variables:
      cluster:
        default: api
        enum:
          - api
          - us1.api
          - as1.api
          - download
          - us1.download
          - as1.download
security: []
paths:
  /v1/async-actions:
    get:
      tags:
        - Async Actions
      summary: List Async Actions
      description: >-
        Track asynchronous operations scheduled in your project.  


        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`](/api-reference/campaigns/import-vouchers-to-campaign)
        |

        | CAMPAIGN.VOUCHERS_IMPORT_CSV | **POST**  
        [`/campaigns/{campaignId}/importCSV`](/api-reference/campaigns/import-vouchers-to-campaign-by-csv)
        |

        | CAMPAIGN.VOUCHERS_UPDATE | **PUT**
        [`/campaigns/{campaignId}`](/api-reference/campaigns/update-campaign) |

        | CAMPAIGN.VOUCHERS_DELETE | **DELETE**
        [`/campaigns/{campaignId}`](/api-reference/campaigns/delete-campaign) |

        | CAMPAIGN.VOUCHERS_GENERATE | <ul><li>**POST**
        [`/campaigns`](/api-reference/campaigns/create-campaign): asynchronous
        for campaigns with more than 1 voucher, synchronous for campaign with 1
        voucher</li><li>**POST**   
        [`/campaigns/{campaignId}/vouchers`](/api-reference/campaigns/add-vouchers-to-campaign)</li></ul>
        |

        | **CUSTOMERS** |  |

        | CUSTOMERS.IMPORT_CSV | **POST**
        [`/customers/importCSV`](/api-reference/customers/import-and-update-customers-using-csv)
        |

        | CUSTOMERS.BULK_UPDATE | **POST**
        [`/customers/bulk/async`](/api-reference/customers/update-customers-in-bulk)
        |

        | CUSTOMERS.METADATA_UPDATE | **POST**
        [`/customers/metadata/async`](/api-reference/customers/update-customers-metadata-in-bulk)
        |

        | **PRODUCTS** |  |

        | PRODUCTS.BULK_UPDATE | **POST**
        [`/products/bulk/async`](/api-reference/products/update-products-in-bulk)<br
        /> |

        | PRODUCTS.METADATA_UPDATE | **POST**
        [`/products/metadata/async`](/api-reference/products/update-products-metadata-in-bulk)
        |

        | PRODUCTS.IMPORT_CSV | **POST**
        [`/products/importCSV`](/api-reference/products/import-products-using-csv)
        |

        | SKUS.IMPORT_CSV | **POST**
        [`/skus/importCSV`](/api-reference/products/import-skus-using-csv) |

        | **VOUCHERS** |  |

        | VOUCHERS.IMPORT | **POST**
        [`/vouchers/import`](/api-reference/vouchers/import-vouchers) |

        | VOUCHERS.IMPORT_CSV | **POST**
        [`/vouchers/importCSV`](/api-reference/vouchers/import-vouchers-using-csv)
        |

        | VOUCHERS.BULK_UPDATE | **POST**
        [`/vouchers/bulk/async`](/api-reference/vouchers/update-vouchers-in-bulk)<br
        /> |

        | VOUCHERS.METADATA_UPDATE | **POST**
        [`/vouchers/metadata/async`](/api-reference/vouchers/update-vouchers-metadata-in-bulk)
        | 

        | **ORDERS** |  |

        | ORDERS.IMPORT | **POST**
        [`/orders/import`](/api-reference/orders/import-orders) |

        | **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](/prepare/metadata#maintenance) |
      operationId: list-async-actions
      parameters:
        - schema:
            $ref: '#/components/schemas/ParameterLimit'
          in: query
          name: limit
          description: >-
            Limit the number of asynchronous actions that the API returns in the
            response.
        - schema:
            $ref: '#/components/schemas/ParameterDate'
          in: query
          name: end_date
          description: >-
            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`). 
      responses:
        '200':
          description: >-
            Returns a list of all scheduled asynchronous actions and detailed
            information for each scheduled action. Note that a status
            `DONE`doesn't include the result of the completed action. If you
            need more information about the result, use the ID of the respective
            async action to call the [Get Async
            Action](/api-reference/async-actions/get-async-action) endpoint.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AsyncActionsListResponseBody'
              examples:
                List Async Actions:
                  value:
                    object: list
                    data_ref: async_actions
                    async_actions:
                      - id: aa_0ba518c55290c6fd62
                        type: CUSTOMERS.BULK_UPDATE
                        status: DONE
                        created_at: '2022-09-05T11:40:17.098Z'
                        updated_at: '2022-09-05T11:40:17.887Z'
                        request_id: v-0ba518c52bc99858f0
                        progress: 100
                        object: async_action
                      - id: aa_0ba50a7ff4d3574568
                        type: CUSTOMERS.METADATA_UPDATE
                        status: DONE
                        created_at: '2022-09-05T10:37:56.051Z'
                        updated_at: '2022-09-05T10:37:56.862Z'
                        request_id: v-0ba50a7feb49984902
                        progress: 100
                        object: async_action
        '400':
          description: Returns an error if incorrect query parameters were provided.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                Invalid Query Parameters:
                  value:
                    code: 400
                    key: invalid_query_params
                    message: Invalid query params
                    details: >-
                      Property .end_date cannot be recognized as a ISO-8601
                      compliant date
                    request_id: v-0c54493e444b0f61a6
      security:
        - X-App-Id: []
          X-App-Token: []
        - X-Voucherify-OAuth:
            - api
            - async-actions
components:
  schemas:
    ParameterLimit:
      type: integer
      maximum: 100
      minimum: 1
    ParameterDate:
      type: string
      example: '2023-12-22T10:13:06.487Z'
      format: date-time
    AsyncActionsListResponseBody:
      description: Response body schema for **GET** `v1/async-actions`.
      type: object
      title: Async Actions List Response Body
      properties:
        object:
          type: string
          description: >-
            The type of the object represented by JSON. This object stores
            information about asynchronous actions.
          default: list
          enum:
            - list
        data_ref:
          type: string
          default: async_actions
          description: >-
            Identifies the name of the JSON property that contains the array of
            asynchronous actions.
          enum:
            - async_actions
        async_actions:
          type: array
          items:
            $ref: '#/components/schemas/AsyncActionBase'
        has_more:
          type: boolean
          description: >-
            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.
    Error:
      title: Error Object
      type: object
      description: Error details
      properties:
        code:
          type: integer
          description: Error's HTTP status code.
        key:
          type: string
          description: Short string describing the kind of error which occurred.
        message:
          type: string
          description: A human-readable message providing a short description of the error.
        details:
          type: string
          description: A human-readable message providing more details about the error.
        request_id:
          type: string
          example: v-0a885062c80375740f
          description: >-
            This ID is useful when troubleshooting and/or finding the root cause
            of an error response by our support team.
        resource_id:
          type: string
          description: >-
            Unique resource ID that can be used in another endpoint to get more
            details.
          example: rf_0c5d710a87c8a31f86
        resource_type:
          type: string
          description: The resource type.
          example: voucher
        error:
          type: object
          description: Includes additional information about the error.
          properties:
            message:
              type: string
              description: The message configured by the user in a validation rule.
      required:
        - code
        - message
    AsyncActionBase:
      title: Async Action Base
      type: object
      description: This is an object representing an asynchronous action.
      properties:
        id:
          type: string
          example: aa_0adad13d6f057f088e
          description: Async action unique ID.
        type:
          type: string
          description: Type of async action.
          enum:
            - 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:
          type: string
          description: >-
            Status of the async action. Informs you whether the async action has
            already been completed.
          enum:
            - DONE
            - ENQUEUED
            - FAILED
            - IN_PROGRESS
        operation_status:
          type: string
          description: >-
            Status of async action processing. Informs about the async action
            status, whether it failed, succeeded, or the status is unknown.
          enum:
            - FAILED
            - SUCCESS
            - UNKNOWN
        created_at:
          type: string
          description: >-
            Timestamp representing the date and time when the async action was
            scheduled in ISO 8601 format.
          example: '2022-06-23T11:21:45.578Z'
          format: date-time
        updated_at:
          type: string
          example: '2022-06-23T11:21:46.795Z'
          description: >-
            Timestamp representing the date and time when the async action was
            updated. The value is shown in the ISO 8601 format.
          format: date-time
        request_id:
          type: string
          example: v-0b45cee140c3c9b5ca
          description: Unique request ID.
        processing_time:
          type: integer
          example: 1217
          description: The length of time it took to process the request in milliseconds.
        progress:
          type: integer
          description: '% progress to completion of the asynchronous action.'
          minimum: 0
          maximum: 100
        object:
          type: string
          default: async_action
          description: >-
            The type of the object represented by JSON. This object stores
            information about the `async_action`.
          enum:
            - async_action
  securitySchemes:
    X-App-Id:
      type: apiKey
      name: X-App-Id
      in: header
    X-App-Token:
      type: apiKey
      name: X-App-Token
      in: header
    X-Voucherify-OAuth:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: https://api.voucherify.io/v1/oauth/token
          scopes:
            api: Gives access to whole server-side API.
            vouchers: >-
              Gives access to all endpoints and methods starting with
              `v1/vouchers`.
            client_api: Gives access to whole client-side API.
            client_vouchers: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/vouchers`.
            promotions: >-
              Gives access to all endpoints and methods starting with
              `/v1/promotions`.
            client_promotions: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/promotions`
            campaigns: >-
              Gives access to all endpoints and methods starting with
              `v1/campaigns`.
            client_publish: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/publish`.
            exports: >-
              Gives access to all endpoints and methods starting with
              `/v1/exports`.
            publications: >-
              Gives access to all endpoints and methods starting with
              `/v1/publications`.
            client_validate: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/validate`.
            validations: >-
              Gives access to all endpoints and methods starting with
              `/v1/validations`.
            client_validations: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/validations`.
            qualifications: >-
              Gives access to all endpoints and methods starting with
              `/v1/qualifications`.
            client_qualifications: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/qualifications`.
            client_redeem: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/redeem
            redemptions: >-
              Gives access to all endpoints and methods starting with
              `/v1/redemptions`.
            client_redemptions: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/redemptions`
            customers: >-
              Gives access to all endpoints and methods starting with
              `/v1/customers`.
            client_customers: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/customers`.
            orders: >-
              Gives access to all endpoints and methods starting with
              `/v1/orders`.
            products: >-
              Gives access to all endpoints and methods starting with
              `/v1/products`.
            skus: >-
              Gives access to all endpoints and methods starting with
              `/v1/SKUs`.
            validation-rules: >-
              Gives access to all endpoints and methods starting with
              `/v1/validation-rules`.
            validation-rules-assignments: >-
              Gives access to all endpoints and methods starting with
              `/v1/validation-rules-assignments
            segments: >-
              Gives access to all endpoints and methods starting with
              `/v1/segments`.
            events: >-
              Gives access to all endpoints and methods starting with
              `/v1/events`.
            client_events: >-
              Gives access to all endpoints and methods starting with
              `client/v1/events`.
            rewards: >-
              Gives access to all endpoints and methods starting with
              `/v1/rewards`.
            assets: >-
              Gives access to all endpoints and methods starting with
              `/v1/assets`.
            task-results: >-
              Gives access to all endpoints and methods starting with
              `/v1/task-results`.
            loyalties: >-
              Gives access to all endpoints and methods starting with
              `/v1/loyalties`.
            client_consents: >-
              Gives access to all endpoints and methods starting with
              `client/v1/consents`.
            consents: >-
              Gives access to all endpoints and methods starting with
              `/v1/consents`.
            async-actions: >-
              Gives access to all endpoints and methods starting with
              `/v1/async-actions`.
            product-collections: >-
              Gives access to all endpoints and methods starting with
              `/v1/product-collections`.
            categories: >-
              Gives access to all endpoints and methods starting with
              `/v1/categories`.
            metadata-schemas: >-
              Gives access to all endpoints and methods starting with
              `/v1/metadata-schemas`.
            locations: >-
              Gives access to all endpoints and methods starting with
              `/v1/locations`.
            referrals: >-
              Gives access to all endpoints and methods starting with
              `/v1/referrals`.
            trash-bin: >-
              Gives access to all endpoints and methods starting with
              `/v1/trash-bin`.
            templates: >-
              Gives access to all endpoints and methods starting with
              `/v1/templates`.

````