# Products

Source: https://docs.globagift.io/docs/api/reference/products
Description: Gift card products: currency, amount range, availability and status.


## Create a gift card product

`POST /v1/card-products`

Authentication: Merchant API key (`Authorization: Bearer gg_...`)

Retries: not idempotent. After an unclear failure, read the current state before trying again.

Request body:

- `name` (string, required)
- `currency` (string, required)
- `denominations` (array of integer)
- `min_amount` (integer)
- `max_amount` (integer)
- `expiry_months` (integer)
- `available_from` (string (date))
- `available_to` (string (date))
- `status` (string: draft, active)

Responses:

- 201: Card product created
- 400: Validation failed
- 401: Authentication failed
- 403: Authenticated caller lacks permission or the account is unavailable
- default: Unexpected server error

## List card products for the authenticated merchant

`GET /v1/card-products`

Authentication: Merchant API key (`Authorization: Bearer gg_...`)

Parameters:

- `limit` (query, integer): Page size. Supplying limit or offset returns {data, total, limit, offset}; omitting both returns {data} only.
- `offset` (query, integer)
- `search` (query, string): Case-insensitive match on part of the product name.
- `status` (query, string: draft, active, paused, archived)
- `include_archived` (query, boolean): When status is not given, false (the default) leaves archived products out and true includes them.

Responses:

- 200: Card products
- 401: Authentication failed
- 403: Authenticated caller lacks permission or the account is unavailable
- default: Unexpected server error

## Get a single card product

`GET /v1/card-products/{id}`

Authentication: Merchant API key (`Authorization: Bearer gg_...`)

Parameters:

- `id` (path, required, string)

Responses:

- 200: Card product
- 401: Authentication failed
- 403: Authenticated caller lacks permission or the account is unavailable
- 404: Not found
- default: Unexpected server error

## Update a card product's name, amount band, or status

`PATCH /v1/card-products/{id}`

Authentication: Merchant API key (`Authorization: Bearer gg_...`)

Currency cannot be changed. Setting status back to active also clears paused_reason, which ends a pause applied when the product breached its daily issuance limit.

Retries: not idempotent. After an unclear failure, read the current state before trying again.

Parameters:

- `id` (path, required, string (uuid))

Request body:

- `name` (string)
- `min_amount` (integer)
- `max_amount` (integer)
- `available_from` ()
- `available_to` ()
- `status` (string: draft, active, paused, archived)

Responses:

- 200: Card product updated
- 400: Malformed body, or min_amount exceeds max_amount
- 401: Authentication failed
- 403: Authenticated caller lacks permission or the account is unavailable
- 404: Not found (including another merchant's product)
- default: Unexpected server error
