SubscriptionCancel
/rpc#SubscriptionCancelCustomers' subscriptions, their renewals, and cancelling one. A store API key can call it, unless the key is read-only.
Dashboard session cookie (name prefix __Host-sh), set by sign in and managed by the browser.
In: cookie
The store the seller acts on.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Value in
- "Request"
Correlates the response line with this request.
Value in
- "SubscriptionCancel"
Leave empty; the server prepends the HTTP request headers.
items <= 0Response Body
application/json
printf '%s\n' '{"_tag":"Request","id":"0","tag":"SubscriptionCancel","payload":{"subscriptionId":"<uuid>","atPeriodEnd":true},"headers":[]}' | curl -X POST "$NOVINZO_API/rpc" \ -H "Content-Type: application/ndjson" \ -H "Authorization: Bearer $NOVINZO_API_KEY" \ --data-binary @-{ "_tag": "Exit", "requestId": "string", "exit": { "_tag": "Success", "value": { "subscriptionId": "string", "storeUserId": "string", "customerEmail": "string", "status": "incomplete", "interval": { "unit": "day", "count": 1 }, "collection": "automatic", "renewalTotal": { "amountMinorUnits": "string", "currency": "AED" }, "currentPeriodEnd": "string", "cancelAtPeriodEnd": true, "createdAt": "string", "items": [ { "productId": "string", "productVariantId": "string", "productName": "string", "variantName": "string", "quantity": -9007199254740991, "unitPrice": { "amountMinorUnits": "string", "currency": "AED" } } ], "currentPeriodStart": "string", "graceEndsAt": "string", "cancelledAt": "string", "cancelledBy": "buyer", "endedAt": "string", "savedMethod": "string", "consentText": "string", "consentedAt": "string", "firstOrderId": "string", "renewals": [ { "renewalId": "string", "periodIndex": -9007199254740991, "status": "open", "attempts": -9007199254740991, "nextAttemptAt": "string", "orderId": "string", "orderStatus": "draft", "createdAt": "string" } ] } }}StorefrontGetVariantAvailability POST
Product detail and live variant availability. Routed to the storefront RPC server by the `x-storefront-request: true` header. The store is resolved from the merchant domain's `Host`, so call it through the storefront route `POST https://<store-domain>/api/products/availability`, which forwards the shopper's cookies.
SubscriptionGet POST
Customers' subscriptions, their renewals, and cancelling one. A store API key can call it, a read-only one included.
