Member Hub · Documentation
API Reference
OpenAPI documentation generated from Zod schemas. Documents GET /api/v1/member/lookup and published admin-adjacent public endpoints. Serves spec JSON and an interactive explorer.
Specification
Generated from Zod schemas via zod-to-openapi. Machine-readable JSON is available at /api/openapi.json.
Carrick Member Hub API
Internal lookup API for Member Hub Phase 4. Commerce7 is the source of truth; Postgres is a reverse index cache.
OpenAPI 3.0.3v1.0.01 endpoint2 security schemes
Servers
Base URLs defined in the published spec.
/
Endpoints
Published admin-adjacent public endpoints documented in the OpenAPI spec.
GET
/api/v1/member/lookup
Member lookup by QR token
Internal member lookup by QR token. Serves members_index only — never calls Commerce7 live.
Parameters
| Name | In | Required | Description | Example |
|---|---|---|---|---|
| qr | query | Yes | ABCDEFGHIJKLMNOPQRSTUVWX |
Responses
| Status | Description | Schema |
|---|---|---|
| 200 | Lookup result | LookupResponse |
| 400 | Invalid request | ApiError |
| 401 | Unauthorized | ApiError |
Bearer tokenHeader X-API-Key
Security schemes
Authentication options referenced by published endpoints.
apiKeyAuth
apiKey (header: X-API-Key)Internal API key for service-to-service lookup
X-API-Key: <value>
bearerAuth
http (bearer)Clerk staff session token or internal API key
Authorization: Bearer <token>
Interactive explorer
Send live requests against published endpoints. Authentication is required for lookup — expect 401 without valid credentials.
Try it out
Select an operation, fill parameters, and inspect the response.
GET /api/v1/member/lookup?qr=ABCDEFGHIJKLMNOPQRSTUVWX
OpenAPI JSON
Full machine-readable document served from /api/openapi.json.
Spec document
Copy for Postman, Bruno, or codegen tooling.
{
"openapi": "3.0.3",
"info": {
"title": "Carrick Member Hub API",
"version": "1.0.0",
"description": "Internal lookup API for Member Hub Phase 4. Commerce7 is the source of truth; Postgres is a reverse index cache."
},
"servers": [
{
"url": "/"
}
],
"components": {
"securitySchemes": {
"bearerAuth": {
"type": "http",
"scheme": "bearer",
"description": "Clerk staff session token or internal API key"
},
"apiKeyAuth": {
"type": "apiKey",
"in": "header",
"name": "X-API-Key",
"description": "Internal API key for service-to-service lookup"
}
},
"schemas": {
"LookupOkResponse": {
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"ok"
]
},
"membershipType": {
"type": "string",
"enum": [
"wine",
"social"
],
"description": "Effective membership type after Wine Club precedence (dual maps to wine)"
},
"tier": {
"type": "string",
"nullable": true
},
"c7CustomerId": {
"type": "string"
}
},
"required": [
"status",
"membershipType",
"tier",
"c7CustomerId"
]
},
"LookupResponse": {
"oneOf": [
{
"$ref": "#/components/schemas/LookupOkResponse"
},
{
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"unknown"
]
}
},
"required": [
"status"
]
},
{
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"revoked"
]
}
},
"required": [
"status"
]
},
{
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"inactive"
]
}
},
"required": [
"status"
]
},
{
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"deactivated"
]
}
},
"required": [
"status"
]
}
]
},
"ApiError": {
"type": "object",
"properties": {
"error": {
"type": "string"
}
},
"required": [
"error"
]
}
},
"parameters": {}
},
"paths": {
"/api/v1/member/lookup": {
"get": {
"description": "Internal member lookup by QR token. Serves members_index only — never calls Commerce7 live.",
"summary": "Member lookup by QR token",
"security": [
{
"bearerAuth": []
},
{
"apiKeyAuth": []
}
],
"parameters": [
{
"schema": {
"type": "string",
"minLength": 1,
"description": "Opaque base32 QR token value",
"example": "ABCDEFGHIJKLMNOPQRSTUVWX"
},
"required": true,
"name": "qr",
"in": "query"
}
],
"responses": {
"200": {
"description": "Lookup result",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LookupResponse"
}
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
}
}
}
}
}
}Related
Human-readable integration guide and raw OpenAPI export.