POST
/
admin
/
v1
/
subscriptions
/
{subscriptionId}
/
cancel
curl --request POST \
  --url https://api.juo.io/admin/v1/subscriptions/{subscriptionId}/cancel \
  --header 'Content-Type: application/json' \
  --header 'X-Juo-Admin-Api-Key: <api-key>' \
  --data '{
  "cancellationReason": "<string>",
  "notifyCustomer": true
}'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "resource": "subscription",
  "serial": "<string>",
  "status": "active",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "canceledAt": null,
  "customer": "<string>",
  "nextBillingDate": null,
  "currentCycle": 1,
  "items": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "resource": "subscription-item",
      "title": "<string>",
      "subtitle": null,
      "quantity": 2,
      "totalPrice": 1,
      "variant": "<string>",
      "recurringCycleLimit": null
    }
  ],
  "discounts": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "resource": "subscription-discount",
      "title": null,
      "target": {
        "type": "shipping"
      },
      "value": {
        "amount": 123,
        "type": "fixed-amount",
        "appliesOnEachItem": true
      },
      "recurringCycleLimit": null
    }
  ],
  "paymentMethod": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "currencyCode": "<string>",
  "deliveryAddress": null,
  "deliveryMethod": null,
  "deliveryPrice": 1
}

Authorizations

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

Path Parameters

subscriptionId
string
required

The subscription identifier

Body

application/json
notifyCustomer
boolean
required

Choose whether to send notifications to customers when their subscription is canceled.

cancellationReason
string
Minimum length: 1

Response

200 - application/json
Default Response
id
string
required
resource
enum<string>
required
Available options:
subscription
serial
string
required

Unique serial number that increments sequentially with each new subscription within a store.

Minimum length: 1
status
enum<string>
required
Available options:
active,
paused,
canceled,
failed,
expired
createdAt
string
required

Purchase date of the subscription.

updatedAt
string
required

Last update date of the subscription.

canceledAt
string | null
required

Cancellation date of the subscription.

customer
required

This field is expandable.

Minimum length: 1
nextBillingDate
string | null
required

The next billing date determines when the renewal process begins its billing phase. When billing succeeds, it creates one order—or multiple orders for prepaid subscriptions.

currentCycle
integer
required

The subscription's billing cycle count. It starts at 0 (before the first billing is completed), changes to 1 (after one billing is completed), and increases by 1 with each subsequent billing.

Required range: x >= 0
items
object[]
required
discounts
object[]
required
paymentMethod
required

This field is expandable.

currencyCode
string
required

The currency that applies to both item prices and delivery price.

Required string length: 3
deliveryAddress
object | null
required
deliveryMethod
object | null
required
deliveryPrice
number
required

The delivery price for the upcoming renewal.

Required range: x >= 0