OpenCourt Developers
API ReferenceOrders

List orders

GET/v1/orders

Returns the club's orders, oldest first. Flat by default — totals only (amount is in minor units, e.g. cents); pass expand[]=line_items to itemize every order on the page. Incomplete/abandoned pending orders are never included. Cursor-paginate via starting_after. Narrow with status, created_after, and created_before. Scoped to the club tied to your API key.

Date basis. created_after / created_before filter on the order creation timestamp (UTC). A refunded order is reflected in its status and totals, not as a separate record. Re-fetching a past window can therefore return the same rows with a changed status and an unchanged amount. To see refunds as dated money movements, use GET /v1/transactions.

Authorization

bearerAuth
AuthorizationBearer <token>

Your club API key. Send it as Authorization: Bearer oc_live_….

In: header

Query Parameters

limit?integer

Number of results, 1–100 (default 25).

Range1 <= value <= 100
starting_after?string

Cursor: the id of the last order from the previous page.

status?string

Only orders with this status.

Value in"paid" | "failed" | "payment_failed" | "refunded" | "partial_refund" | "canceled"
expand[]?string

Pass line_items to add each order’s line_items (GET /v1/orders/{id} always has them). expand=line_items is accepted too. Unknown values are ignored.

Value in"line_items"
created_after?string

ISO-8601 lower bound on the ORDER creation timestamp (inclusive). Not the refund date — a refund never moves an order out of the window that contains its sale.

created_before?string

ISO-8601 upper bound on the ORDER creation timestamp (inclusive). Not the refund date — a refund never moves an order out of the window that contains its sale.

Header Parameters

OpenCourt-Version?string

The API version to serve this request at, e.g. 2026-11-01. Omit it to use the version your API key is pinned to. An unknown or retired version is a 400 (invalid_api_version / api_version_retired).

Value in"2026-11-01"

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://api.getopencourt.com/v1/orders"
{
  "object": "list",
  "data": [
    {
      "id": "d4e5f6a7-8b9c-4d0e-a1b2-c3d4e5f6a7b8",
      "object": "order",
      "customer_id": "3f29c4a1-7b6d-4e52-9c81-2a4b6d8e0f13",
      "status": "paid",
      "amount": 0,
      "currency": "USD",
      "amount_refunded": 0,
      "refunds": [],
      "created_at": "2026-01-15T14:30:00.000Z",
      "line_items": [
        {
          "id": "8a1f0c52-3d4e-4b6a-9c7d-1e2f3a4b5c6d",
          "object": "order_line_item",
          "description": "Court 1 — 60 min",
          "category": "space_booking",
          "quantity": 1,
          "unit_price": 4000,
          "subtotal": 4000,
          "adjustments": [
            {
              "kind": "booking_pass",
              "amount": -4000,
              "pass_redemption_id": "5b6c7d8e-9f0a-4b1c-8d2e-3f4a5b6c7d8e",
              "promo_code": null,
              "is_estimated": false
            }
          ],
          "adjustments_total": -4000,
          "sales_tax": 0,
          "platform_fee": 0,
          "absorbed_platform_fee": 0,
          "total": 0,
          "currency": "USD",
          "event_id": "7c8d9e0f-1a2b-4c3d-9e4f-5a6b7c8d9e0f",
          "booking_id": "7c8d9e0f-1a2b-4c3d-9e4f-5a6b7c8d9e0f",
          "customer_id": "3f29c4a1-7b6d-4e52-9c81-2a4b6d8e0f13"
        }
      ]
    }
  ],
  "has_more": true,
  "url": "string"
}
{
  "error": {
    "type": "string",
    "code": "string",
    "message": "string",
    "param": "string",
    "request_id": "string"
  }
}
{
  "error": {
    "type": "string",
    "code": "string",
    "message": "string",
    "param": "string",
    "request_id": "string"
  }
}
{
  "error": {
    "type": "string",
    "code": "string",
    "message": "string",
    "param": "string",
    "request_id": "string"
  }
}