---
title: "Export spreadsheet of purchases matching criteria. Roles: admin."
method: POST
path: "/api/memberships/{membershipId}/purchases/export"
tags: ["Exports", "Purchases", "Organizations"]
---

# Export spreadsheet of purchases matching criteria. Roles: admin.

`POST /api/memberships/{membershipId}/purchases/export`

## Path parameters

- `membershipId` integer, required

## Request body

- PurchaseReportCriteria
  - `startDate` string, date, required
  - `endDate` string, date, required
  - `audienceId` integer
  - `productFilter` FilterCriteria
    - `mode` 'NO_FILTER' | 'ANY' | 'NONE' | 'IN', required
    - `ids` integer[]
    - `values` string[]
  - `statusFilter` FilterCriteria
    - `mode` 'NO_FILTER' | 'ANY' | 'NONE' | 'IN', required
    - `ids` integer[]
    - `values` string[]
  - `voucherFilter` FilterCriteria
    - `mode` 'NO_FILTER' | 'ANY' | 'NONE' | 'IN', required
    - `ids` integer[]
    - `values` string[]
  - `endDateTime` string, date-time
  - `startDateTime` string, date-time

## Response `200`

OK

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not found
- `500` — Internal server error

## Changes

- **2026-09-02** `870f28ba2607` — 5 info
  - added the optional property `error/errorId` to the response with the `400` status
  - added the optional property `error/errorId` to the response with the `401` status
  - added the optional property `error/errorId` to the response with the `403` status
  - added the optional property `error/errorId` to the response with the `404` status
  - …1 more

[Change history](https://skmtc.dev/mobilecoach/apis/untitled-api/changes/api/memberships/:membershipId/purchases/export/post.md)

---

[API](https://skmtc.dev/mobilecoach/apis/untitled-api.md) · [All operations](https://skmtc.dev/mobilecoach/apis/untitled-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/mobilecoach/untitled-api/revisions/870f28ba2607/schema)
