OpenCourt Developers
API ReferenceOrders

Get an order

GET/v1/orders/{id}

Fetch a single order by id, always with its line_items. Returns 404 if the id is not an order of the club tied to your API key.

Authorization

bearerAuth
AuthorizationBearer <token>

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

In: header

Path Parameters

id*string

The order id.

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/d4e5f6a7-8b9c-4d0e-a1b2-c3d4e5f6a7b8"
{
  "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"
    }
  ]
}
{
  "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"
  }
}