Create order

Every time you want to send out a gift through Glede you need to create an order for it.

Send an Idempotency-Key for every logical order and reuse that key with the
same JSON body on retries, including after a timeout. A completed retry
returns the original 201 response, order ID and gift links without creating
another order or drawing funds again. Object property order does not matter;
array order and field values do. Keys are scoped to the authenticated business,
including across API key rotation, and are retained without automatic expiry.

Reusing a key with a different body returns 409. A concurrent request, or a
request whose outcome is uncertain after a failure, also returns 409. Retry
with the same key and body; if the conflict persists, contact support with
the reference in the error. Do not switch keys to bypass a conflict: the first
request may already have drawn funds or created the order. A request that is
rejected before any funds are drawn or the order is saved (for example an
unknown template or funding source, or missing invoice details) releases its
key: fix the cause and retry with the same key and body. Errors after that
point keep the key reserved until reconciled. A replay is the original
response, not a fresh view of an order that may since have been approved or
refunded.

The header is optional for backwards compatibility. Without it, every request
creates a new order; identical bodies and invoice references are not deduplicated.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
payment
object
string

The ID of the funding source to charge for this order. Use it instead of payment to pay by invoice. The funding source must belong to your own business.

number

The sending time of the gift in milliseconds since the Unix epoch. If not provided, the gift will be sent immediately.

string

The sender name of the gift. If not provided, the sender name of the template will be used. If no template is provided, the business name will be used.

string

The content of the message of the gift. If not provided, the greeting message of the template will be used.

recipients
array of objects
required

List of gift recipients. Each recipient can optionally include amount, scheduledSendingTime and greeting.message fields to override the default values from the template or request body.

recipients*
string

Used for personalizing and styling gifts. The template must belong to the business that owns your API key. An unknown template or a template owned by another business returns the same 404 response before funds are drawn or an order is created.

rewardOptions
array of strings
length ≥ 1

Restricts which reward types the recipient can choose for this order. If omitted, the business's default reward settings apply. Only the values you list are enabled — for example, passing ["PREPAID"] disables both donations and the multi-choice (closed-loop) cards for this order.

rewardOptions
Allowed:
customFields
array of objects
customFields
Headers
string
length between 1 and 128
^[A-Za-z0-9._:-]{1,128}$

Unique identifier for one logical order, such as a UUID. Reuse for all retries of that order; use a new key for a genuinely new order.

Responses

Language
Credentials
Bearer
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json