OpenCourt Developers
API ReferenceCustomers

Get a customer

GET/v1/customers/{id}

Fetch a single customer by id. Returns 404 if the id is not a customer of the club tied to your API key (so it never reveals whether another club has that customer).

An archived customer is returned here, with archived_at set — a link you stored does not break when the club archives someone. Only the LIST hides them by default.

Authorization

bearerAuth
AuthorizationBearer <token>

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

In: header

Path Parameters

id*string

The customer id.

Query Parameters

include?string

Pass ended_subscriptions to also include ended / cancelled / expired subscriptions. Unknown values are ignored.

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://api.getopencourt.com/v1/customers/3f29c4a1-7b6d-4e52-9c81-2a4b6d8e0f13"
{
  "id": "3f29c4a1-7b6d-4e52-9c81-2a4b6d8e0f13",
  "object": "customer",
  "email": "sarah.chen@gmail.com",
  "first_name": "Sarah",
  "last_name": "Chen",
  "phone": "+15551234567",
  "first_became_customer_at": "2026-01-15T14:30:00.000Z",
  "updated_at": "2026-02-02T09:12:00.000Z",
  "archived_at": null,
  "subscriptions": [
    {
      "id": "a1b2c3d4-5e6f-4708-9192-a3b4c5d6e7f8",
      "object": "subscription",
      "customer_id": "3f29c4a1-7b6d-4e52-9c81-2a4b6d8e0f13",
      "type": "membership",
      "status": "active",
      "product": {
        "id": "d4c3b2a1-6f5e-4807-8291-f8e7d6c5b4a3",
        "name": "Gym Access Membership",
        "slug": "gym-access"
      },
      "plan": {
        "id": "f8e7d6c5-b4a3-4019-8273-6f5e4d3c2b1a",
        "name": "Gym Access — Monthly"
      },
      "current_period_end": "2026-07-09T00:00:00.000Z",
      "trial_end": null,
      "next_payment_at": "2026-07-09T00:00:00.000Z",
      "cancel_at_period_end": false,
      "frozen_until": null,
      "started_at": "2026-01-09T00:00:00.000Z",
      "canceled_at": null,
      "updated_at": "2026-06-14T17:03:10.000Z"
    }
  ]
}
{
  "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"
  }
}