Баримт бичиг / API лавлах
Хөнгөлөлтийн код
Түншийн түгээх код.
GET/v1/workspaces/{workspaceId}/discount-code-validation
Hosted validation for the custom provider flow: the checkout asks whether a code is live and gets the partner, link and discount terms. Key-protected like the rest of the API.
Параметр (2)
| Нэр | Байрлал | Төрөл | Заавал | Тайлбар |
|---|---|---|---|---|
workspaceId | path | string | тийм | |
code | query | string | тийм |
GET/v1/workspaces/{workspaceId}/discount-codes
List discount codes of the program, newest first. pageSize max 100.
Параметр (6)
| Нэр | Байрлал | Төрөл | Заавал | Тайлбар |
|---|---|---|---|---|
workspaceId | path | string | тийм | |
partnerId | query | string | ||
discountId | query | string | ||
code | query | string | Exact code string (case-insensitive). | |
page | query | integer (int32) | ||
pageSize | query | integer (int32) |
POST/v1/workspaces/{workspaceId}/discount-codes
Create a discount code for a partner link. 422 when the group has no discount or the link is not the partner's, 409 when the link has a code or the string is taken.
Параметр (1)
| Нэр | Байрлал | Төрөл | Заавал | Тайлбар |
|---|---|---|---|---|
workspaceId | path | string | тийм |
Хүсэлтийн бие (CreateCode)
| Нэр | Төрөл | Заавал | Тайлбар |
|---|---|---|---|
partnerId | string | тийм | |
linkId | string | тийм | |
code | string | Up to 100 characters of letters, digits, `-` and `_`; generated from the partner name when omitted. |
DELETE/v1/workspaces/{workspaceId}/discount-codes/{idOrCode}
Delete a code by id or by code string; emits discount_code.deleted.
Параметр (2)
| Нэр | Байрлал | Төрөл | Заавал | Тайлбар |
|---|---|---|---|---|
workspaceId | path | string | тийм | |
idOrCode | path | string | тийм |