Subscriptions

Subscribe

Create a subscription for the current user.

put/subscription

Request body

idstring required

Unique object identifier. The format and length of IDs may change over time.

productVariantIDstring required

ID of the product variant being subscribed to.

quantityinteger required

Quantity of the subscription.

addressIDstring required

ID of the shipping address used for the subscription.

cardIDstring required

ID of the card used for the subscription.

frequency'fixed' | 'daily' | 'weekly' | 'monthly' | 'yearly' required

Frequency of the subscription.

Example request

{
  "id": "sub_XXXXXXXXXXXXXXXXXXXXXXXXX",
  "productVariantID": "var_XXXXXXXXXXXXXXXXXXXXXXXXX",
  "quantity": 1,
  "addressID": "shp_XXXXXXXXXXXXXXXXXXXXXXXXX",
  "cardID": "crd_XXXXXXXXXXXXXXXXXXXXXXXXX",
  "frequency": "monthly"
}

Response

Subscription was created successfully.

data'ok' required

Changes