> ## 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.

# Find open and failed Orders

> Build a support list of purchases that have not succeeded.

Find Orders that are currently open or failed and show their age, Offer and customer. This report can support a manual follow-up.

## Request

<RequestExample>
  ```graphql theme={null}
  {
    orders(status: { equals: [open, failed] }) {
      id status createdOn closedOn amountNetCharge
      student { fullName email }
      offerSnapshot { name }
    }
  }
  ```
</RequestExample>

<ResponseExample>
  ```json Illustrative response theme={null}
  {
    "data": {
      "orders": [
        {
          "id": "55555555-5555-4555-8555-555555555555",
          "status": "open",
          "createdOn": 1788220800000,
          "closedOn": null,
          "amountNetCharge": 0,
          "student": {
            "fullName": "Jamie Smith",
            "email": "student@example.com"
          },
          "offerSnapshot": {
            "name": "Drawing Essentials"
          }
        }
      ]
    }
  }
  ```
</ResponseExample>

## Use the result

```javascript theme={null}
const now = Date.now();
const rows = response.data.orders.map(order => ({
  orderId: order.id, status: order.status, customer: order.student?.email ?? null,
  offer: order.offerSnapshot.name,
  hoursSinceCreated: Math.max(0, Math.floor((now - order.createdOn) / 3600000))
})).sort((a, b) => b.hoursSinceCreated - a.hoursSinceCreated);
```

The request returns all current open and failed Orders, with age measured from creation. It has no date or list limit. Use the list for manual review: these states can have several causes, and `amountNetCharge` represents an amount on the Order rather than a completed payment.


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