Skip to main content
POST
/
subscriptions
/
{subscriptionId}
/
items
cURL
curl --request POST \
  --url https://api.juo.io/admin/v1/subscriptions/{subscriptionId}/items \
  --header 'Content-Type: application/json' \
  --header 'X-Juo-Admin-Api-Key: <api-key>' \
  --header 'X-Tenant-ID: <x-tenant-id>' \
  --data '
{
  "variant": "<string>",
  "quantity": 2,
  "price": 1,
  "recurringCycleLimit": "<unknown>"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "resource": "subscription-item",
  "title": "<string>",
  "subtitle": "<unknown>",
  "quantity": 2,
  "totalPrice": 1,
  "variant": "<string>",
  "recurringCycleLimit": "<unknown>",
  "canceledAt": "<unknown>"
}

Authorizations

X-Juo-Admin-Api-Key
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
variant
string
required
Minimum string length: 1
quantity
integer
required
Required range: x >= 1
price
number

Set a custom base price for the variant that will be used before subscription discounts are applied. If not specified, the variant's regular price will be used.

Required range: x >= 0
recurringCycleLimit
null | integer

The number of billing cycles for which this item will be applied. After the recurring cycle limit is met the item 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-item
title
string
required
Minimum string length: 1
subtitle
null | string
required

Matches the variant title in most cases

Minimum string length: 1
quantity
integer
required
Required range: x >= 1
totalPrice
number
required

Final item price including all discounts and taxes

Required range: x >= 0
variant
required

This field is expandable.

Minimum string length: 1
recurringCycleLimit
null | integer
required

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

Required range: x >= 1
canceledAt
null | string<date-time>
required

Cancellation date of the item.