---
title: "Create Orders Export"
method: POST
path: "/v1/orders/export"
tags: ["Orders"]
---

# Create Orders Export

`POST /v1/orders/export`

Creates a downloadable CSV file containing a list of orders.

The parameters listed in the payload resembles headers in the CSV file. To include a parameter to the file, add it to the `parameters.fields` object in the request body.

The available filters are all [order object](/api-reference/orders/order-calculated-object) attributes. Additionally, any metadata defined in the metadata schema can be exported.

Passing an empty JSON will generate a file containing three default fields: `id`, `source_id`, and `status`.

The fields array is an array of strings containing the data in the export. These fields define the headers in the CSV file. The array can be a combination of any of the following available fields:

| **Field** | **Definition** | **Example Export** |
|:---|:---|:---|
| `id` | Unique order ID. | ord_A69RIxEdRsPuC6i8gFGVHUft |
| `source_id` | Unique order source ID. | 8638 |
| `created_at` | Timestamp in ISO 8601 format representing the date and time when the order was created. | 2022-03-09T09:16:32.521Z |
| `updated_at` | Timestamp in ISO 8601 format representing the date and time when the order was last updated. | 2022-03-09T09:16:33.331Z |
| `status` | Order status. | `PAID`, `CREATED`, `FULFILLED`, `CANCELED` |
| `amount` | Total amount of order items. | 7700 |
| `discount_amount` | Represents total amount of the discount applied to whole cart. | 500 |
| `items_discount_amount` | Represents total amount of the discount applied to order line items. | 100 |
| `total_discount_amount` | All discounts applied to the order including discounts applied to particular order line items and discounts applied to the whole cart. | 600 |
| `total_amount` | Total order amount after applying all discounts. | 7100 |
| `customer_id` | Customer unique ID. | cust_2G4fUQdCXUqp35nXNleav7bO |
| `referrer_id` | Referrer unique ID. | cust_IkrTR674vvQvr9a4rDMiqglY |
| `metadata` | Returns all order metadata. | Response will include all order metadata. |
| `metadata.X` | Where X is the name of a particular order metadata property. | The returned value will depend on the type of data defined in the Dashboard > Project Settings > Metdata Schemas > Order. |

## Request body

- OrdersExportCreateRequestBody — Request body schema for **POST** `v1/orders/export`.
  - `parameters` object — List of available fields and filters that can be exported with an order along with the sorting order of the returned data.
    - `order` '-created_at' | 'created_at' | '-updated_at' | 'updated_at' | '-status' | 'status'
    - `fields` ExportOrderFields[] — Array of strings containing the data in the export. These fields define the headers in the CSV file.
    - `filters` ExportOrderFilters — Allowed additional properties must start with "metadata."
      - `junction` 'and' | 'or' — Logical Operator Between Filters. Filter by conditions set on the `junction` parameter indicating how the `conditions` should be accounted for in the query. An `AND` is an all-inclusive logical operator, meaning the `AND` operator displays a record if **ALL** the conditions separated by AND are TRUE, while an `OR` operator displays a record if **ANY** of the conditions separated by OR is TRUE.
      - `created_at` object
        - `conditions` object
          - `$after` union[]
            - union
              - …
          - `$before` union[]
            - union
              - …
      - `updated_at` object
        - `conditions` object
          - `$after` union[]
            - union
              - …
          - `$before` union[]
            - union
              - …
      - `status` FieldConditions
        - `conditions` FiltersCondition
          - `$in` union[]
            - union
              - …
          - `$not_in` union[]
            - union
              - …
          - `$is` union[]
            - union
              - …
          - `$is_days_ago` union[]
            - union
              - …
          - `$is_days_in_future` union[]
            - union
              - …
          - `$is_not` union[]
            - union
              - …
          - `$has_value` union[]
            - union
              - …
          - `$is_unknown` union[]
            - union
              - …
          - `$contains` union[]
            - union
              - …
          - `$not_contain` union[]
            - union
              - …
          - `$starts_with` union[]
            - union
              - …
          - `$ends_with` union[]
            - union
              - …
          - `$more_than` union[]
            - union
              - …
          - `$less_than` union[]
            - union
              - …
          - `$more_than_ago` union[]
            - union
              - …
          - `$less_than_ago` union[]
            - union
              - …
          - `$more_than_future` union[]
            - union
              - …
          - `$less_than_future` union[]
            - union
              - …
          - `$more_than_equal` union[]
            - union
              - …
          - `$less_than_equal` union[]
            - union
              - …
          - `$after` union[]
            - union
              - …
          - `$before` union[]
            - union
              - …
          - `$count` union[]
            - union
              - …
          - `$count_less` union[]
            - union
              - …
          - `$count_more` union[]
            - union
              - …
      - `source_id` FieldConditions
        - `conditions` FiltersCondition
          - `$in` union[]
            - union
              - …
          - `$not_in` union[]
            - union
              - …
          - `$is` union[]
            - union
              - …
          - `$is_days_ago` union[]
            - union
              - …
          - `$is_days_in_future` union[]
            - union
              - …
          - `$is_not` union[]
            - union
              - …
          - `$has_value` union[]
            - union
              - …
          - `$is_unknown` union[]
            - union
              - …
          - `$contains` union[]
            - union
              - …
          - `$not_contain` union[]
            - union
              - …
          - `$starts_with` union[]
            - union
              - …
          - `$ends_with` union[]
            - union
              - …
          - `$more_than` union[]
            - union
              - …
          - `$less_than` union[]
            - union
              - …
          - `$more_than_ago` union[]
            - union
              - …
          - `$less_than_ago` union[]
            - union
              - …
          - `$more_than_future` union[]
            - union
              - …
          - `$less_than_future` union[]
            - union
              - …
          - `$more_than_equal` union[]
            - union
              - …
          - `$less_than_equal` union[]
            - union
              - …
          - `$after` union[]
            - union
              - …
          - `$before` union[]
            - union
              - …
          - `$count` union[]
            - union
              - …
          - `$count_less` union[]
            - union
              - …
          - `$count_more` union[]
            - union
              - …
      - `amount` FieldConditions
        - `conditions` FiltersCondition
          - `$in` union[]
            - union
              - …
          - `$not_in` union[]
            - union
              - …
          - `$is` union[]
            - union
              - …
          - `$is_days_ago` union[]
            - union
              - …
          - `$is_days_in_future` union[]
            - union
              - …
          - `$is_not` union[]
            - union
              - …
          - `$has_value` union[]
            - union
              - …
          - `$is_unknown` union[]
            - union
              - …
          - `$contains` union[]
            - union
              - …
          - `$not_contain` union[]
            - union
              - …
          - `$starts_with` union[]
            - union
              - …
          - `$ends_with` union[]
            - union
              - …
          - `$more_than` union[]
            - union
              - …
          - `$less_than` union[]
            - union
              - …
          - `$more_than_ago` union[]
            - union
              - …
          - `$less_than_ago` union[]
            - union
              - …
          - `$more_than_future` union[]
            - union
              - …
          - `$less_than_future` union[]
            - union
              - …
          - `$more_than_equal` union[]
            - union
              - …
          - `$less_than_equal` union[]
            - union
              - …
          - `$after` union[]
            - union
              - …
          - `$before` union[]
            - union
              - …
          - `$count` union[]
            - union
              - …
          - `$count_less` union[]
            - union
              - …
          - `$count_more` union[]
            - union
              - …
      - `total_amount` FieldConditions
        - `conditions` FiltersCondition
          - `$in` union[]
            - union
              - …
          - `$not_in` union[]
            - union
              - …
          - `$is` union[]
            - union
              - …
          - `$is_days_ago` union[]
            - union
              - …
          - `$is_days_in_future` union[]
            - union
              - …
          - `$is_not` union[]
            - union
              - …
          - `$has_value` union[]
            - union
              - …
          - `$is_unknown` union[]
            - union
              - …
          - `$contains` union[]
            - union
              - …
          - `$not_contain` union[]
            - union
              - …
          - `$starts_with` union[]
            - union
              - …
          - `$ends_with` union[]
            - union
              - …
          - `$more_than` union[]
            - union
              - …
          - `$less_than` union[]
            - union
              - …
          - `$more_than_ago` union[]
            - union
              - …
          - `$less_than_ago` union[]
            - union
              - …
          - `$more_than_future` union[]
            - union
              - …
          - `$less_than_future` union[]
            - union
              - …
          - `$more_than_equal` union[]
            - union
              - …
          - `$less_than_equal` union[]
            - union
              - …
          - `$after` union[]
            - union
              - …
          - `$before` union[]
            - union
              - …
          - `$count` union[]
            - union
              - …
          - `$count_less` union[]
            - union
              - …
          - `$count_more` union[]
            - union
              - …
      - `discount_amount` FieldConditions
        - `conditions` FiltersCondition
          - `$in` union[]
            - union
              - …
          - `$not_in` union[]
            - union
              - …
          - `$is` union[]
            - union
              - …
          - `$is_days_ago` union[]
            - union
              - …
          - `$is_days_in_future` union[]
            - union
              - …
          - `$is_not` union[]
            - union
              - …
          - `$has_value` union[]
            - union
              - …
          - `$is_unknown` union[]
            - union
              - …
          - `$contains` union[]
            - union
              - …
          - `$not_contain` union[]
            - union
              - …
          - `$starts_with` union[]
            - union
              - …
          - `$ends_with` union[]
            - union
              - …
          - `$more_than` union[]
            - union
              - …
          - `$less_than` union[]
            - union
              - …
          - `$more_than_ago` union[]
            - union
              - …
          - `$less_than_ago` union[]
            - union
              - …
          - `$more_than_future` union[]
            - union
              - …
          - `$less_than_future` union[]
            - union
              - …
          - `$more_than_equal` union[]
            - union
              - …
          - `$less_than_equal` union[]
            - union
              - …
          - `$after` union[]
            - union
              - …
          - `$before` union[]
            - union
              - …
          - `$count` union[]
            - union
              - …
          - `$count_less` union[]
            - union
              - …
          - `$count_more` union[]
            - union
              - …
      - `total_discount_amount` FieldConditions
        - `conditions` FiltersCondition
          - `$in` union[]
            - union
              - …
          - `$not_in` union[]
            - union
              - …
          - `$is` union[]
            - union
              - …
          - `$is_days_ago` union[]
            - union
              - …
          - `$is_days_in_future` union[]
            - union
              - …
          - `$is_not` union[]
            - union
              - …
          - `$has_value` union[]
            - union
              - …
          - `$is_unknown` union[]
            - union
              - …
          - `$contains` union[]
            - union
              - …
          - `$not_contain` union[]
            - union
              - …
          - `$starts_with` union[]
            - union
              - …
          - `$ends_with` union[]
            - union
              - …
          - `$more_than` union[]
            - union
              - …
          - `$less_than` union[]
            - union
              - …
          - `$more_than_ago` union[]
            - union
              - …
          - `$less_than_ago` union[]
            - union
              - …
          - `$more_than_future` union[]
            - union
              - …
          - `$less_than_future` union[]
            - union
              - …
          - `$more_than_equal` union[]
            - union
              - …
          - `$less_than_equal` union[]
            - union
              - …
          - `$after` union[]
            - union
              - …
          - `$before` union[]
            - union
              - …
          - `$count` union[]
            - union
              - …
          - `$count_less` union[]
            - union
              - …
          - `$count_more` union[]
            - union
              - …
      - `items_discount_amount` FieldConditions
        - `conditions` FiltersCondition
          - `$in` union[]
            - union
              - …
          - `$not_in` union[]
            - union
              - …
          - `$is` union[]
            - union
              - …
          - `$is_days_ago` union[]
            - union
              - …
          - `$is_days_in_future` union[]
            - union
              - …
          - `$is_not` union[]
            - union
              - …
          - `$has_value` union[]
            - union
              - …
          - `$is_unknown` union[]
            - union
              - …
          - `$contains` union[]
            - union
              - …
          - `$not_contain` union[]
            - union
              - …
          - `$starts_with` union[]
            - union
              - …
          - `$ends_with` union[]
            - union
              - …
          - `$more_than` union[]
            - union
              - …
          - `$less_than` union[]
            - union
              - …
          - `$more_than_ago` union[]
            - union
              - …
          - `$less_than_ago` union[]
            - union
              - …
          - `$more_than_future` union[]
            - union
              - …
          - `$less_than_future` union[]
            - union
              - …
          - `$more_than_equal` union[]
            - union
              - …
          - `$less_than_equal` union[]
            - union
              - …
          - `$after` union[]
            - union
              - …
          - `$before` union[]
            - union
              - …
          - `$count` union[]
            - union
              - …
          - `$count_less` union[]
            - union
              - …
          - `$count_more` union[]
            - union
              - …

## Response `200`

Returns the `id` of the export object and `status` of the file generation process. The `id` is used in the [Get Export](/api-reference/exports/get-export) method to generate the url for the downloadable CSV file or in the [Download Export](/api-reference/exports/download-export) method to return the contents of the CSV file. The status indicates whether the file has been scheduled for creation.

- OrdersExportCreateResponseBody — Response body schema for **POST** `v1/orders/export`.
  - `id` string, required — Unique export ID.
  - `object` 'export', required — The type of object being represented. This object stores information about the export.
  - `created_at` string, date-time, required — Timestamp representing the date and time when the export was scheduled in ISO 8601 format.
  - `status` 'SCHEDULED', required — Status of the export. Informs you whether the export has already been completed, i.e. indicates whether the file containing the exported data has been generated.
  - `channel` string — The channel through which the export was triggered.
  - `result` object, nullable, required — Contains the URL of the CSV file.
  - `user_id` string, required — Identifies the specific user who initiated the export through the Voucherify Dashboard; returned when the channel value is WEBSITE.
  - `exported_object` 'order', required — The type of object to be exported.
  - `parameters` object — List of available fields and filters that can be exported with an order along with the sorting order of the returned data.
    - `order` '-created_at' | 'created_at' | '-updated_at' | 'updated_at' | '-status' | 'status'
    - `fields` ExportOrderFields[] — Array of strings containing the data in the export. These fields define the headers in the CSV file.
    - `filters` ExportOrderFilters — Allowed additional properties must start with "metadata."
      - `junction` 'and' | 'or' — Logical Operator Between Filters. Filter by conditions set on the `junction` parameter indicating how the `conditions` should be accounted for in the query. An `AND` is an all-inclusive logical operator, meaning the `AND` operator displays a record if **ALL** the conditions separated by AND are TRUE, while an `OR` operator displays a record if **ANY** of the conditions separated by OR is TRUE.
      - `created_at` object
        - `conditions` object
          - `$after` union[]
            - union
              - …
          - `$before` union[]
            - union
              - …
      - `updated_at` object
        - `conditions` object
          - `$after` union[]
            - union
              - …
          - `$before` union[]
            - union
              - …
      - `status` FieldConditions
        - `conditions` FiltersCondition
          - `$in` union[]
            - union
              - …
          - `$not_in` union[]
            - union
              - …
          - `$is` union[]
            - union
              - …
          - `$is_days_ago` union[]
            - union
              - …
          - `$is_days_in_future` union[]
            - union
              - …
          - `$is_not` union[]
            - union
              - …
          - `$has_value` union[]
            - union
              - …
          - `$is_unknown` union[]
            - union
              - …
          - `$contains` union[]
            - union
              - …
          - `$not_contain` union[]
            - union
              - …
          - `$starts_with` union[]
            - union
              - …
          - `$ends_with` union[]
            - union
              - …
          - `$more_than` union[]
            - union
              - …
          - `$less_than` union[]
            - union
              - …
          - `$more_than_ago` union[]
            - union
              - …
          - `$less_than_ago` union[]
            - union
              - …
          - `$more_than_future` union[]
            - union
              - …
          - `$less_than_future` union[]
            - union
              - …
          - `$more_than_equal` union[]
            - union
              - …
          - `$less_than_equal` union[]
            - union
              - …
          - `$after` union[]
            - union
              - …
          - `$before` union[]
            - union
              - …
          - `$count` union[]
            - union
              - …
          - `$count_less` union[]
            - union
              - …
          - `$count_more` union[]
            - union
              - …
      - `source_id` FieldConditions
        - `conditions` FiltersCondition
          - `$in` union[]
            - union
              - …
          - `$not_in` union[]
            - union
              - …
          - `$is` union[]
            - union
              - …
          - `$is_days_ago` union[]
            - union
              - …
          - `$is_days_in_future` union[]
            - union
              - …
          - `$is_not` union[]
            - union
              - …
          - `$has_value` union[]
            - union
              - …
          - `$is_unknown` union[]
            - union
              - …
          - `$contains` union[]
            - union
              - …
          - `$not_contain` union[]
            - union
              - …
          - `$starts_with` union[]
            - union
              - …
          - `$ends_with` union[]
            - union
              - …
          - `$more_than` union[]
            - union
              - …
          - `$less_than` union[]
            - union
              - …
          - `$more_than_ago` union[]
            - union
              - …
          - `$less_than_ago` union[]
            - union
              - …
          - `$more_than_future` union[]
            - union
              - …
          - `$less_than_future` union[]
            - union
              - …
          - `$more_than_equal` union[]
            - union
              - …
          - `$less_than_equal` union[]
            - union
              - …
          - `$after` union[]
            - union
              - …
          - `$before` union[]
            - union
              - …
          - `$count` union[]
            - union
              - …
          - `$count_less` union[]
            - union
              - …
          - `$count_more` union[]
            - union
              - …
      - `amount` FieldConditions
        - `conditions` FiltersCondition
          - `$in` union[]
            - union
              - …
          - `$not_in` union[]
            - union
              - …
          - `$is` union[]
            - union
              - …
          - `$is_days_ago` union[]
            - union
              - …
          - `$is_days_in_future` union[]
            - union
              - …
          - `$is_not` union[]
            - union
              - …
          - `$has_value` union[]
            - union
              - …
          - `$is_unknown` union[]
            - union
              - …
          - `$contains` union[]
            - union
              - …
          - `$not_contain` union[]
            - union
              - …
          - `$starts_with` union[]
            - union
              - …
          - `$ends_with` union[]
            - union
              - …
          - `$more_than` union[]
            - union
              - …
          - `$less_than` union[]
            - union
              - …
          - `$more_than_ago` union[]
            - union
              - …
          - `$less_than_ago` union[]
            - union
              - …
          - `$more_than_future` union[]
            - union
              - …
          - `$less_than_future` union[]
            - union
              - …
          - `$more_than_equal` union[]
            - union
              - …
          - `$less_than_equal` union[]
            - union
              - …
          - `$after` union[]
            - union
              - …
          - `$before` union[]
            - union
              - …
          - `$count` union[]
            - union
              - …
          - `$count_less` union[]
            - union
              - …
          - `$count_more` union[]
            - union
              - …
      - `total_amount` FieldConditions
        - `conditions` FiltersCondition
          - `$in` union[]
            - union
              - …
          - `$not_in` union[]
            - union
              - …
          - `$is` union[]
            - union
              - …
          - `$is_days_ago` union[]
            - union
              - …
          - `$is_days_in_future` union[]
            - union
              - …
          - `$is_not` union[]
            - union
              - …
          - `$has_value` union[]
            - union
              - …
          - `$is_unknown` union[]
            - union
              - …
          - `$contains` union[]
            - union
              - …
          - `$not_contain` union[]
            - union
              - …
          - `$starts_with` union[]
            - union
              - …
          - `$ends_with` union[]
            - union
              - …
          - `$more_than` union[]
            - union
              - …
          - `$less_than` union[]
            - union
              - …
          - `$more_than_ago` union[]
            - union
              - …
          - `$less_than_ago` union[]
            - union
              - …
          - `$more_than_future` union[]
            - union
              - …
          - `$less_than_future` union[]
            - union
              - …
          - `$more_than_equal` union[]
            - union
              - …
          - `$less_than_equal` union[]
            - union
              - …
          - `$after` union[]
            - union
              - …
          - `$before` union[]
            - union
              - …
          - `$count` union[]
            - union
              - …
          - `$count_less` union[]
            - union
              - …
          - `$count_more` union[]
            - union
              - …
      - `discount_amount` FieldConditions
        - `conditions` FiltersCondition
          - `$in` union[]
            - union
              - …
          - `$not_in` union[]
            - union
              - …
          - `$is` union[]
            - union
              - …
          - `$is_days_ago` union[]
            - union
              - …
          - `$is_days_in_future` union[]
            - union
              - …
          - `$is_not` union[]
            - union
              - …
          - `$has_value` union[]
            - union
              - …
          - `$is_unknown` union[]
            - union
              - …
          - `$contains` union[]
            - union
              - …
          - `$not_contain` union[]
            - union
              - …
          - `$starts_with` union[]
            - union
              - …
          - `$ends_with` union[]
            - union
              - …
          - `$more_than` union[]
            - union
              - …
          - `$less_than` union[]
            - union
              - …
          - `$more_than_ago` union[]
            - union
              - …
          - `$less_than_ago` union[]
            - union
              - …
          - `$more_than_future` union[]
            - union
              - …
          - `$less_than_future` union[]
            - union
              - …
          - `$more_than_equal` union[]
            - union
              - …
          - `$less_than_equal` union[]
            - union
              - …
          - `$after` union[]
            - union
              - …
          - `$before` union[]
            - union
              - …
          - `$count` union[]
            - union
              - …
          - `$count_less` union[]
            - union
              - …
          - `$count_more` union[]
            - union
              - …
      - `total_discount_amount` FieldConditions
        - `conditions` FiltersCondition
          - `$in` union[]
            - union
              - …
          - `$not_in` union[]
            - union
              - …
          - `$is` union[]
            - union
              - …
          - `$is_days_ago` union[]
            - union
              - …
          - `$is_days_in_future` union[]
            - union
              - …
          - `$is_not` union[]
            - union
              - …
          - `$has_value` union[]
            - union
              - …
          - `$is_unknown` union[]
            - union
              - …
          - `$contains` union[]
            - union
              - …
          - `$not_contain` union[]
            - union
              - …
          - `$starts_with` union[]
            - union
              - …
          - `$ends_with` union[]
            - union
              - …
          - `$more_than` union[]
            - union
              - …
          - `$less_than` union[]
            - union
              - …
          - `$more_than_ago` union[]
            - union
              - …
          - `$less_than_ago` union[]
            - union
              - …
          - `$more_than_future` union[]
            - union
              - …
          - `$less_than_future` union[]
            - union
              - …
          - `$more_than_equal` union[]
            - union
              - …
          - `$less_than_equal` union[]
            - union
              - …
          - `$after` union[]
            - union
              - …
          - `$before` union[]
            - union
              - …
          - `$count` union[]
            - union
              - …
          - `$count_less` union[]
            - union
              - …
          - `$count_more` union[]
            - union
              - …
      - `items_discount_amount` FieldConditions
        - `conditions` FiltersCondition
          - `$in` union[]
            - union
              - …
          - `$not_in` union[]
            - union
              - …
          - `$is` union[]
            - union
              - …
          - `$is_days_ago` union[]
            - union
              - …
          - `$is_days_in_future` union[]
            - union
              - …
          - `$is_not` union[]
            - union
              - …
          - `$has_value` union[]
            - union
              - …
          - `$is_unknown` union[]
            - union
              - …
          - `$contains` union[]
            - union
              - …
          - `$not_contain` union[]
            - union
              - …
          - `$starts_with` union[]
            - union
              - …
          - `$ends_with` union[]
            - union
              - …
          - `$more_than` union[]
            - union
              - …
          - `$less_than` union[]
            - union
              - …
          - `$more_than_ago` union[]
            - union
              - …
          - `$less_than_ago` union[]
            - union
              - …
          - `$more_than_future` union[]
            - union
              - …
          - `$less_than_future` union[]
            - union
              - …
          - `$more_than_equal` union[]
            - union
              - …
          - `$less_than_equal` union[]
            - union
              - …
          - `$after` union[]
            - union
              - …
          - `$before` union[]
            - union
              - …
          - `$count` union[]
            - union
              - …
          - `$count_less` union[]
            - union
              - …
          - `$count_more` union[]
            - union
              - …

## Other responses

- `400` — Returns an error if the request payload is specified incorrectly.

---

[API](https://skmtc.net/voucherifyio/apis/voucherify-api-async-actions.md) · [All operations](https://skmtc.net/voucherifyio/apis/voucherify-api-async-actions/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/voucherifyio/voucherify-api-async-actions/revisions/4982266e0494/schema)
