Skip to main content
POST
/
subscriptions
/
{subscriptionId}
/
discounts
cURL
curl --request POST \
  --url https://api.juo.io/customer/v1/subscriptions/{subscriptionId}/discounts \
  --header 'Content-Type: application/json' \
  --header 'X-Delegated-Token: <api-key>' \
  --header 'X-Tenant-ID: <x-tenant-id>' \
  --data '
{
  "code": "<string>"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "resource": "subscription-discount",
  "title": "<unknown>",
  "target": {
    "type": "shipping"
  },
  "value": {
    "amount": 123,
    "type": "fixed-amount",
    "appliesOnEachItem": true
  },
  "recurringCycleLimit": "<unknown>"
}

Authorizations

X-Delegated-Token
string
header
required

Headers

X-Tenant-ID
string
required

Unique identifier of the tenant in the system (usually a store identifier)

Path Parameters

subscriptionId
string<uuid>
required

The subscription identifier

Body

application/json
code
string
required

Discount code to apply

Response

200 - application/json

Default Response

id
string<uuid>
required
resource
enum<string>
required
Available options:
subscription-discount
title
null | string
required

The title of the discount shown to customers, typically displayed as a discount code.

Minimum string length: 1
target
object
required
value
object
required
recurringCycleLimit
null | integer
required

The number of billing cycles for which this discount will be applied. After the recurring cycle limit is met the discount will be removed from the subscription.

Required range: x >= 1