Create a coupon
curl --request POST \
--url https://api.spacebring.com/discounts/coupons/v1 \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"coupon": {
"limitedItems": {
"enabled": true,
"values": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
},
"limitedRedemption": {
"enabled": true,
"value": 123
},
"locationRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"productTypes": [],
"amountOff": 1,
"durationInMonths": 1,
"enabledForCredits": true,
"percentOff": 50
}
}
'{
"coupon": {
"amountOff": 123,
"currencyCode": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"limitedItems": {
"enabled": true,
"values": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>"
}
]
},
"limitedRedemption": {
"enabled": true,
"usage": 123,
"value": 123
},
"productTypes": [],
"createDate": "2023-11-07T05:31:56Z",
"deleteDate": "2023-11-07T05:31:56Z",
"durationInMonths": 123,
"enabledForCredits": true,
"locationRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"networkRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"percentOff": 123
}
}Discounts
Create a coupon
Create a coupon.
OAuth
Required scopes:invoicesPOST
/
discounts
/
coupons
/
v1
Create a coupon
curl --request POST \
--url https://api.spacebring.com/discounts/coupons/v1 \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"coupon": {
"limitedItems": {
"enabled": true,
"values": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
},
"limitedRedemption": {
"enabled": true,
"value": 123
},
"locationRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"productTypes": [],
"amountOff": 1,
"durationInMonths": 1,
"enabledForCredits": true,
"percentOff": 50
}
}
'{
"coupon": {
"amountOff": 123,
"currencyCode": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"limitedItems": {
"enabled": true,
"values": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>"
}
]
},
"limitedRedemption": {
"enabled": true,
"usage": 123,
"value": 123
},
"productTypes": [],
"createDate": "2023-11-07T05:31:56Z",
"deleteDate": "2023-11-07T05:31:56Z",
"durationInMonths": 123,
"enabledForCredits": true,
"locationRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"networkRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"percentOff": 123
}
}Authorizations
BasicAuthOAuth2
See our authentication documentation for how to authorize your requests
Headers
The id of the network. Required when using bearer token authentication
Body
application/json
Coupon to create.
Show child attributes
Show child attributes
Response
Created
Show child attributes
Show child attributes
Was this page helpful?
⌘I