Skip to main content
POST
/
products
/
{productId}
/
subscription_method
/
options
Create subscription method option
curl --request POST \
  --url https://app.supercycle.com/api/v1/products/{productId}/subscription_method/options \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "id": 123,
  "name": "<string>",
  "recurringPriceCents": 123,
  "checkoutPriceCents": 123,
  "billingInterval": "1.month",
  "minimumTerm": "1.month",
  "variantApplicationType": "all",
  "marketApplicationType": "all",
  "conditionApplicationType": "all",
  "_destroy": true
}
'
{
  "id": 123,
  "name": "<string>",
  "recurringPriceCents": 123,
  "checkoutPriceCents": 123,
  "billingInterval": "1.month",
  "minimumTerm": "1.month",
  "depositVariantShopifyId": 123,
  "variantApplicationType": "all",
  "marketApplicationType": "all",
  "conditionApplicationType": "all",
  "variantApplicationShopifyIds": [
    123
  ],
  "marketApplicationShopifyIds": [
    123
  ],
  "conditionApplicationIds": [
    123
  ],
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

productId
integer<int64>
required

The Shopify product ID

Body

application/json
id
integer<int64>

ID of an existing option to update. Omit when creating a new option.

name
string
recurringPriceCents
integer

Recurring price in cents.

checkoutPriceCents
integer

Initial checkout price in cents. Can differ from recurringPriceCents for introductory pricing.

billingInterval
string

Billing interval in N.unit format. Valid units: second, minute, hour, day, week, month, year.

Pattern: ^\d+\.(second|minute|hour|day|week|month|year)$
Example:

"1.month"

minimumTerm
string

Minimum rental term in N.unit format. Valid units: second, minute, hour, day, week, month, year.

Pattern: ^\d+\.(second|minute|hour|day|week|month|year)$
Example:

"1.month"

variantApplicationType
enum<string>

Whether this option applies to all variants or only a specific subset. Defaults to 'all'.

Available options:
all,
some
marketApplicationType
enum<string>

Whether this option applies to all markets or only a specific subset. Defaults to 'all'.

Available options:
all,
some
conditionApplicationType
enum<string>

Whether this option applies to all item conditions or only a specific subset. Defaults to 'all'.

Available options:
all,
some
_destroy
boolean

When true and id is provided, deletes this option from the subscription method.

Response

The created subscription method option

id
integer<int64>
required
name
string
required
recurringPriceCents
integer
required

Recurring price in cents.

checkoutPriceCents
integer
required

Initial checkout price in cents. Can differ from recurringPriceCents for introductory pricing.

billingInterval
string
required

Billing interval in N.unit format. Valid units: second, minute, hour, day, week, month, year.

Pattern: ^\d+\.(second|minute|hour|day|week|month|year)$
Example:

"1.month"

minimumTerm
string
required

Minimum rental term in N.unit format. Valid units: second, minute, hour, day, week, month, year.

Pattern: ^\d+\.(second|minute|hour|day|week|month|year)$
Example:

"1.month"

depositVariantShopifyId
integer<int64> | null

Shopify variant ID of the deposit product variant associated with this option, if any.

variantApplicationType
enum<string>

Whether this option applies to all variants or only those listed in variantApplicationShopifyIds.

Available options:
all,
some
marketApplicationType
enum<string>

Whether this option applies to all markets or only those listed in marketApplicationShopifyIds.

Available options:
all,
some
conditionApplicationType
enum<string>

Whether this option applies to all item conditions or only those listed in conditionApplicationIds.

Available options:
all,
some
variantApplicationShopifyIds
integer<int64>[]

Shopify variant IDs this option applies to. Only relevant when variantApplicationType is 'some'.

marketApplicationShopifyIds
integer<int64>[]

Shopify market IDs this option applies to. Only relevant when marketApplicationType is 'some'.

conditionApplicationIds
integer<int64>[]

Internal Supercycle condition IDs this option applies to. Only relevant when conditionApplicationType is 'some'.

createdAt
string<date-time>
updatedAt
string<date-time>