プロモーションコードを作成する


プロモーションコードは、お客様がクーポンと引き換えることができるコードです。1つのクーポンに対して複数のコードを作成することができます。
エラー

すべての API エンドポイントに当てはまる エラー に加え、以下はプロモーションコードの作成時にのみ返されるエラーです。

ステータスコード エラーコード 説明
404 coupon.not-found 条件に合うクーポンが見つかりませんでした。正しい coupon id と API キーを使用してください。テストモードのオブジェクトには、テストキーを使用してのみアクセスすることができ、ライブモードのオブジェクトには、ライブキーを使用してのみアクセスできます。
409 promotion-code.exists このプロモーションコード {code} は既に存在しています。すべてのプロモーションコードが一意である必要があります。
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

Create Promotion Code

boolean
Defaults to false

Has the value true (default) if the promotion code is active and can be used, or the value false if it is not.

string
required
length between 1 and 80

The customer-facing code. Regardless of case, this code must be unique across all your promotion codes.

string
required

The unique identifier for the Coupon object.

string

Three-letter ISO currency code, in uppercase. Must be a supported currency.

integer

Time at which the Promotion Code expires. Measured in milliseconds since the Unix epoch.

boolean
Defaults to false

A Boolean indicating if the Promotion Code should only be redeemed for customers without any successful order with the merchant. Defaults to false if not set.

integer

Maximum number of times this Promotion Code can be redeemed, in total, across all customers, before it is no longer valid.

metadata
object

Set of up to 20 key-value pairs that you can attach to the object.

number

The minimum amount required to redeem this Promotion Code (e.g., the amount of the order must be ¥10,000 or more to be applicable).

boolean
Defaults to false

A Boolean indicating if the Promotion Code should only be redeemed once by any given customer. Defaults to false if not set.

Responses

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