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

> ## Agent Instructions
> When building or modifying an integration with the Creatora API, start with https://www.help.creatora.io/en/api/build-with-ai.md. Retrieve the current GraphQL SDL from https://api.creatora.io/sdl before relying on API schema information.

# Get sales for a period

> List successful paid Orders completed between two dates.

Get successful paid purchases in a date range, with the customer, Offer and amount charged. Orders currently refunded or disputed and free acquisitions are excluded.

This example uses **September 1, 2026 at 00:00 UTC** (`1788220800000`) through **October 1, 2026 at 00:00 UTC**, exclusive (`1790812800000`). Replace both timestamps for your period and timezone. The request starts one millisecond earlier because the API date bounds are strict.

## Request

<RequestExample>
  ```graphql theme={null}
  {
    platform { currency { name symbol } }
    orders(status: { equals: [succeeded] }, closedOn: { range: [1788220799999, 1790812800000] }) {
      id status closedOn amountNetCharge
      student { id fullName email }
      offerSnapshot { offerId name }
    }
  }
  ```
</RequestExample>

<ResponseExample>
  ```json Illustrative response theme={null}
  {
    "data": {
      "platform": {
        "currency": {
          "name": "EUR",
          "symbol": "\u20ac"
        }
      },
      "orders": [
        {
          "id": "55555555-5555-4555-8555-555555555555",
          "status": "succeeded",
          "closedOn": 1788224400000,
          "amountNetCharge": 80.0,
          "student": {
            "id": "33333333-3333-4333-8333-333333333333",
            "fullName": "Jamie Smith",
            "email": "student@example.com"
          },
          "offerSnapshot": {
            "offerId": "44444444-4444-4444-8444-444444444444",
            "name": "Drawing Essentials"
          }
        }
      ]
    }
  }
  ```
</ResponseExample>

## Use the result

```javascript theme={null}
const start = 1788220800000;
const end = 1790812800000;
const sales = response.data.orders.filter(order =>
  order.status === "succeeded" && order.closedOn !== null &&
  order.closedOn >= start && order.closedOn < end && order.amountNetCharge > 0
);
const report = {
  currency: response.data.platform.currency.name,
  count: sales.length,
  amountCharged: Number(sales.reduce((sum, order) => sum + order.amountNetCharge, 0).toFixed(2)),
  rows: sales.map(order => ({
    orderId: order.id, customer: order.student?.email ?? null,
    offer: order.offerSnapshot.name, amountCharged: order.amountNetCharge
  }))
};
```

The `closedOn` filter in the processing example selects completed purchases; the API date filter also returns Orders created in the period. The request has no list limit. For large reports, request shorter periods and deduplicate Orders by `id`. Amounts use the Platform currency. Manually registered Orders are included. A missing customer is retained as `null`. The report covers sales recorded in Creatora. Use payment-provider records for payment reconciliation.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.