Create Coupon
Path parameters
-
shopId
integer(int32) Required
Body
-
name
string Required Minimum length is
1
. -
note
string | null Maximum length is
1024
. -
discount
number(double) Required -
isFixed
boolean Required -
startDate
string(date-time) | null -
endDate
string(date-time) | null -
restrictToProducts
array[integer(int64)] | null -
restrictToGateways
array[integer(int32)] | null " The list of supported payment gateways. CoinbaseCommerce = 0 Stripe = 1 PayPal = 2 CashApp = 3 PayPalFf = 4 VirtualPayments = 5 Square = 6
"
Values are
0
,1
,2
,3
,4
,6
,7
,8
, or9
. -
maxUses
integer(int32) | null
POST
/self/{shopId}/coupons
curl \
-X POST https://dev.sellpass.io/self/{shopId}/coupons \
-H "Authorization: $API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"string","note":"string","discount":42.0,"isFixed":true,"startDate":"2023-05-04T09:42:00+00:00","endDate":"2023-05-04T09:42:00+00:00","restrictToProducts":[42],"restrictToGateways":[0],"maxUses":42}'
Request example
{
"name": "string",
"note": "string",
"discount": 42.0,
"isFixed": true,
"startDate": "2023-05-04T09:42:00+00:00",
"endDate": "2023-05-04T09:42:00+00:00",
"restrictToProducts": [
42
],
"restrictToGateways": [
0
],
"maxUses": 42
}
Request examples
{
"name": "string",
"note": "string",
"discount": 42.0,
"isFixed": true,
"startDate": "2025-05-04T09:42:00Z",
"endDate": "2025-05-04T09:42:00Z",
"restrictToProducts": [
42
],
"restrictToGateways": [
0
],
"maxUses": 42
}