Skip to main content
PATCH
Update link-type coupon

Authorizations

X-API-Key
string
header
required

Path Parameters

organization_id
string<shortuuid>
required

UUID of the organization that owns the records.

Required string length: 22
Pattern: ^[23456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{22}$
coupon_id
string<shortuuid>
required

ID of the coupon.

Required string length: 22
Pattern: ^[23456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{22}$

Body

application/json

Payload to change a GCN coupon. Send only the fields you are changing.

gcn
string | null

Global Coupon Number (AI 255), 13 to 25 digits. Unique across Closient.

Maximum string length: 25
Pattern: ^[^\x00]{0,25}$
title
string | null

Display title of the coupon (max 255 characters).

Maximum string length: 255
Pattern: ^[^\x00]{0,255}$
terms
string | null

The coupon's terms. Send an empty string to clear them.

Pattern: ^[^\x00]{0,}$
redemption_url
string | null

Where a shopper redeems the coupon: an absolute http(s) URL of at most 2048 characters. Send null to clear it.

Maximum string length: 2048
Pattern: ^[Hh][Tt][Tt][Pp][Ss]?://[^\x00-\x20\x7f/?#][^\x00-\x20\x7f]{0,2039}$
valid_from
string<date-time> | null

When the coupon becomes valid. Send null to clear.

valid_until
string<date-time> | null

When the coupon stops being valid. Send null to clear.

Response

OK

A GCN coupon as read from the API.

id
string<shortuuid>
required

URL-safe 22-character shortuuid encoding of the row's UUID primary key. Stable across the row's lifetime; suitable for sharing in URLs, log lines, and external SDK clients. Accepted on input as either the shortuuid form or the canonical UUID form (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).

Required string length: 22
Pattern: ^[23456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{22}$
gcn
string
required

Global Coupon Number (AI 255), 13 to 25 digits. Unique across Closient.

title
string
required

Display title of the coupon (max 255 characters).

terms
string
required

The coupon's terms; empty when none were given.

organization_id
string<shortuuid>
required

UUID of the organization that owns the coupon.

Required string length: 22
Pattern: ^[23456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{22}$
created
string<date-time>
required

ISO-8601 creation timestamp.

modified
string<date-time>
required

ISO-8601 last-modified timestamp.

redemption_url
string | null

Where a shopper redeems the coupon.

valid_from
string<date-time> | null

When the coupon becomes valid, or null.

valid_until
string<date-time> | null

When the coupon stops being valid, or null.