---
title: "Export Loyalty Campaign Point Expiration"
method: POST
path: "/v1/loyalties/{campaignId}/points-expiration/export"
tags: ["Loyalties"]
---

# Export Loyalty Campaign Point Expiration

`POST /v1/loyalties/{campaignId}/points-expiration/export`

Schedule the generation of a point expiration CSV file for a particular campaign. It can list point buckets, which can have an `ACTIVE` or `EXPIRED` status.

## Request body

- LoyaltiesPointsExpirationExportCreateRequestBody — Request schema model for validating a voucher using **POST** `/v1/loyalties/{campaignId}/points-expiration/export`
  - `parameters` LoyaltiesPointsExpirationExportCreateRequestBodyParameters — List of fields and filters that will be used to create the export.
    - `order` 'expires_at' | '-expires_at' — How the export is filtered, where the dash `-` preceding a sorting option means sorting in a descending order.
    - `fields` string[] — Array of strings containing the data that was exported. 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 | Loyalty points bucket ID. | lopb_Wl1o3EjJIHSNjvO5BDLy4z1n | | campaign_id | Campaign ID of the parent loyalty campaign. | camp_7s3uXI44aKfIk5IhmeOPr6ic | | voucher_id | Voucher ID of the parent loyalty card. | v_YLn0WVWXSXbUfDvxgrgUbtfJ3SQIY655 | | status | Status of the loyalty point bucket. | `ACTIVE` or `EXPIRED` | | expires_at | Timestamp in ISO 8601 format representing the date when the points expire. | 2022-06-30 | | points | Number of points. | 1000 |
    - `filters` LoyaltiesPointsExpirationExportCreateRequestBodyParametersFilters — Data filters used to narrow down the data records to be returned in the export.
      - `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.
      - `voucher_id` object — Data filters used to narrow down the data records to be returned in the result.
        - `conditions` object — Data filters used to narrow down the data records to be returned in the result.
          - `$in` string[] — Array of the resource values that should be included in the results.
          - `$not_in` string[] — Array of the resource values that should be included in the results.
          - `$is` string — Specify the exact resource value.
          - `$is_not` string — Results should omit this value.
      - `campaign_id` object — Data filters used to narrow down the data records to be returned in the result.
        - `conditions` object — Data filters used to narrow down the data records to be returned in the result.
          - `$in` string[] — Array of the resource values that should be included in the results.
          - `$not_in` string[] — Array of the resource values that should be included in the results.
          - `$is` string — Specify the exact resource value.
          - `$is_not` string — Results should omit this value.

## Response `200`

Returns an object with the export ID of the scheduled generation of CSV file with exported points expirations. You can use either the [Download Export](/api-reference/exports/download-export) endpoint to download the CSV file.

- LoyaltiesPointsExpirationExportCreateResponseBody — Object representing an export of points expirations.
  - `id` string — Unique export ID.
  - `object` 'export' — The type of object being represented. This object stores information about the export.
  - `created_at` string, date-time — Timestamp representing the date and time when the export was scheduled in ISO 8601 format.
  - `status` 'SCHEDULED' — Status of the export. Informs you whether the export has already been completed.
  - `channel` 'API' | 'WEBSITE' — The channel through which the export was triggered.
  - `exported_object` 'points_expiration' — The type of exported object.
  - `parameters` LoyaltiesPointsExpirationExportCreateResponseBodyParameters — List of fields and filters that were passed in the request body to create the export.
    - `order` 'expires_at' | '-expires_at' — How the export is filtered, where the dash `-` preceding a sorting option means sorting in a descending order.
    - `fields` string[] — Array of strings containing the data that was exported. 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 | Loyalty points bucket ID. | lopb_Wl1o3EjJIHSNjvO5BDLy4z1n | | campaign_id | Campaign ID of the parent loyalty campaign. | camp_7s3uXI44aKfIk5IhmeOPr6ic | | voucher_id | Voucher ID of the parent loyalty card. | v_YLn0WVWXSXbUfDvxgrgUbtfJ3SQIY655 | | status | Status of the loyalty points bucket. | `ACTIVE` or `INACTIVE` | | expires_at | Timestamp in ISO 8601 format representing the date when the points expire. | 2022-06-30 | | points | Number of points. | 1000 |
    - `filters` LoyaltiesPointsExpirationExportCreateResponseBodyParametersFilters — Data filters used to narrow down the data records to be returned in the export.
      - `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.
      - `voucher_id` object — Data filters used to narrow down the data records to be returned in the result.
        - `conditions` object — Data filters used to narrow down the data records to be returned in the result.
          - `$in` string[] — Array of the resource values that should be included in the results.
          - `$not_in` string[] — Array of the resource values that should be excluded from the results.
          - `$is` string — Specify the exact resource value.
          - `$is_not` string — Results should omit this value.
      - `campaign_id` object — Data filters used to narrow down the data records to be returned in the result.
        - `conditions` object — Data filters used to narrow down the data records to be returned in the result.
          - `$in` string[] — Array of the resource values that should be included in the results.
          - `$not_in` string[] — Array of the resource values that should be included in the results.
          - `$is` string — Specify the exact resource value.
          - `$is_not` string — Results should omit this value.
  - `result` object — Always null.
  - `user_id` string — `user_id` identifies the specific user who initiated the export through the Voucherify Dashboard. `user_id` is returned when the channel value is `WEBSITE`.

---

[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)
