---
title: "Initiate export request"
method: POST
path: "/api-offers/offers-exports"
tags: ["Exports"]
---

# Initiate export request

`POST /api-offers/offers-exports`

## Request

- Base URL: `https://live.copilot.fabric.inc`
- URL: `https://live.copilot.fabric.inc/api-offers/offers-exports`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/fabric/apis/offers-v2/docs/api-offers/offers-exports/post.ts> (a function with typed inputs; its response is checked against the schema)

Initiate an export request based on the specified filter criteria.

## Headers

- `x-site-context` string, required

## Request body

- CreateExport: The sample request to initiate data export.
  - `type` 'REDEMPTION' | 'CALCULATED_PRICE', required: The type of data to export.
  - `filters` object[]: Filters to apply when exporting the data. You can include multiple `filter` values in the request. If you do not include any filters, all export data of the specified data type is returned. For more information on using filters to refine your data, see the [export parameters](/v2/api-reference/offers-v2/developer-guide/exporting-csv#export-parameters) section.
    - `field` string, required: The name of the field, which is always paired with `value`. The field name is always paired with the corresponding `value` parameter. The filtering values you can choose from depend on the type of data you're exporting. For more information on the available `field` options for each data type, see the [export parameters](/v2/api-reference/offers-v2/developer-guide/exporting-csv#export-parameters) section.
    - `value` union, required: The value or values corresponding to the `field` parameter. The `field` parameter defines the name of the field, and the `value` parameter provides the corresponding value. For example, if the `field` parameter is `priceListIds`, the corresponding `value` parameter must be an array.
      - string
      - union[]
        - union
          - string: The values corresponding to the `field` parameter. The `field` parameter defines the name of the field, and the `value` parameter provides the corresponding value. For example, if the `field` parameter is `priceListIds`, the corresponding `value` parameter must be an array.
          - number: The values corresponding to the `field` parameter. The `field` parameter defines the name of the field, and the `value` parameter provides the corresponding value. For example, if the `field` parameter is `priceListIds`, the corresponding `value` parameter must be an array.
    - `operator` 'EQUAL' | 'GREATER_THAN_OR_EQUAL_TO' | 'LESS_THAN' | 'IN', required: Operator between `field` and `value` to filter data.

## Response `200`

Created

- CreateExportResponse: The sample response of the create export request.
  - `exportId` string, required: The unique ID for the export request that is used to retrieve the export details.
  - `startedAt` string, required: The start time of the export process.
  - `endedAt` string, nullable: The end time of the export process.
  - `totalDataExported` number: The total number of exported data in the csv file. Each row in the csv file represents one record of exported data.
  - `status` 'IN_PROGRESS' | 'COMPLETED' | 'ERROR', required: The status of the export process. The [download exported CSV file](/v2/api-reference/offers-v2/exports/download-exported-csv-file) endpoint can generate a download URL only if the export status is `COMPLETED`.
  - `errors` object[]: Errors during the export process. For more information about the error messages, see the [exporting CSV](/v2/api-reference/offers-v2/developer-guide/exporting-csv#export-calculated-price-error) section.
    - `type` string: The error code.
    - `message` string: An error message corresponding to the `type`.
  - `type` string, required: The type of data to export.
  - `filters` object[]
    - `field` string, required: The name of the field. This is always paired with `value`.
    - `value` union, required: The value or values corresponding to the `field` parameter. The `field` parameter defines the name of the field, and the `value` parameter provides the corresponding value. For example, if the `field` parameter is `priceListIds`, the corresponding `value` parameter must be an array.
      - string
      - union[]
        - union
          - string: The values corresponding to the `field`. The `field` parameter defines the name of the field, and the `value` parameter provides the corresponding value. For example, if the `field` parameter is `priceListIds`, the corresponding `value` parameter must be an array.
          - number: The values corresponding to the `field`. The `field` parameter defines the name of the field, and the `value` parameter provides the corresponding value. For example, if the `field` parameter is `priceListIds`, the corresponding `value` parameter must be an array.
    - `operator` string, required: Operator between `field` and `value` to filter data.

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `500`: Internal server error

---

[API](https://skmtc.dev/fabric/apis/offers-v2.md) - [All operations](https://skmtc.dev/fabric/apis/offers-v2/llms.txt) - [OpenAPI document](https://skmtc.dev/fabric/apis/offers-v2/revisions/da2bd742b9bc?raw)
