Skip to content

Get one programme

GET
/programs/{ref}

One programme of the workspace, by handle or by id: its id, handle, name, points label, whether it is active, and whether it is the default. The programme comes from the path; a program query parameter is ignored. A publishable key may call this endpoint, and the answer is cacheable. A publishable key that names a programme which is not active gets the 404 not_found an unknown programme gets; a secret key or an OAuth token gets it with active: false.

ref
required

The programme to read: its handle (for example club) or its lower-case id. A value that is neither is 400 invalid_request; a programme that is not this workspace’s is 404 not_found.

string

The programme to read: its handle (for example club) or its lower-case id. A value that is neither is 400 invalid_request; a programme that is not this workspace’s is 404 not_found.

The programme.

object
id
required

The programme’s id. It never changes; pass it as program to act in this programme whatever its handle becomes.

string format: uuid
handle
required

The programme’s handle, unique within the workspace. Pass it as program.

string
Example
copperline
name
required

The programme name the merchant chose. Null until the merchant sets one.

string | null
Example
Copperline Club
points_label
required

The merchant’s display label for points in this programme; points until the merchant sets one. The same value GET /v1/rewards returns.

string
Example
points
active
required

Whether the programme is the default or holds a sales-channel claim. Always true for a publishable key, which cannot see an inactive programme.

boolean
is_default
required

Whether this is the workspace’s default programme: the one an order with no claim routes to.

boolean

The ref is not a lower-case programme id or a programme handle.

object
error
required
object
code
required
string
Example
not_found
message
required
string
details
request_id
required
string
Example
req_9f8e7d6c5b4a3210

Missing or invalid API key or OAuth credential.

object
error
required
object
code
required
string
Example
not_found
message
required
string
details
request_id
required
string
Example
req_9f8e7d6c5b4a3210

The ref names no programme of this workspace, or a publishable key named a programme that is not active (not_found).

object
error
required
object
code
required
string
Example
not_found
message
required
string
details
request_id
required
string
Example
req_9f8e7d6c5b4a3210