Subscriptions. 7 operations.
7 of them work. Each needs a bearer token with its scope. All operations.
Operations
POST/api/v1/subscriptions/{number}/cancelsubscriptions.cancelsubscriptions.write
POST/api/v1/subscriptions/{number}/changesubscriptions.changesubscriptions.write
GET/api/v1/subscriptions/{number}subscriptions.getsubscriptions.read
GET/api/v1/subscriptionssubscriptions.listsubscriptions.read
Read a page at a time: give limit (1 to 500; 100 when none is given) and after, the Next-Cursor of the page before. Follow the Link, rel next, to the rest.
Parameters
limitquery | integerThe most subscriptions in the page: 1 to 500; 100 when the call gives no limit. The Next-Cursor and Link headers name the next page. |
afterquery | stringSee common parameters |
Answer
array of Subscription
Errors: 400, 401, 403, 405, 422, 429
curl -X GET -H "Authorization: Bearer $TOKEN" https://yourshop.example/api/v1/subscriptions
POST/api/v1/subscriptions/{number}/pausesubscriptions.pausesubscriptions.write
POST/api/v1/subscriptions/{number}/resumesubscriptions.resumesubscriptions.write
POST/api/v1/subscriptions/{number}/skipsubscriptions.skipsubscriptions.write
Schemas 10
Address
Address is a postal address in its fields and on one line: the domain's address, which the store's own address will take when the operations give store details.
cityrequired | string |
countryrequired | string |
country_namerequired | string |
linesrequired | array of string |
postal_coderequired | string |
provincerequired | string |
suburbrequired | string |
textrequired | string |
Buyer
Cadence
Cadence is how often a subscription delivers.
idrequired | string |
labelrequired | string |
Money
Money is an amount: in minor units of its ISO 4217 currency, and as the store displays it.
currencyrequired | string |
displayrequired | string |
minorrequired | integer |
PauseRequest
PauseRequest is a pause: until a date, YYYY-MM-DD in the store's time zone, from the start of that day; "" for until resumed.
untilrequired | string |
SavedCard
SavedCard is a card a gateway saved, as it described it.
brandrequired | string |
exp_monthrequired | integer |
exp_yearrequired | integer |
last4required | string |
Subscription
Subscription is a subscription as the owner sees it.
accountrequired | string |
actionsrequired | array of string |
anchorrequired | string (date-time) |
buyerrequired | Buyer |
cadencerequired | Cadence |
cadencesrequired | array of Cadence |
card | SavedCard |
eventsrequired | array of SubscriptionEvent |
gatewayrequired | string |
next_due | string (date-time) |
numberrequired | integer |
option_valuesrequired | array of string |
ordersrequired | array of integer |
periodsrequired | integer |
pricerequired | Money |
productrequired | string |
quantityrequired | integer |
resume_at | string (date-time) |
skurequired | string |
statusrequired | string |
SubscriptionChange
SubscriptionChange is a subscription as an operation left it, and whether the operation changed it.
changedrequired | boolean |
subscriptionrequired | Subscription |
SubscriptionChangeRequest
SubscriptionChangeRequest is a change of a subscription: each field set is changed, each absent kept.
address | string |
cadence | string |
quantity | integer |
sku | string |
SubscriptionEvent
SubscriptionEvent is one change of a subscription.
actorrequired | string |
atrequired | string (date-time) |
reasonrequired | string |
statusrequired | string |
Made from engine/internal/openapi/openapi.json at commit 6c4cbd921. The contract-only operations come from the engine’s stub file, engine/internal/ops.