Skip to main content
PATCH
/
admin
/
v1
/
subscriptions
/
{subscriptionId}
/
discounts
/
{discountId}
cURL
curl --request PATCH \
  --url https://api.juo.io/admin/v1/subscriptions/{subscriptionId}/discounts/{discountId} \
  --header 'Content-Type: application/json' \
  --header 'X-Juo-Admin-Api-Key: <api-key>' \
  --data '{
  "target": {
    "type": "shipping"
  },
  "value": {
    "amount": 123,
    "type": "fixed-amount",
    "appliesOnEachItem": true
  },
  "recurringCycleLimit": null
}'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "resource": "subscription-discount",
  "title": null,
  "target": {
    "type": "shipping"
  },
  "value": {
    "amount": 123,
    "type": "fixed-amount",
    "appliesOnEachItem": true
  },
  "recurringCycleLimit": null
}

Authorizations

X-Juo-Admin-Api-Key
string
header
required

Path Parameters

subscriptionId
string<uuid>
required

The subscription identifier

discountId
string<uuid>
required

The subscription discount identifier

Body

application/json
target
object
  • Option 1
  • Option 2
value
object
  • Option 1
  • Option 2
recurringCycleLimit
integer | null

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

Response

200 - application/json

Default Response

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

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

Minimum length: 1
target
object
required
  • Option 1
  • Option 2
value
object
required
  • Option 1
  • Option 2
recurringCycleLimit
integer | null
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
I