Contains information about subscriptions for your store and data associated with them. Use these endpoints to get, remove, edit, or list subscriptions.
List Subscriptions
Retrieve a list of subscriptions.
Authorizations:
path Parameters
shop_identifier required | string Example: 123456 The unique identifier of the shop. |
query Parameters
subscription_status | any Enum: "active" "inactive" "processing" "scheduled" "paused" Example: subscription_status=active Status of the subscriptions returned. Multiple statuses can be passed as an array. |
bold_platform_customer_id | any Example: bold_platform_customer_id=1 Customer Id of the subscriptions returned. Multiple customer ids can be passed as an array. |
expand | string Value: "customer" Example: expand=customer Fields to expand on the subscription. Multiple fields can be passed as an array |
limit | integer Example: limit=5 Maximum number of results to be returned |
filter | string Example: filter=?filter=lt(next_order_datetime:2021-11-15T00:00:00Z)+gt(next_order_datetime:2021-10-31T00:00:00Z) Accepts filtering options as described on the Query & Pagination page. For example, to filter the next order date by a date interval, you could use the following parameter: |
cursor | string Example: cursor=?cursor= P3NpbmNlX2lkPTE1Mjc0Jm9yZGVyX2J5PWlkJm9yZGVyX2RpcmVjdGlvbj1kZXNj Returns the next page of results if supplied the |
Responses
Response samples
- 200
- 401
{- "subscriptions": [
- {
- "id": 1,
- "external_id": "string",
- "customer": "null",
- "shop_id": 1,
- "next_order_datetime": "2020-01-20T18:00:00Z",
- "next_payment_datetime": "2020-01-20T18:00:00Z",
- "next_processing_datetime": "2020-01-20T18:00:00Z",
- "subscription_status": "active",
- "status_changed_at": "2019-11-20T20:31:55Z",
- "payment_method_token": "jik1w6HrCn17CxXPcKwHTGqqvm8wLDd1PelY6k8mabglNmL8XKBnsde9PdgKZqnG",
- "payment_gateway_public_id": "jik1w6HrCn17CxXPcKwHTGqqvm8wLDd1PelY6k8mabglNmL8XKBnsde9PdgKZqnG",
- "payment_rrule": "DTSTART:20200120T180000Z\\nRRULE:FREQ=MONTHLY\\nEXDATE:20200220T180000Z",
- "payment_rrule_text": "Monthly",
- "order_rrule": "DTSTART:20200120T180000Z\\nRRULE:FREQ=MONTHLY\\nEXDATE:20200220T180000Z",
- "order_rrule_text": "Monthly",
- "last_payment_datetime": "2019-11-20T20:55:26Z",
- "last_order_datetime": "2019-11-20T20:55:26Z",
- "last_processed_datetime": "2019-11-20T20:55:26Z",
- "current_retries": 3,
- "charged_currency": "CAD",
- "base_to_charged_exchange_rate": 1,
- "base_currency": "CAD",
- "line_items": [
- {
- "id": 1,
- "subscription_id": 1,
- "platform_id": "ABC123",
- "platform_product_id": "1357908642",
- "platform_variant_id": "2468097531",
- "subscription_group_id": 1,
- "subscription_group_billing_rules_id": 1,
- "title": "Monthly Expansion Pack",
- "product_name": "Monthly Expansion Pack",
- "variant_name": "Default Title",
- "sku": "SKU-113-Red",
- "image": "",
- "quantity": 1,
- "price": 3500,
- "price_charged": 3200,
- "discounted_price": 3200,
- "discounted_price_charged": 3200,
- "full_price": 3200,
- "full_price_charged": 3200,
- "requires_shipping": false,
- "grams": 2200,
- "weight": 2.2,
- "weight_unit": "kg",
- "taxable": true,
- "discounts": [
- {
- "id": 1,
- "subscription_line_item_id": 1,
- "shop_id": 5,
- "full_price": 5,
- "discount_type": "percentage",
- "percentage_value": 10,
- "fixed_value": 0,
- "fixed_value_charged": 0,
- "description": "Subscription discount (10%) for Monthly Expansion Pack",
- "created_at": "2019-11-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z",
- "deleted_at": "2019-11-20T20:31:55Z"
}
], - "prepaid_metadata": {
- "id": 1,
- "line_item_id": 2,
- "prepaid_duration": 2,
- "current_recurrence_count": 2,
- "prepaid_continue": "no_continue"
}, - "line_item_attributes": [
- {
- "name": "size_preference",
- "value": "XL",
- "created_at": "2021-01-17T20:30:40Z",
- "updated_at": "2021-01-17T20:30:40Z",
- "subscription_id": 435989,
- "line_item_id": 45734
}
], - "created_at": "2019-11-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z"
}
], - "shipping_lines": [
- {
- "id": 36217,
- "name": "Standard Shipping",
- "code": "Standard Shipping",
- "price": 1000,
- "value": 1000,
- "value_charged": 1000,
- "tag": "Shipping",
- "created_at": "2019-10-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z",
- "subscription_id": 1
}
], - "billing_address": {
- "id": 1,
- "shop_identifier": "12345",
- "platform_id": "14",
- "customer_id": 2,
- "platform_type": "shopify",
- "platform_customer_id": "35",
- "first_name": "John",
- "last_name": "Doe",
- "company": "Example Company",
- "phone": "123-456-7890",
- "street1": "123 example st.",
- "street2": "101",
- "city": "Toronto",
- "province": "Ontario",
- "province_code": "ON",
- "country": "Canada",
- "country_code": "CA",
- "zip": "M5V 3L9",
- "is_default": true,
- "address_use": "billing",
- "address_source": "platform",
- "created_at": "2022-12-25T00:00:00Z",
- "updated_at": "2022-12-25T00:00:00Z",
- "deleted_at": "2022-12-25T00:00:00Z"
}, - "shipping_address": {
- "id": 1,
- "shop_identifier": "12345",
- "platform_id": "14",
- "customer_id": 2,
- "platform_type": "shopify",
- "platform_customer_id": "35",
- "first_name": "John",
- "last_name": "Doe",
- "company": "Example Company",
- "phone": "123-456-7890",
- "street1": "123 example st.",
- "street2": "101",
- "city": "Toronto",
- "province": "Ontario",
- "province_code": "ON",
- "country": "Canada",
- "country_code": "CA",
- "zip": "M5V 3L9",
- "is_default": true,
- "address_use": "billing",
- "address_source": "platform",
- "created_at": "2022-12-25T00:00:00Z",
- "updated_at": "2022-12-25T00:00:00Z",
- "deleted_at": "2022-12-25T00:00:00Z"
}, - "idempotency_key": "JwGdN55C4g1z5FXRO8Hp21CMxUxKyo6VcGSf3cUsjCgNyTtoeZcIsGM1We4p7pCe-0",
- "placed_at": "2012-11-20T20:31:55Z",
- "created_at": "2019-11-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z",
- "percent_discount": 10,
- "discount_code": "DISCOUNTCODE",
- "customer_id": 1697912,
- "billing_address_id": 11697812,
- "shipping_address_id": 11697812,
- "orders_processed": 1,
- "last_failure_code": "card_expired",
- "last_failure_details": {
- "message": "The order couldn't process because the card was declined."
}, - "last_failure_reason": "credit_card",
- "note": "Staff note",
- "order_note": "Customer note",
- "order_count": 1
}
], - "pagination": {
- "total": 15,
- "count": 10,
- "per_page": 10,
- "total_pages": 2,
- "next": "P3NpbmNlX2lkPTE1Mjc0Jm9yZGVyX2J5PWlkJm9yZGVyX2RpcmVjdGlvbj1kZXNj"
}
}
Create Subscription
For more information about this endpoint, refer to Create Subscriptions.
Authorizations:
path Parameters
shop_identifier required | string Example: 123456 The unique identifier of the shop. |
Request Body schema: application/jsonrequired
object | |
object |
Responses
Request samples
- Payload
{- "customer": {
- "first_name": "Jane",
- "last_name": "Doe",
- "phone": "12045551234",
- "notes": "Loyal customer"
}, - "subscription": {
- "idempotency_key": "legacy-id-21425",
- "next_order_datetime": "2021-05-21T08:00:00Z",
- "last_order_datetime": "2021-04-21T08:00:00Z",
- "subscription_status": "active",
- "order_rrule": "DTSTART;TZID=America/New_York:20240425T000000Z\nRRULE:FREQ=MONTHLY",
- "base_currency": "CAD",
- "charged_currency": "USD",
- "base_to_charged_exchange_rate": 0.79,
- "line_items": [
- {
- "platform_product_id": "1578934692",
- "platform_variant_id": "975285185",
- "quantity": 2,
- "price": 1000,
- "subscription_group_id": 123
}
], - "billing_address": {
- "first_name": "Jane",
- "last_name": "Doe",
- "company": "Bold Commerce",
- "phone": "12045551234",
- "street1": "123 Alphabet St.",
- "street2": "101",
- "city": "Austin",
- "province": "Texas",
- "province_code": "TX",
- "country": "United States",
- "country_code": "US",
- "zip": "78701"
}, - "shipping_address": {
- "first_name": "Jane",
- "last_name": "Doe",
- "company": "Bold Commerce",
- "phone": "12045551234",
- "street1": "123 Alphabet St.",
- "street2": "101",
- "city": "Austin",
- "province": "Texas",
- "province_code": "TX",
- "country": "United States",
- "country_code": "US",
- "zip": "78701"
}, - "external_id": "legacy-id-135798642",
- "placed_at": "2012-05-21T08:00:00Z",
- "payment_details": {
- "gateway_name": "Stripe Default Name",
- "gateway_customer_id": "cus_123456789",
- "gateway_payment_id": "card_123456"
}, - "discount_code": "DISCOUNTCODE",
- "note": "Staff note",
- "order_note": "Customer note",
- "order_count": 1
}
}
Response samples
- 200
- 401
- 422
{- "subscription": {
- "id": 1,
- "external_id": "string",
- "customer": "null",
- "shop_id": 1,
- "next_order_datetime": "2020-01-20T18:00:00Z",
- "next_payment_datetime": "2020-01-20T18:00:00Z",
- "next_processing_datetime": "2020-01-20T18:00:00Z",
- "subscription_status": "active",
- "status_changed_at": "2019-11-20T20:31:55Z",
- "payment_method_token": "jik1w6HrCn17CxXPcKwHTGqqvm8wLDd1PelY6k8mabglNmL8XKBnsde9PdgKZqnG",
- "payment_gateway_public_id": "jik1w6HrCn17CxXPcKwHTGqqvm8wLDd1PelY6k8mabglNmL8XKBnsde9PdgKZqnG",
- "payment_rrule": "DTSTART:20200120T180000Z\\nRRULE:FREQ=MONTHLY\\nEXDATE:20200220T180000Z",
- "payment_rrule_text": "Monthly",
- "order_rrule": "DTSTART:20200120T180000Z\\nRRULE:FREQ=MONTHLY\\nEXDATE:20200220T180000Z",
- "order_rrule_text": "Monthly",
- "last_payment_datetime": "2019-11-20T20:55:26Z",
- "last_order_datetime": "2019-11-20T20:55:26Z",
- "last_processed_datetime": "2019-11-20T20:55:26Z",
- "current_retries": 3,
- "charged_currency": "CAD",
- "base_to_charged_exchange_rate": 1,
- "base_currency": "CAD",
- "line_items": [
- {
- "id": 1,
- "subscription_id": 1,
- "platform_id": "ABC123",
- "platform_product_id": "1357908642",
- "platform_variant_id": "2468097531",
- "subscription_group_id": 1,
- "subscription_group_billing_rules_id": 1,
- "title": "Monthly Expansion Pack",
- "product_name": "Monthly Expansion Pack",
- "variant_name": "Default Title",
- "sku": "SKU-113-Red",
- "image": "",
- "quantity": 1,
- "price": 3500,
- "price_charged": 3200,
- "discounted_price": 3200,
- "discounted_price_charged": 3200,
- "full_price": 3200,
- "full_price_charged": 3200,
- "requires_shipping": false,
- "grams": 2200,
- "weight": 2.2,
- "weight_unit": "kg",
- "taxable": true,
- "discounts": [
- {
- "id": 1,
- "subscription_line_item_id": 1,
- "shop_id": 5,
- "full_price": 5,
- "discount_type": "percentage",
- "percentage_value": 10,
- "fixed_value": 0,
- "fixed_value_charged": 0,
- "description": "Subscription discount (10%) for Monthly Expansion Pack",
- "created_at": "2019-11-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z",
- "deleted_at": "2019-11-20T20:31:55Z"
}
], - "prepaid_metadata": {
- "id": 1,
- "line_item_id": 2,
- "prepaid_duration": 2,
- "current_recurrence_count": 2,
- "prepaid_continue": "no_continue"
}, - "line_item_attributes": [
- {
- "name": "size_preference",
- "value": "XL",
- "created_at": "2021-01-17T20:30:40Z",
- "updated_at": "2021-01-17T20:30:40Z",
- "subscription_id": 435989,
- "line_item_id": 45734
}
], - "created_at": "2019-11-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z"
}
], - "shipping_lines": [
- {
- "id": 36217,
- "name": "Standard Shipping",
- "code": "Standard Shipping",
- "price": 1000,
- "value": 1000,
- "value_charged": 1000,
- "tag": "Shipping",
- "created_at": "2019-10-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z",
- "subscription_id": 1
}
], - "billing_address": {
- "id": 1,
- "shop_identifier": "12345",
- "platform_id": "14",
- "customer_id": 2,
- "platform_type": "shopify",
- "platform_customer_id": "35",
- "first_name": "John",
- "last_name": "Doe",
- "company": "Example Company",
- "phone": "123-456-7890",
- "street1": "123 example st.",
- "street2": "101",
- "city": "Toronto",
- "province": "Ontario",
- "province_code": "ON",
- "country": "Canada",
- "country_code": "CA",
- "zip": "M5V 3L9",
- "is_default": true,
- "address_use": "billing",
- "address_source": "platform",
- "created_at": "2022-12-25T00:00:00Z",
- "updated_at": "2022-12-25T00:00:00Z",
- "deleted_at": "2022-12-25T00:00:00Z"
}, - "shipping_address": {
- "id": 1,
- "shop_identifier": "12345",
- "platform_id": "14",
- "customer_id": 2,
- "platform_type": "shopify",
- "platform_customer_id": "35",
- "first_name": "John",
- "last_name": "Doe",
- "company": "Example Company",
- "phone": "123-456-7890",
- "street1": "123 example st.",
- "street2": "101",
- "city": "Toronto",
- "province": "Ontario",
- "province_code": "ON",
- "country": "Canada",
- "country_code": "CA",
- "zip": "M5V 3L9",
- "is_default": true,
- "address_use": "billing",
- "address_source": "platform",
- "created_at": "2022-12-25T00:00:00Z",
- "updated_at": "2022-12-25T00:00:00Z",
- "deleted_at": "2022-12-25T00:00:00Z"
}, - "idempotency_key": "JwGdN55C4g1z5FXRO8Hp21CMxUxKyo6VcGSf3cUsjCgNyTtoeZcIsGM1We4p7pCe-0",
- "placed_at": "2012-11-20T20:31:55Z",
- "created_at": "2019-11-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z",
- "percent_discount": 10,
- "discount_code": "DISCOUNTCODE",
- "customer_id": 1697912,
- "billing_address_id": 11697812,
- "shipping_address_id": 11697812,
- "orders_processed": 1,
- "last_failure_code": "card_expired",
- "last_failure_details": {
- "message": "The order couldn't process because the card was declined."
}, - "last_failure_reason": "credit_card",
- "note": "Staff note",
- "order_note": "Customer note",
- "order_count": 1
}
}
Get Subscription
Retrieve a subscription by its id.
Authorizations:
path Parameters
shop_identifier required | string Example: 123456 The unique identifier of the shop. |
subscription_id required | integer The subscription identifier. |
Responses
Response samples
- 200
- 401
{- "subscription": {
- "id": 1,
- "external_id": "string",
- "customer": "null",
- "shop_id": 1,
- "next_order_datetime": "2020-01-20T18:00:00Z",
- "next_payment_datetime": "2020-01-20T18:00:00Z",
- "next_processing_datetime": "2020-01-20T18:00:00Z",
- "subscription_status": "active",
- "status_changed_at": "2019-11-20T20:31:55Z",
- "payment_method_token": "jik1w6HrCn17CxXPcKwHTGqqvm8wLDd1PelY6k8mabglNmL8XKBnsde9PdgKZqnG",
- "payment_gateway_public_id": "jik1w6HrCn17CxXPcKwHTGqqvm8wLDd1PelY6k8mabglNmL8XKBnsde9PdgKZqnG",
- "payment_rrule": "DTSTART:20200120T180000Z\\nRRULE:FREQ=MONTHLY\\nEXDATE:20200220T180000Z",
- "payment_rrule_text": "Monthly",
- "order_rrule": "DTSTART:20200120T180000Z\\nRRULE:FREQ=MONTHLY\\nEXDATE:20200220T180000Z",
- "order_rrule_text": "Monthly",
- "last_payment_datetime": "2019-11-20T20:55:26Z",
- "last_order_datetime": "2019-11-20T20:55:26Z",
- "last_processed_datetime": "2019-11-20T20:55:26Z",
- "current_retries": 3,
- "charged_currency": "CAD",
- "base_to_charged_exchange_rate": 1,
- "base_currency": "CAD",
- "line_items": [
- {
- "id": 1,
- "subscription_id": 1,
- "platform_id": "ABC123",
- "platform_product_id": "1357908642",
- "platform_variant_id": "2468097531",
- "subscription_group_id": 1,
- "subscription_group_billing_rules_id": 1,
- "title": "Monthly Expansion Pack",
- "product_name": "Monthly Expansion Pack",
- "variant_name": "Default Title",
- "sku": "SKU-113-Red",
- "image": "",
- "quantity": 1,
- "price": 3500,
- "price_charged": 3200,
- "discounted_price": 3200,
- "discounted_price_charged": 3200,
- "full_price": 3200,
- "full_price_charged": 3200,
- "requires_shipping": false,
- "grams": 2200,
- "weight": 2.2,
- "weight_unit": "kg",
- "taxable": true,
- "discounts": [
- {
- "id": 1,
- "subscription_line_item_id": 1,
- "shop_id": 5,
- "full_price": 5,
- "discount_type": "percentage",
- "percentage_value": 10,
- "fixed_value": 0,
- "fixed_value_charged": 0,
- "description": "Subscription discount (10%) for Monthly Expansion Pack",
- "created_at": "2019-11-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z",
- "deleted_at": "2019-11-20T20:31:55Z"
}
], - "prepaid_metadata": {
- "id": 1,
- "line_item_id": 2,
- "prepaid_duration": 2,
- "current_recurrence_count": 2,
- "prepaid_continue": "no_continue"
}, - "line_item_attributes": [
- {
- "name": "size_preference",
- "value": "XL",
- "created_at": "2021-01-17T20:30:40Z",
- "updated_at": "2021-01-17T20:30:40Z",
- "subscription_id": 435989,
- "line_item_id": 45734
}
], - "created_at": "2019-11-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z"
}
], - "shipping_lines": [
- {
- "id": 36217,
- "name": "Standard Shipping",
- "code": "Standard Shipping",
- "price": 1000,
- "value": 1000,
- "value_charged": 1000,
- "tag": "Shipping",
- "created_at": "2019-10-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z",
- "subscription_id": 1
}
], - "billing_address": {
- "id": 1,
- "shop_identifier": "12345",
- "platform_id": "14",
- "customer_id": 2,
- "platform_type": "shopify",
- "platform_customer_id": "35",
- "first_name": "John",
- "last_name": "Doe",
- "company": "Example Company",
- "phone": "123-456-7890",
- "street1": "123 example st.",
- "street2": "101",
- "city": "Toronto",
- "province": "Ontario",
- "province_code": "ON",
- "country": "Canada",
- "country_code": "CA",
- "zip": "M5V 3L9",
- "is_default": true,
- "address_use": "billing",
- "address_source": "platform",
- "created_at": "2022-12-25T00:00:00Z",
- "updated_at": "2022-12-25T00:00:00Z",
- "deleted_at": "2022-12-25T00:00:00Z"
}, - "shipping_address": {
- "id": 1,
- "shop_identifier": "12345",
- "platform_id": "14",
- "customer_id": 2,
- "platform_type": "shopify",
- "platform_customer_id": "35",
- "first_name": "John",
- "last_name": "Doe",
- "company": "Example Company",
- "phone": "123-456-7890",
- "street1": "123 example st.",
- "street2": "101",
- "city": "Toronto",
- "province": "Ontario",
- "province_code": "ON",
- "country": "Canada",
- "country_code": "CA",
- "zip": "M5V 3L9",
- "is_default": true,
- "address_use": "billing",
- "address_source": "platform",
- "created_at": "2022-12-25T00:00:00Z",
- "updated_at": "2022-12-25T00:00:00Z",
- "deleted_at": "2022-12-25T00:00:00Z"
}, - "idempotency_key": "JwGdN55C4g1z5FXRO8Hp21CMxUxKyo6VcGSf3cUsjCgNyTtoeZcIsGM1We4p7pCe-0",
- "placed_at": "2012-11-20T20:31:55Z",
- "created_at": "2019-11-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z",
- "percent_discount": 10,
- "discount_code": "DISCOUNTCODE",
- "customer_id": 1697912,
- "billing_address_id": 11697812,
- "shipping_address_id": 11697812,
- "orders_processed": 1,
- "last_failure_code": "card_expired",
- "last_failure_details": {
- "message": "The order couldn't process because the card was declined."
}, - "last_failure_reason": "credit_card",
- "note": "Staff note",
- "order_note": "Customer note",
- "order_count": 1
}
}
Update Subscription
Update a subscription by its id.
Authorizations:
path Parameters
shop_identifier required | string Example: 123456 The unique identifier of the shop. |
subscription_id required | integer The subscription identifier. |
Request Body schema: application/jsonrequired
object (SubscriptionEntity) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Responses
Request samples
- Payload
{- "subscription": {
- "external_id": "string",
- "customer": "null",
- "next_order_datetime": "2020-01-20T18:00:00Z",
- "next_payment_datetime": "2020-01-20T18:00:00Z",
- "next_processing_datetime": "2020-01-20T18:00:00Z",
- "subscription_status": "active",
- "payment_method_token": "jik1w6HrCn17CxXPcKwHTGqqvm8wLDd1PelY6k8mabglNmL8XKBnsde9PdgKZqnG",
- "payment_gateway_public_id": "jik1w6HrCn17CxXPcKwHTGqqvm8wLDd1PelY6k8mabglNmL8XKBnsde9PdgKZqnG",
- "payment_rrule": "DTSTART:20200120T180000Z\\nRRULE:FREQ=MONTHLY\\nEXDATE:20200220T180000Z",
- "payment_rrule_text": "Monthly",
- "order_rrule": "DTSTART:20200120T180000Z\\nRRULE:FREQ=MONTHLY\\nEXDATE:20200220T180000Z",
- "order_rrule_text": "Monthly",
- "last_payment_datetime": "2019-11-20T20:55:26Z",
- "last_order_datetime": "2019-11-20T20:55:26Z",
- "last_processed_datetime": "2019-11-20T20:55:26Z",
- "current_retries": 3,
- "charged_currency": "CAD",
- "base_to_charged_exchange_rate": 1,
- "base_currency": "CAD",
- "billing_address": {
- "first_name": "John",
- "last_name": "Doe",
- "company": "Example Company",
- "phone": "123-456-7890",
- "street1": "123 example st.",
- "street2": "101",
- "city": "Toronto",
- "province": "Ontario",
- "province_code": "ON",
- "country": "Canada",
- "country_code": "CA",
- "zip": "M5V 3L9",
- "is_default": true,
- "address_use": "billing",
- "deleted_at": "2022-12-25T00:00:00Z"
}, - "shipping_address": {
- "first_name": "John",
- "last_name": "Doe",
- "company": "Example Company",
- "phone": "123-456-7890",
- "street1": "123 example st.",
- "street2": "101",
- "city": "Toronto",
- "province": "Ontario",
- "province_code": "ON",
- "country": "Canada",
- "country_code": "CA",
- "zip": "M5V 3L9",
- "is_default": true,
- "address_use": "billing",
- "deleted_at": "2022-12-25T00:00:00Z"
}, - "idempotency_key": "JwGdN55C4g1z5FXRO8Hp21CMxUxKyo6VcGSf3cUsjCgNyTtoeZcIsGM1We4p7pCe-0",
- "placed_at": "2012-11-20T20:31:55Z",
- "discount_code": "DISCOUNTCODE",
- "billing_address_id": 11697812,
- "shipping_address_id": 11697812,
- "orders_processed": 1,
- "last_failure_code": "card_expired",
- "last_failure_details": {
- "message": "The order couldn't process because the card was declined."
}, - "last_failure_reason": "credit_card",
- "note": "Staff note",
- "order_note": "Customer note",
- "order_count": 1
}
}
Response samples
- 200
- 401
{- "subscription": {
- "id": 1,
- "external_id": "string",
- "customer": "null",
- "shop_id": 1,
- "next_order_datetime": "2020-01-20T18:00:00Z",
- "next_payment_datetime": "2020-01-20T18:00:00Z",
- "next_processing_datetime": "2020-01-20T18:00:00Z",
- "subscription_status": "active",
- "status_changed_at": "2019-11-20T20:31:55Z",
- "payment_method_token": "jik1w6HrCn17CxXPcKwHTGqqvm8wLDd1PelY6k8mabglNmL8XKBnsde9PdgKZqnG",
- "payment_gateway_public_id": "jik1w6HrCn17CxXPcKwHTGqqvm8wLDd1PelY6k8mabglNmL8XKBnsde9PdgKZqnG",
- "payment_rrule": "DTSTART:20200120T180000Z\\nRRULE:FREQ=MONTHLY\\nEXDATE:20200220T180000Z",
- "payment_rrule_text": "Monthly",
- "order_rrule": "DTSTART:20200120T180000Z\\nRRULE:FREQ=MONTHLY\\nEXDATE:20200220T180000Z",
- "order_rrule_text": "Monthly",
- "last_payment_datetime": "2019-11-20T20:55:26Z",
- "last_order_datetime": "2019-11-20T20:55:26Z",
- "last_processed_datetime": "2019-11-20T20:55:26Z",
- "current_retries": 3,
- "charged_currency": "CAD",
- "base_to_charged_exchange_rate": 1,
- "base_currency": "CAD",
- "line_items": [
- {
- "id": 1,
- "subscription_id": 1,
- "platform_id": "ABC123",
- "platform_product_id": "1357908642",
- "platform_variant_id": "2468097531",
- "subscription_group_id": 1,
- "subscription_group_billing_rules_id": 1,
- "title": "Monthly Expansion Pack",
- "product_name": "Monthly Expansion Pack",
- "variant_name": "Default Title",
- "sku": "SKU-113-Red",
- "image": "",
- "quantity": 1,
- "price": 3500,
- "price_charged": 3200,
- "discounted_price": 3200,
- "discounted_price_charged": 3200,
- "full_price": 3200,
- "full_price_charged": 3200,
- "requires_shipping": false,
- "grams": 2200,
- "weight": 2.2,
- "weight_unit": "kg",
- "taxable": true,
- "discounts": [
- {
- "id": 1,
- "subscription_line_item_id": 1,
- "shop_id": 5,
- "full_price": 5,
- "discount_type": "percentage",
- "percentage_value": 10,
- "fixed_value": 0,
- "fixed_value_charged": 0,
- "description": "Subscription discount (10%) for Monthly Expansion Pack",
- "created_at": "2019-11-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z",
- "deleted_at": "2019-11-20T20:31:55Z"
}
], - "prepaid_metadata": {
- "id": 1,
- "line_item_id": 2,
- "prepaid_duration": 2,
- "current_recurrence_count": 2,
- "prepaid_continue": "no_continue"
}, - "line_item_attributes": [
- {
- "name": "size_preference",
- "value": "XL",
- "created_at": "2021-01-17T20:30:40Z",
- "updated_at": "2021-01-17T20:30:40Z",
- "subscription_id": 435989,
- "line_item_id": 45734
}
], - "created_at": "2019-11-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z"
}
], - "shipping_lines": [
- {
- "id": 36217,
- "name": "Standard Shipping",
- "code": "Standard Shipping",
- "price": 1000,
- "value": 1000,
- "value_charged": 1000,
- "tag": "Shipping",
- "created_at": "2019-10-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z",
- "subscription_id": 1
}
], - "billing_address": {
- "id": 1,
- "shop_identifier": "12345",
- "platform_id": "14",
- "customer_id": 2,
- "platform_type": "shopify",
- "platform_customer_id": "35",
- "first_name": "John",
- "last_name": "Doe",
- "company": "Example Company",
- "phone": "123-456-7890",
- "street1": "123 example st.",
- "street2": "101",
- "city": "Toronto",
- "province": "Ontario",
- "province_code": "ON",
- "country": "Canada",
- "country_code": "CA",
- "zip": "M5V 3L9",
- "is_default": true,
- "address_use": "billing",
- "address_source": "platform",
- "created_at": "2022-12-25T00:00:00Z",
- "updated_at": "2022-12-25T00:00:00Z",
- "deleted_at": "2022-12-25T00:00:00Z"
}, - "shipping_address": {
- "id": 1,
- "shop_identifier": "12345",
- "platform_id": "14",
- "customer_id": 2,
- "platform_type": "shopify",
- "platform_customer_id": "35",
- "first_name": "John",
- "last_name": "Doe",
- "company": "Example Company",
- "phone": "123-456-7890",
- "street1": "123 example st.",
- "street2": "101",
- "city": "Toronto",
- "province": "Ontario",
- "province_code": "ON",
- "country": "Canada",
- "country_code": "CA",
- "zip": "M5V 3L9",
- "is_default": true,
- "address_use": "billing",
- "address_source": "platform",
- "created_at": "2022-12-25T00:00:00Z",
- "updated_at": "2022-12-25T00:00:00Z",
- "deleted_at": "2022-12-25T00:00:00Z"
}, - "idempotency_key": "JwGdN55C4g1z5FXRO8Hp21CMxUxKyo6VcGSf3cUsjCgNyTtoeZcIsGM1We4p7pCe-0",
- "placed_at": "2012-11-20T20:31:55Z",
- "created_at": "2019-11-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z",
- "percent_discount": 10,
- "discount_code": "DISCOUNTCODE",
- "customer_id": 1697912,
- "billing_address_id": 11697812,
- "shipping_address_id": 11697812,
- "orders_processed": 1,
- "last_failure_code": "card_expired",
- "last_failure_details": {
- "message": "The order couldn't process because the card was declined."
}, - "last_failure_reason": "credit_card",
- "note": "Staff note",
- "order_note": "Customer note",
- "order_count": 1
}
}
Partial Update Subscription
Partially update a subscription by its id.
Authorizations:
path Parameters
shop_identifier required | string Example: 123456 The unique identifier of the shop. |
subscription_id required | integer The subscription identifier. |
Request Body schema: application/jsonrequired
object (PartialUpdateSubscriptionEntity) | |||||||||
|
Responses
Request samples
- Payload
{- "subscription": {
- "current_retries": 6,
- "note": "Staff note",
- "order_note": "Customer note",
- "order_count": 1
}
}
Response samples
- 200
- 401
{- "subscription": {
- "id": 1,
- "external_id": "string",
- "customer": "null",
- "shop_id": 1,
- "next_order_datetime": "2020-01-20T18:00:00Z",
- "next_payment_datetime": "2020-01-20T18:00:00Z",
- "next_processing_datetime": "2020-01-20T18:00:00Z",
- "subscription_status": "active",
- "status_changed_at": "2019-11-20T20:31:55Z",
- "payment_method_token": "jik1w6HrCn17CxXPcKwHTGqqvm8wLDd1PelY6k8mabglNmL8XKBnsde9PdgKZqnG",
- "payment_gateway_public_id": "jik1w6HrCn17CxXPcKwHTGqqvm8wLDd1PelY6k8mabglNmL8XKBnsde9PdgKZqnG",
- "payment_rrule": "DTSTART:20200120T180000Z\\nRRULE:FREQ=MONTHLY\\nEXDATE:20200220T180000Z",
- "payment_rrule_text": "Monthly",
- "order_rrule": "DTSTART:20200120T180000Z\\nRRULE:FREQ=MONTHLY\\nEXDATE:20200220T180000Z",
- "order_rrule_text": "Monthly",
- "last_payment_datetime": "2019-11-20T20:55:26Z",
- "last_order_datetime": "2019-11-20T20:55:26Z",
- "last_processed_datetime": "2019-11-20T20:55:26Z",
- "current_retries": 3,
- "charged_currency": "CAD",
- "base_to_charged_exchange_rate": 1,
- "base_currency": "CAD",
- "line_items": [
- {
- "id": 1,
- "subscription_id": 1,
- "platform_id": "ABC123",
- "platform_product_id": "1357908642",
- "platform_variant_id": "2468097531",
- "subscription_group_id": 1,
- "subscription_group_billing_rules_id": 1,
- "title": "Monthly Expansion Pack",
- "product_name": "Monthly Expansion Pack",
- "variant_name": "Default Title",
- "sku": "SKU-113-Red",
- "image": "",
- "quantity": 1,
- "price": 3500,
- "price_charged": 3200,
- "discounted_price": 3200,
- "discounted_price_charged": 3200,
- "full_price": 3200,
- "full_price_charged": 3200,
- "requires_shipping": false,
- "grams": 2200,
- "weight": 2.2,
- "weight_unit": "kg",
- "taxable": true,
- "discounts": [
- {
- "id": 1,
- "subscription_line_item_id": 1,
- "shop_id": 5,
- "full_price": 5,
- "discount_type": "percentage",
- "percentage_value": 10,
- "fixed_value": 0,
- "fixed_value_charged": 0,
- "description": "Subscription discount (10%) for Monthly Expansion Pack",
- "created_at": "2019-11-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z",
- "deleted_at": "2019-11-20T20:31:55Z"
}
], - "prepaid_metadata": {
- "id": 1,
- "line_item_id": 2,
- "prepaid_duration": 2,
- "current_recurrence_count": 2,
- "prepaid_continue": "no_continue"
}, - "line_item_attributes": [
- {
- "name": "size_preference",
- "value": "XL",
- "created_at": "2021-01-17T20:30:40Z",
- "updated_at": "2021-01-17T20:30:40Z",
- "subscription_id": 435989,
- "line_item_id": 45734
}
], - "created_at": "2019-11-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z"
}
], - "shipping_lines": [
- {
- "id": 36217,
- "name": "Standard Shipping",
- "code": "Standard Shipping",
- "price": 1000,
- "value": 1000,
- "value_charged": 1000,
- "tag": "Shipping",
- "created_at": "2019-10-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z",
- "subscription_id": 1
}
], - "billing_address": {
- "id": 1,
- "shop_identifier": "12345",
- "platform_id": "14",
- "customer_id": 2,
- "platform_type": "shopify",
- "platform_customer_id": "35",
- "first_name": "John",
- "last_name": "Doe",
- "company": "Example Company",
- "phone": "123-456-7890",
- "street1": "123 example st.",
- "street2": "101",
- "city": "Toronto",
- "province": "Ontario",
- "province_code": "ON",
- "country": "Canada",
- "country_code": "CA",
- "zip": "M5V 3L9",
- "is_default": true,
- "address_use": "billing",
- "address_source": "platform",
- "created_at": "2022-12-25T00:00:00Z",
- "updated_at": "2022-12-25T00:00:00Z",
- "deleted_at": "2022-12-25T00:00:00Z"
}, - "shipping_address": {
- "id": 1,
- "shop_identifier": "12345",
- "platform_id": "14",
- "customer_id": 2,
- "platform_type": "shopify",
- "platform_customer_id": "35",
- "first_name": "John",
- "last_name": "Doe",
- "company": "Example Company",
- "phone": "123-456-7890",
- "street1": "123 example st.",
- "street2": "101",
- "city": "Toronto",
- "province": "Ontario",
- "province_code": "ON",
- "country": "Canada",
- "country_code": "CA",
- "zip": "M5V 3L9",
- "is_default": true,
- "address_use": "billing",
- "address_source": "platform",
- "created_at": "2022-12-25T00:00:00Z",
- "updated_at": "2022-12-25T00:00:00Z",
- "deleted_at": "2022-12-25T00:00:00Z"
}, - "idempotency_key": "JwGdN55C4g1z5FXRO8Hp21CMxUxKyo6VcGSf3cUsjCgNyTtoeZcIsGM1We4p7pCe-0",
- "placed_at": "2012-11-20T20:31:55Z",
- "created_at": "2019-11-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z",
- "percent_discount": 10,
- "discount_code": "DISCOUNTCODE",
- "customer_id": 1697912,
- "billing_address_id": 11697812,
- "shipping_address_id": 11697812,
- "orders_processed": 1,
- "last_failure_code": "card_expired",
- "last_failure_details": {
- "message": "The order couldn't process because the card was declined."
}, - "last_failure_reason": "credit_card",
- "note": "Staff note",
- "order_note": "Customer note",
- "order_count": 1
}
}
List Subscription Intervals
Retrieve a list of available intervals for a subscription.
Authorizations:
path Parameters
shop_identifier required | string Example: 123456 The unique identifier of the shop. |
subscription_id required | integer The subscription identifier. |
Responses
Response samples
- 200
- 401
{- "intervals": [
- {
- "interval_number": 1,
- "interval_type": "month",
- "week_type": "each",
- "week_day": "MO",
- "month_type": "purchase_day",
- "month_day": "15",
- "month_occurrence": "first",
- "month_occurrence_day": "MO",
- "year_type": "on_the",
- "year_month": "6",
- "year_occurrence": "first",
- "year_occurrence_day": "FR",
- "interval_name": "Monthly",
- "id": 1,
- "billing_rule": "DTSTART:20191120T205526Z\\nRRULE:FREQ=MONTHLY"
}
]
}
Update Subscription Interval
Update the interval of a subscription.
Authorizations:
path Parameters
shop_identifier required | string Example: 123456 The unique identifier of the shop. |
subscription_interval_id required | integer The subscription interval identifier. |
subscription_id required | integer The subscription identifier. |
Responses
Response samples
- 200
- 401
{- "subscription": {
- "id": 1,
- "external_id": "string",
- "customer": "null",
- "shop_id": 1,
- "next_order_datetime": "2020-01-20T18:00:00Z",
- "next_payment_datetime": "2020-01-20T18:00:00Z",
- "next_processing_datetime": "2020-01-20T18:00:00Z",
- "subscription_status": "active",
- "status_changed_at": "2019-11-20T20:31:55Z",
- "payment_method_token": "jik1w6HrCn17CxXPcKwHTGqqvm8wLDd1PelY6k8mabglNmL8XKBnsde9PdgKZqnG",
- "payment_gateway_public_id": "jik1w6HrCn17CxXPcKwHTGqqvm8wLDd1PelY6k8mabglNmL8XKBnsde9PdgKZqnG",
- "payment_rrule": "DTSTART:20200120T180000Z\\nRRULE:FREQ=MONTHLY\\nEXDATE:20200220T180000Z",
- "payment_rrule_text": "Monthly",
- "order_rrule": "DTSTART:20200120T180000Z\\nRRULE:FREQ=MONTHLY\\nEXDATE:20200220T180000Z",
- "order_rrule_text": "Monthly",
- "last_payment_datetime": "2019-11-20T20:55:26Z",
- "last_order_datetime": "2019-11-20T20:55:26Z",
- "last_processed_datetime": "2019-11-20T20:55:26Z",
- "current_retries": 3,
- "charged_currency": "CAD",
- "base_to_charged_exchange_rate": 1,
- "base_currency": "CAD",
- "line_items": [
- {
- "id": 1,
- "subscription_id": 1,
- "platform_id": "ABC123",
- "platform_product_id": "1357908642",
- "platform_variant_id": "2468097531",
- "subscription_group_id": 1,
- "subscription_group_billing_rules_id": 1,
- "title": "Monthly Expansion Pack",
- "product_name": "Monthly Expansion Pack",
- "variant_name": "Default Title",
- "sku": "SKU-113-Red",
- "image": "",
- "quantity": 1,
- "price": 3500,
- "price_charged": 3200,
- "discounted_price": 3200,
- "discounted_price_charged": 3200,
- "full_price": 3200,
- "full_price_charged": 3200,
- "requires_shipping": false,
- "grams": 2200,
- "weight": 2.2,
- "weight_unit": "kg",
- "taxable": true,
- "discounts": [
- {
- "id": 1,
- "subscription_line_item_id": 1,
- "shop_id": 5,
- "full_price": 5,
- "discount_type": "percentage",
- "percentage_value": 10,
- "fixed_value": 0,
- "fixed_value_charged": 0,
- "description": "Subscription discount (10%) for Monthly Expansion Pack",
- "created_at": "2019-11-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z",
- "deleted_at": "2019-11-20T20:31:55Z"
}
], - "prepaid_metadata": {
- "id": 1,
- "line_item_id": 2,
- "prepaid_duration": 2,
- "current_recurrence_count": 2,
- "prepaid_continue": "no_continue"
}, - "line_item_attributes": [
- {
- "name": "size_preference",
- "value": "XL",
- "created_at": "2021-01-17T20:30:40Z",
- "updated_at": "2021-01-17T20:30:40Z",
- "subscription_id": 435989,
- "line_item_id": 45734
}
], - "created_at": "2019-11-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z"
}
], - "shipping_lines": [
- {
- "id": 36217,
- "name": "Standard Shipping",
- "code": "Standard Shipping",
- "price": 1000,
- "value": 1000,
- "value_charged": 1000,
- "tag": "Shipping",
- "created_at": "2019-10-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z",
- "subscription_id": 1
}
], - "billing_address": {
- "id": 1,
- "shop_identifier": "12345",
- "platform_id": "14",
- "customer_id": 2,
- "platform_type": "shopify",
- "platform_customer_id": "35",
- "first_name": "John",
- "last_name": "Doe",
- "company": "Example Company",
- "phone": "123-456-7890",
- "street1": "123 example st.",
- "street2": "101",
- "city": "Toronto",
- "province": "Ontario",
- "province_code": "ON",
- "country": "Canada",
- "country_code": "CA",
- "zip": "M5V 3L9",
- "is_default": true,
- "address_use": "billing",
- "address_source": "platform",
- "created_at": "2022-12-25T00:00:00Z",
- "updated_at": "2022-12-25T00:00:00Z",
- "deleted_at": "2022-12-25T00:00:00Z"
}, - "shipping_address": {
- "id": 1,
- "shop_identifier": "12345",
- "platform_id": "14",
- "customer_id": 2,
- "platform_type": "shopify",
- "platform_customer_id": "35",
- "first_name": "John",
- "last_name": "Doe",
- "company": "Example Company",
- "phone": "123-456-7890",
- "street1": "123 example st.",
- "street2": "101",
- "city": "Toronto",
- "province": "Ontario",
- "province_code": "ON",
- "country": "Canada",
- "country_code": "CA",
- "zip": "M5V 3L9",
- "is_default": true,
- "address_use": "billing",
- "address_source": "platform",
- "created_at": "2022-12-25T00:00:00Z",
- "updated_at": "2022-12-25T00:00:00Z",
- "deleted_at": "2022-12-25T00:00:00Z"
}, - "idempotency_key": "JwGdN55C4g1z5FXRO8Hp21CMxUxKyo6VcGSf3cUsjCgNyTtoeZcIsGM1We4p7pCe-0",
- "placed_at": "2012-11-20T20:31:55Z",
- "created_at": "2019-11-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z",
- "percent_discount": 10,
- "discount_code": "DISCOUNTCODE",
- "customer_id": 1697912,
- "billing_address_id": 11697812,
- "shipping_address_id": 11697812,
- "orders_processed": 1,
- "last_failure_code": "card_expired",
- "last_failure_details": {
- "message": "The order couldn't process because the card was declined."
}, - "last_failure_reason": "credit_card",
- "note": "Staff note",
- "order_note": "Customer note",
- "order_count": 1
}
}
Create Line Items
Add one or more line items to a subscription. Refer to Create Subscription Line Items for more information about the use cases of this endpoint.
Note: Adding line items to multi-currency subscriptions is not supported at this time.
Authorizations:
path Parameters
shop_identifier required | string Example: 123456 The unique identifier of the shop. |
subscription_id required | integer The subscription identifier. |
Request Body schema: application/jsonrequired
Array of objects | |||||||||||
Array
|
Responses
Request samples
- Payload
{- "line_items": [
- {
- "platform_product_id": "1357908642",
- "platform_variant_id": "2468097531",
- "quantity": 1,
- "price": 3500,
- "subscription_group_id": 123
}
]
}
Response samples
- 200
- 401
{- "line_items": [
- {
- "id": 1,
- "subscription_id": 1,
- "platform_id": "ABC123",
- "platform_product_id": "1357908642",
- "platform_variant_id": "2468097531",
- "subscription_group_id": 1,
- "subscription_group_billing_rules_id": 1,
- "title": "Monthly Expansion Pack",
- "product_name": "Monthly Expansion Pack",
- "variant_name": "Default Title",
- "sku": "SKU-113-Red",
- "image": "",
- "quantity": 1,
- "price": 3500,
- "price_charged": 3200,
- "discounted_price": 3200,
- "discounted_price_charged": 3200,
- "full_price": 3200,
- "full_price_charged": 3200,
- "requires_shipping": false,
- "grams": 2200,
- "weight": 2.2,
- "weight_unit": "kg",
- "taxable": true,
- "discounts": [
- {
- "id": 1,
- "subscription_line_item_id": 1,
- "shop_id": 5,
- "full_price": 5,
- "discount_type": "percentage",
- "percentage_value": 10,
- "fixed_value": 0,
- "fixed_value_charged": 0,
- "description": "Subscription discount (10%) for Monthly Expansion Pack",
- "created_at": "2019-11-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z",
- "deleted_at": "2019-11-20T20:31:55Z"
}
], - "prepaid_metadata": {
- "id": 1,
- "line_item_id": 2,
- "prepaid_duration": 2,
- "current_recurrence_count": 2,
- "prepaid_continue": "no_continue"
}, - "line_item_attributes": [
- {
- "name": "size_preference",
- "value": "XL",
- "created_at": "2021-01-17T20:30:40Z",
- "updated_at": "2021-01-17T20:30:40Z",
- "subscription_id": 435989,
- "line_item_id": 45734
}
], - "created_at": "2019-11-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z"
}
]
}
Reactivate Subscription
Reactivate an inactive or cancelled subscription.
Authorizations:
path Parameters
shop_identifier required | string Example: 123456 The unique identifier of the shop. |
subscription_id required | integer The subscription identifier. |
Responses
Response samples
- 200
- 401
{- "subscription": {
- "id": 1,
- "external_id": "string",
- "customer": "null",
- "shop_id": 1,
- "next_order_datetime": "2020-01-20T18:00:00Z",
- "next_payment_datetime": "2020-01-20T18:00:00Z",
- "next_processing_datetime": "2020-01-20T18:00:00Z",
- "subscription_status": "active",
- "status_changed_at": "2019-11-20T20:31:55Z",
- "payment_method_token": "jik1w6HrCn17CxXPcKwHTGqqvm8wLDd1PelY6k8mabglNmL8XKBnsde9PdgKZqnG",
- "payment_gateway_public_id": "jik1w6HrCn17CxXPcKwHTGqqvm8wLDd1PelY6k8mabglNmL8XKBnsde9PdgKZqnG",
- "payment_rrule": "DTSTART:20200120T180000Z\\nRRULE:FREQ=MONTHLY\\nEXDATE:20200220T180000Z",
- "payment_rrule_text": "Monthly",
- "order_rrule": "DTSTART:20200120T180000Z\\nRRULE:FREQ=MONTHLY\\nEXDATE:20200220T180000Z",
- "order_rrule_text": "Monthly",
- "last_payment_datetime": "2019-11-20T20:55:26Z",
- "last_order_datetime": "2019-11-20T20:55:26Z",
- "last_processed_datetime": "2019-11-20T20:55:26Z",
- "current_retries": 3,
- "charged_currency": "CAD",
- "base_to_charged_exchange_rate": 1,
- "base_currency": "CAD",
- "line_items": [
- {
- "id": 1,
- "subscription_id": 1,
- "platform_id": "ABC123",
- "platform_product_id": "1357908642",
- "platform_variant_id": "2468097531",
- "subscription_group_id": 1,
- "subscription_group_billing_rules_id": 1,
- "title": "Monthly Expansion Pack",
- "product_name": "Monthly Expansion Pack",
- "variant_name": "Default Title",
- "sku": "SKU-113-Red",
- "image": "",
- "quantity": 1,
- "price": 3500,
- "price_charged": 3200,
- "discounted_price": 3200,
- "discounted_price_charged": 3200,
- "full_price": 3200,
- "full_price_charged": 3200,
- "requires_shipping": false,
- "grams": 2200,
- "weight": 2.2,
- "weight_unit": "kg",
- "taxable": true,
- "discounts": [
- {
- "id": 1,
- "subscription_line_item_id": 1,
- "shop_id": 5,
- "full_price": 5,
- "discount_type": "percentage",
- "percentage_value": 10,
- "fixed_value": 0,
- "fixed_value_charged": 0,
- "description": "Subscription discount (10%) for Monthly Expansion Pack",
- "created_at": "2019-11-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z",
- "deleted_at": "2019-11-20T20:31:55Z"
}
], - "prepaid_metadata": {
- "id": 1,
- "line_item_id": 2,
- "prepaid_duration": 2,
- "current_recurrence_count": 2,
- "prepaid_continue": "no_continue"
}, - "line_item_attributes": [
- {
- "name": "size_preference",
- "value": "XL",
- "created_at": "2021-01-17T20:30:40Z",
- "updated_at": "2021-01-17T20:30:40Z",
- "subscription_id": 435989,
- "line_item_id": 45734
}
], - "created_at": "2019-11-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z"
}
], - "shipping_lines": [
- {
- "id": 36217,
- "name": "Standard Shipping",
- "code": "Standard Shipping",
- "price": 1000,
- "value": 1000,
- "value_charged": 1000,
- "tag": "Shipping",
- "created_at": "2019-10-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z",
- "subscription_id": 1
}
], - "billing_address": {
- "id": 1,
- "shop_identifier": "12345",
- "platform_id": "14",
- "customer_id": 2,
- "platform_type": "shopify",
- "platform_customer_id": "35",
- "first_name": "John",
- "last_name": "Doe",
- "company": "Example Company",
- "phone": "123-456-7890",
- "street1": "123 example st.",
- "street2": "101",
- "city": "Toronto",
- "province": "Ontario",
- "province_code": "ON",
- "country": "Canada",
- "country_code": "CA",
- "zip": "M5V 3L9",
- "is_default": true,
- "address_use": "billing",
- "address_source": "platform",
- "created_at": "2022-12-25T00:00:00Z",
- "updated_at": "2022-12-25T00:00:00Z",
- "deleted_at": "2022-12-25T00:00:00Z"
}, - "shipping_address": {
- "id": 1,
- "shop_identifier": "12345",
- "platform_id": "14",
- "customer_id": 2,
- "platform_type": "shopify",
- "platform_customer_id": "35",
- "first_name": "John",
- "last_name": "Doe",
- "company": "Example Company",
- "phone": "123-456-7890",
- "street1": "123 example st.",
- "street2": "101",
- "city": "Toronto",
- "province": "Ontario",
- "province_code": "ON",
- "country": "Canada",
- "country_code": "CA",
- "zip": "M5V 3L9",
- "is_default": true,
- "address_use": "billing",
- "address_source": "platform",
- "created_at": "2022-12-25T00:00:00Z",
- "updated_at": "2022-12-25T00:00:00Z",
- "deleted_at": "2022-12-25T00:00:00Z"
}, - "idempotency_key": "JwGdN55C4g1z5FXRO8Hp21CMxUxKyo6VcGSf3cUsjCgNyTtoeZcIsGM1We4p7pCe-0",
- "placed_at": "2012-11-20T20:31:55Z",
- "created_at": "2019-11-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z",
- "percent_discount": 10,
- "discount_code": "DISCOUNTCODE",
- "customer_id": 1697912,
- "billing_address_id": 11697812,
- "shipping_address_id": 11697812,
- "orders_processed": 1,
- "last_failure_code": "card_expired",
- "last_failure_details": {
- "message": "The order couldn't process because the card was declined."
}, - "last_failure_reason": "credit_card",
- "note": "Staff note",
- "order_note": "Customer note",
- "order_count": 1
}
}
Cancel Subscription
Cancel a subscription and any future orders. Cancelled subscriptions will appear as 'inactive'.
Authorizations:
path Parameters
shop_identifier required | string Example: 123456 The unique identifier of the shop. |
subscription_id required | integer The subscription identifier. |
Responses
Response samples
- 200
- 401
{- "subscription": {
- "id": 1,
- "external_id": "string",
- "customer": "null",
- "shop_id": 1,
- "next_order_datetime": "2020-01-20T18:00:00Z",
- "next_payment_datetime": "2020-01-20T18:00:00Z",
- "next_processing_datetime": "2020-01-20T18:00:00Z",
- "subscription_status": "active",
- "status_changed_at": "2019-11-20T20:31:55Z",
- "payment_method_token": "jik1w6HrCn17CxXPcKwHTGqqvm8wLDd1PelY6k8mabglNmL8XKBnsde9PdgKZqnG",
- "payment_gateway_public_id": "jik1w6HrCn17CxXPcKwHTGqqvm8wLDd1PelY6k8mabglNmL8XKBnsde9PdgKZqnG",
- "payment_rrule": "DTSTART:20200120T180000Z\\nRRULE:FREQ=MONTHLY\\nEXDATE:20200220T180000Z",
- "payment_rrule_text": "Monthly",
- "order_rrule": "DTSTART:20200120T180000Z\\nRRULE:FREQ=MONTHLY\\nEXDATE:20200220T180000Z",
- "order_rrule_text": "Monthly",
- "last_payment_datetime": "2019-11-20T20:55:26Z",
- "last_order_datetime": "2019-11-20T20:55:26Z",
- "last_processed_datetime": "2019-11-20T20:55:26Z",
- "current_retries": 3,
- "charged_currency": "CAD",
- "base_to_charged_exchange_rate": 1,
- "base_currency": "CAD",
- "line_items": [
- {
- "id": 1,
- "subscription_id": 1,
- "platform_id": "ABC123",
- "platform_product_id": "1357908642",
- "platform_variant_id": "2468097531",
- "subscription_group_id": 1,
- "subscription_group_billing_rules_id": 1,
- "title": "Monthly Expansion Pack",
- "product_name": "Monthly Expansion Pack",
- "variant_name": "Default Title",
- "sku": "SKU-113-Red",
- "image": "",
- "quantity": 1,
- "price": 3500,
- "price_charged": 3200,
- "discounted_price": 3200,
- "discounted_price_charged": 3200,
- "full_price": 3200,
- "full_price_charged": 3200,
- "requires_shipping": false,
- "grams": 2200,
- "weight": 2.2,
- "weight_unit": "kg",
- "taxable": true,
- "discounts": [
- {
- "id": 1,
- "subscription_line_item_id": 1,
- "shop_id": 5,
- "full_price": 5,
- "discount_type": "percentage",
- "percentage_value": 10,
- "fixed_value": 0,
- "fixed_value_charged": 0,
- "description": "Subscription discount (10%) for Monthly Expansion Pack",
- "created_at": "2019-11-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z",
- "deleted_at": "2019-11-20T20:31:55Z"
}
], - "prepaid_metadata": {
- "id": 1,
- "line_item_id": 2,
- "prepaid_duration": 2,
- "current_recurrence_count": 2,
- "prepaid_continue": "no_continue"
}, - "line_item_attributes": [
- {
- "name": "size_preference",
- "value": "XL",
- "created_at": "2021-01-17T20:30:40Z",
- "updated_at": "2021-01-17T20:30:40Z",
- "subscription_id": 435989,
- "line_item_id": 45734
}
], - "created_at": "2019-11-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z"
}
], - "shipping_lines": [
- {
- "id": 36217,
- "name": "Standard Shipping",
- "code": "Standard Shipping",
- "price": 1000,
- "value": 1000,
- "value_charged": 1000,
- "tag": "Shipping",
- "created_at": "2019-10-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z",
- "subscription_id": 1
}
], - "billing_address": {
- "id": 1,
- "shop_identifier": "12345",
- "platform_id": "14",
- "customer_id": 2,
- "platform_type": "shopify",
- "platform_customer_id": "35",
- "first_name": "John",
- "last_name": "Doe",
- "company": "Example Company",
- "phone": "123-456-7890",
- "street1": "123 example st.",
- "street2": "101",
- "city": "Toronto",
- "province": "Ontario",
- "province_code": "ON",
- "country": "Canada",
- "country_code": "CA",
- "zip": "M5V 3L9",
- "is_default": true,
- "address_use": "billing",
- "address_source": "platform",
- "created_at": "2022-12-25T00:00:00Z",
- "updated_at": "2022-12-25T00:00:00Z",
- "deleted_at": "2022-12-25T00:00:00Z"
}, - "shipping_address": {
- "id": 1,
- "shop_identifier": "12345",
- "platform_id": "14",
- "customer_id": 2,
- "platform_type": "shopify",
- "platform_customer_id": "35",
- "first_name": "John",
- "last_name": "Doe",
- "company": "Example Company",
- "phone": "123-456-7890",
- "street1": "123 example st.",
- "street2": "101",
- "city": "Toronto",
- "province": "Ontario",
- "province_code": "ON",
- "country": "Canada",
- "country_code": "CA",
- "zip": "M5V 3L9",
- "is_default": true,
- "address_use": "billing",
- "address_source": "platform",
- "created_at": "2022-12-25T00:00:00Z",
- "updated_at": "2022-12-25T00:00:00Z",
- "deleted_at": "2022-12-25T00:00:00Z"
}, - "idempotency_key": "JwGdN55C4g1z5FXRO8Hp21CMxUxKyo6VcGSf3cUsjCgNyTtoeZcIsGM1We4p7pCe-0",
- "placed_at": "2012-11-20T20:31:55Z",
- "created_at": "2019-11-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z",
- "percent_discount": 10,
- "discount_code": "DISCOUNTCODE",
- "customer_id": 1697912,
- "billing_address_id": 11697812,
- "shipping_address_id": 11697812,
- "orders_processed": 1,
- "last_failure_code": "card_expired",
- "last_failure_details": {
- "message": "The order couldn't process because the card was declined."
}, - "last_failure_reason": "credit_card",
- "note": "Staff note",
- "order_note": "Customer note",
- "order_count": 1
}
}
Pause Subscription
Pause a subscription and any future orders. Paused orders will still appear as 'active'.
Authorizations:
path Parameters
shop_identifier required | string Example: 123456 The unique identifier of the shop. |
subscription_id required | integer The subscription identifier. |
Responses
Response samples
- 200
- 401
{- "subscription": {
- "id": 1,
- "external_id": "string",
- "customer": "null",
- "shop_id": 1,
- "next_order_datetime": "2020-01-20T18:00:00Z",
- "next_payment_datetime": "2020-01-20T18:00:00Z",
- "next_processing_datetime": "2020-01-20T18:00:00Z",
- "subscription_status": "active",
- "status_changed_at": "2019-11-20T20:31:55Z",
- "payment_method_token": "jik1w6HrCn17CxXPcKwHTGqqvm8wLDd1PelY6k8mabglNmL8XKBnsde9PdgKZqnG",
- "payment_gateway_public_id": "jik1w6HrCn17CxXPcKwHTGqqvm8wLDd1PelY6k8mabglNmL8XKBnsde9PdgKZqnG",
- "payment_rrule": "DTSTART:20200120T180000Z\\nRRULE:FREQ=MONTHLY\\nEXDATE:20200220T180000Z",
- "payment_rrule_text": "Monthly",
- "order_rrule": "DTSTART:20200120T180000Z\\nRRULE:FREQ=MONTHLY\\nEXDATE:20200220T180000Z",
- "order_rrule_text": "Monthly",
- "last_payment_datetime": "2019-11-20T20:55:26Z",
- "last_order_datetime": "2019-11-20T20:55:26Z",
- "last_processed_datetime": "2019-11-20T20:55:26Z",
- "current_retries": 3,
- "charged_currency": "CAD",
- "base_to_charged_exchange_rate": 1,
- "base_currency": "CAD",
- "line_items": [
- {
- "id": 1,
- "subscription_id": 1,
- "platform_id": "ABC123",
- "platform_product_id": "1357908642",
- "platform_variant_id": "2468097531",
- "subscription_group_id": 1,
- "subscription_group_billing_rules_id": 1,
- "title": "Monthly Expansion Pack",
- "product_name": "Monthly Expansion Pack",
- "variant_name": "Default Title",
- "sku": "SKU-113-Red",
- "image": "",
- "quantity": 1,
- "price": 3500,
- "price_charged": 3200,
- "discounted_price": 3200,
- "discounted_price_charged": 3200,
- "full_price": 3200,
- "full_price_charged": 3200,
- "requires_shipping": false,
- "grams": 2200,
- "weight": 2.2,
- "weight_unit": "kg",
- "taxable": true,
- "discounts": [
- {
- "id": 1,
- "subscription_line_item_id": 1,
- "shop_id": 5,
- "full_price": 5,
- "discount_type": "percentage",
- "percentage_value": 10,
- "fixed_value": 0,
- "fixed_value_charged": 0,
- "description": "Subscription discount (10%) for Monthly Expansion Pack",
- "created_at": "2019-11-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z",
- "deleted_at": "2019-11-20T20:31:55Z"
}
], - "prepaid_metadata": {
- "id": 1,
- "line_item_id": 2,
- "prepaid_duration": 2,
- "current_recurrence_count": 2,
- "prepaid_continue": "no_continue"
}, - "line_item_attributes": [
- {
- "name": "size_preference",
- "value": "XL",
- "created_at": "2021-01-17T20:30:40Z",
- "updated_at": "2021-01-17T20:30:40Z",
- "subscription_id": 435989,
- "line_item_id": 45734
}
], - "created_at": "2019-11-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z"
}
], - "shipping_lines": [
- {
- "id": 36217,
- "name": "Standard Shipping",
- "code": "Standard Shipping",
- "price": 1000,
- "value": 1000,
- "value_charged": 1000,
- "tag": "Shipping",
- "created_at": "2019-10-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z",
- "subscription_id": 1
}
], - "billing_address": {
- "id": 1,
- "shop_identifier": "12345",
- "platform_id": "14",
- "customer_id": 2,
- "platform_type": "shopify",
- "platform_customer_id": "35",
- "first_name": "John",
- "last_name": "Doe",
- "company": "Example Company",
- "phone": "123-456-7890",
- "street1": "123 example st.",
- "street2": "101",
- "city": "Toronto",
- "province": "Ontario",
- "province_code": "ON",
- "country": "Canada",
- "country_code": "CA",
- "zip": "M5V 3L9",
- "is_default": true,
- "address_use": "billing",
- "address_source": "platform",
- "created_at": "2022-12-25T00:00:00Z",
- "updated_at": "2022-12-25T00:00:00Z",
- "deleted_at": "2022-12-25T00:00:00Z"
}, - "shipping_address": {
- "id": 1,
- "shop_identifier": "12345",
- "platform_id": "14",
- "customer_id": 2,
- "platform_type": "shopify",
- "platform_customer_id": "35",
- "first_name": "John",
- "last_name": "Doe",
- "company": "Example Company",
- "phone": "123-456-7890",
- "street1": "123 example st.",
- "street2": "101",
- "city": "Toronto",
- "province": "Ontario",
- "province_code": "ON",
- "country": "Canada",
- "country_code": "CA",
- "zip": "M5V 3L9",
- "is_default": true,
- "address_use": "billing",
- "address_source": "platform",
- "created_at": "2022-12-25T00:00:00Z",
- "updated_at": "2022-12-25T00:00:00Z",
- "deleted_at": "2022-12-25T00:00:00Z"
}, - "idempotency_key": "JwGdN55C4g1z5FXRO8Hp21CMxUxKyo6VcGSf3cUsjCgNyTtoeZcIsGM1We4p7pCe-0",
- "placed_at": "2012-11-20T20:31:55Z",
- "created_at": "2019-11-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z",
- "percent_discount": 10,
- "discount_code": "DISCOUNTCODE",
- "customer_id": 1697912,
- "billing_address_id": 11697812,
- "shipping_address_id": 11697812,
- "orders_processed": 1,
- "last_failure_code": "card_expired",
- "last_failure_details": {
- "message": "The order couldn't process because the card was declined."
}, - "last_failure_reason": "credit_card",
- "note": "Staff note",
- "order_note": "Customer note",
- "order_count": 1
}
}
Contains information about subscription groups for your store, including shop ID and subscription group configuration. Use these endpoints to add, remove, edit, or list subscription groups.
List Selection Options
Retrieves a list of selection options. Selection options are the products available in a subscription group. Use this endpoint to view some or all selection options for the active subscription groups on a given store.
Authorizations:
path Parameters
shop_identifier required | string Example: 123456 The unique identifier of the shop. |
query Parameters
cursor | string Example: cursor=?cursor=P2lkPTU1 A base 64 encoded cursor. |
filter | string Example: filter=?filter=in(platform_entity_id:1,2,3) Accepts filtering options as described on the Query & Pagination page. |
expand | string Example: expand=?expand=subscription_group&expand=products Fields to expand on the selection options. Currently accepts |
limit | integer Example: limit=?limit=3L9 Limit the number of returned items. |
latest | boolean Default: false Example: latest=true If set to This is useful when using the |
Responses
Response samples
- 200
- 401
{- "selection_options": [
- {
- "id": 1,
- "shop_id": 10,
- "subscription_group_id": 9,
- "platform_entity_id": 8000319815956,
- "bold_platform_entity_id": 39,
- "created_at": "2022-11-09 17:50:37",
- "updated_at": "2022-11-09 17:50:37",
- "deleted_at": null
}
], - "pagination": {
- "next": "P3NpbmNlX2lkPTE1Mjc0Jm9yZGVyX2J5PWlkJm9yZGVyX2RpcmVjdGlvbj1kZXNj",
- "prev": "P3NpbmNlX2lkPTE1Mjc0Jm9yZGVyX2J5PWlkJm9yZGVyX2RpcmVjdGlvbj1kZXNj"
}
}
List Subscription Groups
Retrieve a list of subscription groups.
Authorizations:
path Parameters
shop_identifier required | string Example: 123456 The unique identifier of the shop. |
Responses
Response samples
- 200
- 401
{- "subscription_groups": [
- {
- "id": 3,
- "shop_id": 1,
- "internal_name": "Standard Subscription",
- "is_enabled": true,
- "platform_id": "gid://shopify/SellingPlanGroup/132016692",
- "allow_prepaid": false,
- "is_prepaid_only": false,
- "should_continue_prepaid": false,
- "continue_prepaid_type": "as_prepaid",
- "percent_discount": 11,
- "minimum_order_count_before_cancellable": 0,
- "is_product_swappable": false,
- "is_subscription_only": false,
- "selection_type": "products",
- "group_type": "selectable",
- "selectable_daily_allowed": false,
- "selectable_weekly_allowed": false,
- "selectable_yearly_allowed": false,
- "selectable_max_interval_frequency": 0,
- "fixed_interval_type": "monthly",
- "is_fixed_billing": false,
- "can_add_to_cart": true,
- "allow_buffer_days": true,
- "discount_type": "fixed",
- "fixed_discount": 10,
- "created_at": "2019-11-20T20:50:07Z",
- "updated_at": "2019-11-20T20:50:07Z",
- "deleted_at": null,
- "active_subscribers_count": 1,
- "billing_rules": [
- {
- "id": 1,
- "shop_id": 1,
- "subscription_group_id": 1,
- "interval_number": 1,
- "interval_type": "month",
- "interval_name": "Monthly",
- "week_type": "",
- "week_day": 0,
- "month_type": "purchase_day",
- "month_day": "",
- "month_occurrence": "",
- "month_occurrence_day": "",
- "year_type": "",
- "year_month": "",
- "year_occurrence": "",
- "year_occurrence_day": "",
- "billing_rule": "FREQ=MONTHLY",
- "created_at": "2019-11-20T20:50:07Z",
- "updated_at": "2019-11-20T20:50:07Z",
- "deleted_at": null
}
], - "selection_options": [
- {
- "id": 1,
- "shop_id": 1,
- "subscription_group_id": 1,
- "platform_entity_id": "1357908642",
- "created_at": "2019-11-20T20:50:07Z",
- "updated_at": "2019-11-20T20:50:07Z",
- "deleted_at": null,
- "entity_id": 1472540
}
], - "prepaid_durations": [
- { }
]
}
]
}
Create Subscription Group
Create a subscription group.
Authorizations:
path Parameters
shop_identifier required | string Example: 123456 The unique identifier of the shop. |
Request Body schema: application/jsonrequired
object (SubscriptionGroupEntity) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Responses
Request samples
- Payload
{- "subscription_group": {
- "internal_name": "Standard Subscription",
- "is_enabled": true,
- "platform_id": "gid://shopify/SellingPlanGroup/132016692",
- "allow_prepaid": false,
- "is_prepaid_only": false,
- "should_continue_prepaid": false,
- "continue_prepaid_type": "as_prepaid",
- "allow_buffer_days": true,
- "discount_type": "no_discount",
- "percent_discount": 11,
- "fixed_discount": 0,
- "minimum_order_count_before_cancellable": 0,
- "is_product_swappable": false,
- "is_subscription_only": false,
- "selection_type": "products",
- "group_type": "selectable",
- "selectable_daily_allowed": false,
- "selectable_weekly_allowed": false,
- "selectable_yearly_allowed": false,
- "selectable_max_interval_frequency": 0,
- "fixed_interval_type": "monthly",
- "is_fixed_billing": false,
- "can_add_to_cart": true,
- "billing_rules": [
- {
- "interval_number": 1,
- "interval_type": "month",
- "interval_name": "Monthly",
- "week_type": "",
- "week_day": 0,
- "month_type": "purchase_day",
- "month_day": "",
- "month_occurrence": "",
- "month_occurrence_day": "MO",
- "year_type": "purchase_day",
- "year_month": "",
- "year_occurrence": "",
- "year_occurrence_day": "",
- "billing_rule": "FREQ=MONTHLY",
- "custom_billing_rule": "string",
- "buffer_days": 365,
- "buffer_time": "01:00:00"
}
], - "selection_options": [
- {
- "platform_entity_id": "1357908642",
- "bold_platform_entity_id": 1234
}
], - "prepaid_durations": [
- {
- "total_duration": 1,
- "discount_value": 0,
- "discount_type": "percentage"
}
], - "dynamic_discounts": [
- {
- "order_number": 1,
- "discount_type": "fixed",
- "discount_value": 25
}
]
}
}
Response samples
- 200
- 401
{- "subscription_group": {
- "id": 19364,
- "shop_id": 8846,
- "internal_name": "Standard Subscription",
- "is_enabled": true,
- "platform_id": "gid://shopify/SellingPlanGroup/132016692",
- "allow_prepaid": false,
- "is_prepaid_only": false,
- "should_continue_prepaid": false,
- "continue_prepaid_type": "as_prepaid",
- "allow_buffer_days": true,
- "discount_type": "no_discount",
- "percent_discount": 11,
- "fixed_discount": 0,
- "minimum_order_count_before_cancellable": 0,
- "is_product_swappable": false,
- "is_subscription_only": false,
- "selection_type": "products",
- "group_type": "selectable",
- "selectable_daily_allowed": false,
- "selectable_weekly_allowed": false,
- "selectable_yearly_allowed": false,
- "selectable_max_interval_frequency": 0,
- "fixed_interval_type": "monthly",
- "is_fixed_billing": false,
- "can_add_to_cart": true,
- "created_at": "2019-11-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z",
- "deleted_at": null,
- "active_subscribers_count": 1,
- "billing_rules": [
- {
- "id": 1,
- "shop_id": 1,
- "subscription_group_id": 1,
- "interval_number": 1,
- "interval_type": "month",
- "interval_name": "Monthly",
- "week_type": "",
- "week_day": 0,
- "month_type": "purchase_day",
- "month_day": "",
- "month_occurrence": "",
- "month_occurrence_day": "MO",
- "year_type": "purchase_day",
- "year_month": "",
- "year_occurrence": "",
- "year_occurrence_day": "",
- "billing_rule": "FREQ=MONTHLY",
- "created_at": "2019-11-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z",
- "deleted_at": null,
- "custom_billing_rule": "string",
- "buffer_days": 365,
- "buffer_time": "01:00:00"
}
], - "selection_options": [
- {
- "id": 1,
- "shop_id": 1,
- "subscription_group_id": 1,
- "platform_entity_id": "1357908642",
- "created_at": "2019-11-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z",
- "deleted_at": null,
- "entity_id": 1472540,
- "bold_platform_entity_id": 1234
}
], - "prepaid_durations": [
- {
- "id": 0,
- "total_duration": 1,
- "discount_value": 0,
- "discount_type": "percentage",
- "created_at": "2019-11-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z",
- "deleted_at": null
}
], - "dynamic_discounts": [
- {
- "order_number": 1,
- "discount_type": "fixed",
- "discount_value": 25
}
]
}
}
Get Subscription Group
Retrieve a subscription group by its id.
Authorizations:
path Parameters
shop_identifier required | string Example: 123456 The unique identifier of the shop. |
group_id required | integer The subscription group identifier. |
Responses
Response samples
- 200
- 401
{- "subscription_group": {
- "id": 19364,
- "shop_id": 8846,
- "internal_name": "Standard Subscription",
- "is_enabled": true,
- "platform_id": "gid://shopify/SellingPlanGroup/132016692",
- "allow_prepaid": false,
- "is_prepaid_only": false,
- "should_continue_prepaid": false,
- "continue_prepaid_type": "as_prepaid",
- "allow_buffer_days": true,
- "discount_type": "no_discount",
- "percent_discount": 11,
- "fixed_discount": 0,
- "minimum_order_count_before_cancellable": 0,
- "is_product_swappable": false,
- "is_subscription_only": false,
- "selection_type": "products",
- "group_type": "selectable",
- "selectable_daily_allowed": false,
- "selectable_weekly_allowed": false,
- "selectable_yearly_allowed": false,
- "selectable_max_interval_frequency": 0,
- "fixed_interval_type": "monthly",
- "is_fixed_billing": false,
- "can_add_to_cart": true,
- "created_at": "2019-11-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z",
- "deleted_at": null,
- "active_subscribers_count": 1,
- "billing_rules": [
- {
- "id": 1,
- "shop_id": 1,
- "subscription_group_id": 1,
- "interval_number": 1,
- "interval_type": "month",
- "interval_name": "Monthly",
- "week_type": "",
- "week_day": 0,
- "month_type": "purchase_day",
- "month_day": "",
- "month_occurrence": "",
- "month_occurrence_day": "MO",
- "year_type": "purchase_day",
- "year_month": "",
- "year_occurrence": "",
- "year_occurrence_day": "",
- "billing_rule": "FREQ=MONTHLY",
- "created_at": "2019-11-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z",
- "deleted_at": null,
- "custom_billing_rule": "string",
- "buffer_days": 365,
- "buffer_time": "01:00:00"
}
], - "selection_options": [
- {
- "id": 1,
- "shop_id": 1,
- "subscription_group_id": 1,
- "platform_entity_id": "1357908642",
- "created_at": "2019-11-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z",
- "deleted_at": null,
- "entity_id": 1472540,
- "bold_platform_entity_id": 1234
}
], - "prepaid_durations": [
- {
- "id": 0,
- "total_duration": 1,
- "discount_value": 0,
- "discount_type": "percentage",
- "created_at": "2019-11-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z",
- "deleted_at": null
}
], - "dynamic_discounts": [
- {
- "order_number": 1,
- "discount_type": "fixed",
- "discount_value": 25
}
]
}
}
Update Subscription Group
Update a subscription group by its id.
Authorizations:
path Parameters
shop_identifier required | string Example: 123456 The unique identifier of the shop. |
group_id required | integer The subscription group identifier. |
Request Body schema: application/jsonrequired
object (SubscriptionGroupEntity) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Responses
Request samples
- Payload
{- "subscription_group": {
- "internal_name": "Standard Subscription",
- "is_enabled": true,
- "platform_id": "gid://shopify/SellingPlanGroup/132016692",
- "allow_prepaid": false,
- "is_prepaid_only": false,
- "should_continue_prepaid": false,
- "continue_prepaid_type": "as_prepaid",
- "allow_buffer_days": true,
- "discount_type": "no_discount",
- "percent_discount": 11,
- "fixed_discount": 0,
- "minimum_order_count_before_cancellable": 0,
- "is_product_swappable": false,
- "is_subscription_only": false,
- "selection_type": "products",
- "group_type": "selectable",
- "selectable_daily_allowed": false,
- "selectable_weekly_allowed": false,
- "selectable_yearly_allowed": false,
- "selectable_max_interval_frequency": 0,
- "fixed_interval_type": "monthly",
- "is_fixed_billing": false,
- "can_add_to_cart": true,
- "billing_rules": [
- {
- "interval_number": 1,
- "interval_type": "month",
- "interval_name": "Monthly",
- "week_type": "",
- "week_day": 0,
- "month_type": "purchase_day",
- "month_day": "",
- "month_occurrence": "",
- "month_occurrence_day": "MO",
- "year_type": "purchase_day",
- "year_month": "",
- "year_occurrence": "",
- "year_occurrence_day": "",
- "billing_rule": "FREQ=MONTHLY",
- "custom_billing_rule": "string",
- "buffer_days": 365,
- "buffer_time": "01:00:00"
}
], - "selection_options": [
- {
- "platform_entity_id": "1357908642",
- "bold_platform_entity_id": 1234
}
], - "prepaid_durations": [
- {
- "total_duration": 1,
- "discount_value": 0,
- "discount_type": "percentage"
}
], - "dynamic_discounts": [
- {
- "order_number": 1,
- "discount_type": "fixed",
- "discount_value": 25
}
]
}
}
Response samples
- 200
- 401
{- "subscription_group": {
- "id": 19364,
- "shop_id": 8846,
- "internal_name": "Standard Subscription",
- "is_enabled": true,
- "platform_id": "gid://shopify/SellingPlanGroup/132016692",
- "allow_prepaid": false,
- "is_prepaid_only": false,
- "should_continue_prepaid": false,
- "continue_prepaid_type": "as_prepaid",
- "allow_buffer_days": true,
- "discount_type": "no_discount",
- "percent_discount": 11,
- "fixed_discount": 0,
- "minimum_order_count_before_cancellable": 0,
- "is_product_swappable": false,
- "is_subscription_only": false,
- "selection_type": "products",
- "group_type": "selectable",
- "selectable_daily_allowed": false,
- "selectable_weekly_allowed": false,
- "selectable_yearly_allowed": false,
- "selectable_max_interval_frequency": 0,
- "fixed_interval_type": "monthly",
- "is_fixed_billing": false,
- "can_add_to_cart": true,
- "created_at": "2019-11-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z",
- "deleted_at": null,
- "active_subscribers_count": 1,
- "billing_rules": [
- {
- "id": 1,
- "shop_id": 1,
- "subscription_group_id": 1,
- "interval_number": 1,
- "interval_type": "month",
- "interval_name": "Monthly",
- "week_type": "",
- "week_day": 0,
- "month_type": "purchase_day",
- "month_day": "",
- "month_occurrence": "",
- "month_occurrence_day": "MO",
- "year_type": "purchase_day",
- "year_month": "",
- "year_occurrence": "",
- "year_occurrence_day": "",
- "billing_rule": "FREQ=MONTHLY",
- "created_at": "2019-11-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z",
- "deleted_at": null,
- "custom_billing_rule": "string",
- "buffer_days": 365,
- "buffer_time": "01:00:00"
}
], - "selection_options": [
- {
- "id": 1,
- "shop_id": 1,
- "subscription_group_id": 1,
- "platform_entity_id": "1357908642",
- "created_at": "2019-11-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z",
- "deleted_at": null,
- "entity_id": 1472540,
- "bold_platform_entity_id": 1234
}
], - "prepaid_durations": [
- {
- "id": 0,
- "total_duration": 1,
- "discount_value": 0,
- "discount_type": "percentage",
- "created_at": "2019-11-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z",
- "deleted_at": null
}
], - "dynamic_discounts": [
- {
- "order_number": 1,
- "discount_type": "fixed",
- "discount_value": 25
}
]
}
}
Delete Subscription Group
Delete a subscription group by its id.
Authorizations:
path Parameters
shop_identifier required | string Example: 123456 The unique identifier of the shop. |
group_id required | integer The subscription group identifier. |
Responses
Response samples
- 401
{- "error": "invalid_request",
- "error_description": "The access token is missing"
}
Delete Selection Option by ID
Delete a selection option from inside a subscription group.
Authorizations:
path Parameters
shop_identifier required | string Example: 123456 The unique identifier of the shop. |
group_id required | integer The subscription group identifier. |
selection_option_id required | string Selection option ID of the item to be deleted from the group. |
Responses
Delete Selection Option by Filter
Delete one or more selection options from inside a subscription group.
Authorizations:
path Parameters
shop_identifier required | string Example: 123456 The unique identifier of the shop. |
group_id required | integer The subscription group identifier. |
query Parameters
filter required | string Accepts filtering options as described here: https://developer.boldcommerce.com/guides/subscriptions-v2/resources/query-pagination. Example: to remove the platform product IDs 1, 2 and 3 from a subscription group, the following query param must be added: ?filter=in(platform_entity_id:1,2,3) |
Responses
Add Selection Options by Platform Product ID(s)
Add one or more selection options from inside a subscription group.
Authorizations:
path Parameters
shop_identifier required | string Example: 123456 The unique identifier of the shop. |
group_id required | integer The subscription group identifier. |
Request Body schema: application/json
Add one or more selection options to a subscription group. Right now the only supported selection option is product. A list of platform product IDs can be passed as platform_entity_ids.
required | object | ||||||
|
Responses
Request samples
- Payload
{- "subscription_group": {
- "selection_options": {
- "platform_entity_ids": [
- 7021943390389,
- 7003068956853,
- 7014441746613
]
}
}
}
A child resource of Subscriptions. Contains information about line items in a subscription, including price, details, and swappable products. Use these endpoints to get, remove, edit, or list line items for subscriptions.
Swap Line Items
Swap line item products on a subscription.
Authorizations:
path Parameters
shop_identifier required | string Example: 123456 The unique identifier of the shop. |
subscription_id required | integer The subscription identifier. |
Request Body schema: application/jsonrequired
Array of objects (SwapProductEntity) | |||||||||
Array
|
Responses
Request samples
- Payload
{- "swap_products": [
- {
- "line_item_id": 1,
- "platform_product_id": "1357908642",
- "platform_variant_id": "2468097531",
- "subscription_group_id": 1
}
]
}
Response samples
- 200
- 401
{- "subscription": {
- "id": 1,
- "external_id": "string",
- "customer": "null",
- "shop_id": 1,
- "next_order_datetime": "2020-01-20T18:00:00Z",
- "next_payment_datetime": "2020-01-20T18:00:00Z",
- "next_processing_datetime": "2020-01-20T18:00:00Z",
- "subscription_status": "active",
- "status_changed_at": "2019-11-20T20:31:55Z",
- "payment_method_token": "jik1w6HrCn17CxXPcKwHTGqqvm8wLDd1PelY6k8mabglNmL8XKBnsde9PdgKZqnG",
- "payment_gateway_public_id": "jik1w6HrCn17CxXPcKwHTGqqvm8wLDd1PelY6k8mabglNmL8XKBnsde9PdgKZqnG",
- "payment_rrule": "DTSTART:20200120T180000Z\\nRRULE:FREQ=MONTHLY\\nEXDATE:20200220T180000Z",
- "payment_rrule_text": "Monthly",
- "order_rrule": "DTSTART:20200120T180000Z\\nRRULE:FREQ=MONTHLY\\nEXDATE:20200220T180000Z",
- "order_rrule_text": "Monthly",
- "last_payment_datetime": "2019-11-20T20:55:26Z",
- "last_order_datetime": "2019-11-20T20:55:26Z",
- "last_processed_datetime": "2019-11-20T20:55:26Z",
- "current_retries": 3,
- "charged_currency": "CAD",
- "base_to_charged_exchange_rate": 1,
- "base_currency": "CAD",
- "line_items": [
- {
- "id": 1,
- "subscription_id": 1,
- "platform_id": "ABC123",
- "platform_product_id": "1357908642",
- "platform_variant_id": "2468097531",
- "subscription_group_id": 1,
- "subscription_group_billing_rules_id": 1,
- "title": "Monthly Expansion Pack",
- "product_name": "Monthly Expansion Pack",
- "variant_name": "Default Title",
- "sku": "SKU-113-Red",
- "image": "",
- "quantity": 1,
- "price": 3500,
- "price_charged": 3200,
- "discounted_price": 3200,
- "discounted_price_charged": 3200,
- "full_price": 3200,
- "full_price_charged": 3200,
- "requires_shipping": false,
- "grams": 2200,
- "weight": 2.2,
- "weight_unit": "kg",
- "taxable": true,
- "discounts": [
- {
- "id": 1,
- "subscription_line_item_id": 1,
- "shop_id": 5,
- "full_price": 5,
- "discount_type": "percentage",
- "percentage_value": 10,
- "fixed_value": 0,
- "fixed_value_charged": 0,
- "description": "Subscription discount (10%) for Monthly Expansion Pack",
- "created_at": "2019-11-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z",
- "deleted_at": "2019-11-20T20:31:55Z"
}
], - "prepaid_metadata": {
- "id": 1,
- "line_item_id": 2,
- "prepaid_duration": 2,
- "current_recurrence_count": 2,
- "prepaid_continue": "no_continue"
}, - "line_item_attributes": [
- {
- "name": "size_preference",
- "value": "XL",
- "created_at": "2021-01-17T20:30:40Z",
- "updated_at": "2021-01-17T20:30:40Z",
- "subscription_id": 435989,
- "line_item_id": 45734
}
], - "created_at": "2019-11-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z"
}
], - "shipping_lines": [
- {
- "id": 36217,
- "name": "Standard Shipping",
- "code": "Standard Shipping",
- "price": 1000,
- "value": 1000,
- "value_charged": 1000,
- "tag": "Shipping",
- "created_at": "2019-10-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z",
- "subscription_id": 1
}
], - "billing_address": {
- "id": 1,
- "shop_identifier": "12345",
- "platform_id": "14",
- "customer_id": 2,
- "platform_type": "shopify",
- "platform_customer_id": "35",
- "first_name": "John",
- "last_name": "Doe",
- "company": "Example Company",
- "phone": "123-456-7890",
- "street1": "123 example st.",
- "street2": "101",
- "city": "Toronto",
- "province": "Ontario",
- "province_code": "ON",
- "country": "Canada",
- "country_code": "CA",
- "zip": "M5V 3L9",
- "is_default": true,
- "address_use": "billing",
- "address_source": "platform",
- "created_at": "2022-12-25T00:00:00Z",
- "updated_at": "2022-12-25T00:00:00Z",
- "deleted_at": "2022-12-25T00:00:00Z"
}, - "shipping_address": {
- "id": 1,
- "shop_identifier": "12345",
- "platform_id": "14",
- "customer_id": 2,
- "platform_type": "shopify",
- "platform_customer_id": "35",
- "first_name": "John",
- "last_name": "Doe",
- "company": "Example Company",
- "phone": "123-456-7890",
- "street1": "123 example st.",
- "street2": "101",
- "city": "Toronto",
- "province": "Ontario",
- "province_code": "ON",
- "country": "Canada",
- "country_code": "CA",
- "zip": "M5V 3L9",
- "is_default": true,
- "address_use": "billing",
- "address_source": "platform",
- "created_at": "2022-12-25T00:00:00Z",
- "updated_at": "2022-12-25T00:00:00Z",
- "deleted_at": "2022-12-25T00:00:00Z"
}, - "idempotency_key": "JwGdN55C4g1z5FXRO8Hp21CMxUxKyo6VcGSf3cUsjCgNyTtoeZcIsGM1We4p7pCe-0",
- "placed_at": "2012-11-20T20:31:55Z",
- "created_at": "2019-11-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z",
- "percent_discount": 10,
- "discount_code": "DISCOUNTCODE",
- "customer_id": 1697912,
- "billing_address_id": 11697812,
- "shipping_address_id": 11697812,
- "orders_processed": 1,
- "last_failure_code": "card_expired",
- "last_failure_details": {
- "message": "The order couldn't process because the card was declined."
}, - "last_failure_reason": "credit_card",
- "note": "Staff note",
- "order_note": "Customer note",
- "order_count": 1
}
}
Update Line Items
Update the line items of a subscription. Refer to Manage Subscription Line Items for more information about the use cases of this endpoint.
When updating the price of the line item, change the price
field in the request body. This value must be in the charged_currency
of the subscription, and it must be in the base currency unit (i.e., cents). This price is the final output price of the line item on this order; any applicable subscription group discounts or price changes will not be applied.
Example: If you include price: 4000 in the request body, the line item price is set to $40.00 CAD for all upcoming orders.
Authorizations:
path Parameters
shop_identifier required | string Example: 123456 The unique identifier of the shop. |
subscription_id required | integer The subscription identifier. |
Request Body schema: application/jsonrequired
object | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Responses
Request samples
- Payload
{- "subscription": {
- "line_items": [
- {
- "id": 1,
- "subscription_id": 1,
- "platform_id": "ABC123",
- "platform_product_id": "1357908642",
- "platform_variant_id": "2468097531",
- "subscription_group_id": 1,
- "subscription_group_billing_rules_id": 1,
- "title": "Monthly Expansion Pack",
- "product_name": "Monthly Expansion Pack",
- "variant_name": "Default Title",
- "sku": "SKU-113-Red",
- "image": "",
- "quantity": 1,
- "price": 3500,
- "price_charged": 3200,
- "discounted_price": 3200,
- "discounted_price_charged": 3200,
- "full_price": 3200,
- "full_price_charged": 3200,
- "requires_shipping": false,
- "grams": 2200,
- "weight": 2.2,
- "weight_unit": "kg",
- "taxable": true,
- "discounts": [
- {
- "id": 1,
- "subscription_line_item_id": 1,
- "shop_id": 5,
- "full_price": 5,
- "discount_type": "percentage",
- "percentage_value": 10,
- "fixed_value": 0,
- "fixed_value_charged": 0,
- "description": "Subscription discount (10%) for Monthly Expansion Pack"
}
], - "prepaid_metadata": null,
- "line_item_attributes": [
- {
- "name": "size_preference",
- "value": "XL"
}
]
}
]
}
}
Response samples
- 200
- 401
{- "subscription": {
- "id": 1,
- "external_id": "string",
- "customer": "null",
- "shop_id": 1,
- "next_order_datetime": "2020-01-20T18:00:00Z",
- "next_payment_datetime": "2020-01-20T18:00:00Z",
- "next_processing_datetime": "2020-01-20T18:00:00Z",
- "subscription_status": "active",
- "status_changed_at": "2019-11-20T20:31:55Z",
- "payment_method_token": "jik1w6HrCn17CxXPcKwHTGqqvm8wLDd1PelY6k8mabglNmL8XKBnsde9PdgKZqnG",
- "payment_gateway_public_id": "jik1w6HrCn17CxXPcKwHTGqqvm8wLDd1PelY6k8mabglNmL8XKBnsde9PdgKZqnG",
- "payment_rrule": "DTSTART:20200120T180000Z\\nRRULE:FREQ=MONTHLY\\nEXDATE:20200220T180000Z",
- "payment_rrule_text": "Monthly",
- "order_rrule": "DTSTART:20200120T180000Z\\nRRULE:FREQ=MONTHLY\\nEXDATE:20200220T180000Z",
- "order_rrule_text": "Monthly",
- "last_payment_datetime": "2019-11-20T20:55:26Z",
- "last_order_datetime": "2019-11-20T20:55:26Z",
- "last_processed_datetime": "2019-11-20T20:55:26Z",
- "current_retries": 3,
- "charged_currency": "CAD",
- "base_to_charged_exchange_rate": 1,
- "base_currency": "CAD",
- "line_items": [
- {
- "id": 1,
- "subscription_id": 1,
- "platform_id": "ABC123",
- "platform_product_id": "1357908642",
- "platform_variant_id": "2468097531",
- "subscription_group_id": 1,
- "subscription_group_billing_rules_id": 1,
- "title": "Monthly Expansion Pack",
- "product_name": null,
- "variant_name": null,
- "sku": "SKU-113-Red",
- "image": "",
- "quantity": 1,
- "price": 3500,
- "price_charged": 3200,
- "discounted_price": 3200,
- "discounted_price_charged": 3200,
- "full_price": 3200,
- "full_price_charged": 3200,
- "requires_shipping": false,
- "grams": 2200,
- "weight": 2.2,
- "weight_unit": "kg",
- "taxable": true,
- "discounts": [
- {
- "id": 1,
- "subscription_line_item_id": 1,
- "shop_id": 5,
- "full_price": 5,
- "discount_type": "percentage",
- "percentage_value": 10,
- "fixed_value": 0,
- "fixed_value_charged": 0,
- "description": "Subscription discount (10%) for Monthly Expansion Pack",
- "created_at": "2019-11-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z",
- "deleted_at": "2019-11-20T20:31:55Z"
}
], - "prepaid_metadata": {
- "id": 1,
- "line_item_id": 2,
- "prepaid_duration": 2,
- "current_recurrence_count": 2,
- "prepaid_continue": "no_continue"
}, - "line_item_attributes": [
- {
- "name": "size_preference",
- "value": "XL",
- "created_at": "2021-01-17T20:30:40Z",
- "updated_at": "2021-01-17T20:30:40Z",
- "subscription_id": 435989,
- "line_item_id": 45734
}
], - "created_at": "2019-11-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z"
}
], - "shipping_lines": [
- {
- "id": 36217,
- "name": "Standard Shipping",
- "code": "Standard Shipping",
- "price": 1000,
- "value": 1000,
- "value_charged": 1000,
- "tag": "Shipping",
- "created_at": "2019-10-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z",
- "subscription_id": 1
}
], - "billing_address": {
- "id": 1,
- "shop_identifier": "12345",
- "platform_id": "14",
- "customer_id": 2,
- "platform_type": "shopify",
- "platform_customer_id": "35",
- "first_name": "John",
- "last_name": "Doe",
- "company": "Example Company",
- "phone": "123-456-7890",
- "street1": "123 example st.",
- "street2": "101",
- "city": "Toronto",
- "province": "Ontario",
- "province_code": "ON",
- "country": "Canada",
- "country_code": "CA",
- "zip": "M5V 3L9",
- "is_default": true,
- "address_use": "billing",
- "address_source": "platform",
- "created_at": "2022-12-25T00:00:00Z",
- "updated_at": "2022-12-25T00:00:00Z",
- "deleted_at": "2022-12-25T00:00:00Z"
}, - "shipping_address": {
- "id": 1,
- "shop_identifier": "12345",
- "platform_id": "14",
- "customer_id": 2,
- "platform_type": "shopify",
- "platform_customer_id": "35",
- "first_name": "John",
- "last_name": "Doe",
- "company": "Example Company",
- "phone": "123-456-7890",
- "street1": "123 example st.",
- "street2": "101",
- "city": "Toronto",
- "province": "Ontario",
- "province_code": "ON",
- "country": "Canada",
- "country_code": "CA",
- "zip": "M5V 3L9",
- "is_default": true,
- "address_use": "billing",
- "address_source": "platform",
- "created_at": "2022-12-25T00:00:00Z",
- "updated_at": "2022-12-25T00:00:00Z",
- "deleted_at": "2022-12-25T00:00:00Z"
}, - "idempotency_key": "JwGdN55C4g1z5FXRO8Hp21CMxUxKyo6VcGSf3cUsjCgNyTtoeZcIsGM1We4p7pCe-0",
- "placed_at": "2012-11-20T20:31:55Z",
- "created_at": "2019-11-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z",
- "percent_discount": 10,
- "discount_code": "DISCOUNTCODE",
- "customer_id": 1697912,
- "billing_address_id": 11697812,
- "shipping_address_id": 11697812,
- "orders_processed": 1,
- "last_failure_code": "card_expired",
- "last_failure_details": {
- "message": "The order couldn't process because the card was declined."
}, - "last_failure_reason": "credit_card",
- "note": "Staff note",
- "order_note": "Customer note"
}
}
Delete Line Item
Delete a line item from a subscription.
Authorizations:
path Parameters
shop_identifier required | string Example: 123456 The unique identifier of the shop. |
subscription_id required | integer The subscription identifier. |
line_item_id required | integer Line item ID to view and manage data for. |
Responses
Response samples
- 200
- 401
{- "subscription": {
- "id": 1,
- "external_id": "string",
- "customer": "null",
- "shop_id": 1,
- "next_order_datetime": "2020-01-20T18:00:00Z",
- "next_payment_datetime": "2020-01-20T18:00:00Z",
- "next_processing_datetime": "2020-01-20T18:00:00Z",
- "subscription_status": "active",
- "status_changed_at": "2019-11-20T20:31:55Z",
- "payment_method_token": "jik1w6HrCn17CxXPcKwHTGqqvm8wLDd1PelY6k8mabglNmL8XKBnsde9PdgKZqnG",
- "payment_gateway_public_id": "jik1w6HrCn17CxXPcKwHTGqqvm8wLDd1PelY6k8mabglNmL8XKBnsde9PdgKZqnG",
- "payment_rrule": "DTSTART:20200120T180000Z\\nRRULE:FREQ=MONTHLY\\nEXDATE:20200220T180000Z",
- "payment_rrule_text": "Monthly",
- "order_rrule": "DTSTART:20200120T180000Z\\nRRULE:FREQ=MONTHLY\\nEXDATE:20200220T180000Z",
- "order_rrule_text": "Monthly",
- "last_payment_datetime": "2019-11-20T20:55:26Z",
- "last_order_datetime": "2019-11-20T20:55:26Z",
- "last_processed_datetime": "2019-11-20T20:55:26Z",
- "current_retries": 3,
- "charged_currency": "CAD",
- "base_to_charged_exchange_rate": 1,
- "base_currency": "CAD",
- "line_items": [
- {
- "id": 1,
- "subscription_id": 1,
- "platform_id": "ABC123",
- "platform_product_id": "1357908642",
- "platform_variant_id": "2468097531",
- "subscription_group_id": 1,
- "subscription_group_billing_rules_id": 1,
- "title": "Monthly Expansion Pack",
- "product_name": "Monthly Expansion Pack",
- "variant_name": "Default Title",
- "sku": "SKU-113-Red",
- "image": "",
- "quantity": 1,
- "price": 3500,
- "price_charged": 3200,
- "discounted_price": 3200,
- "discounted_price_charged": 3200,
- "full_price": 3200,
- "full_price_charged": 3200,
- "requires_shipping": false,
- "grams": 2200,
- "weight": 2.2,
- "weight_unit": "kg",
- "taxable": true,
- "discounts": [
- {
- "id": 1,
- "subscription_line_item_id": 1,
- "shop_id": 5,
- "full_price": 5,
- "discount_type": "percentage",
- "percentage_value": 10,
- "fixed_value": 0,
- "fixed_value_charged": 0,
- "description": "Subscription discount (10%) for Monthly Expansion Pack",
- "created_at": "2019-11-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z",
- "deleted_at": "2019-11-20T20:31:55Z"
}
], - "prepaid_metadata": {
- "id": 1,
- "line_item_id": 2,
- "prepaid_duration": 2,
- "current_recurrence_count": 2,
- "prepaid_continue": "no_continue"
}, - "line_item_attributes": [
- {
- "name": "size_preference",
- "value": "XL",
- "created_at": "2021-01-17T20:30:40Z",
- "updated_at": "2021-01-17T20:30:40Z",
- "subscription_id": 435989,
- "line_item_id": 45734
}
], - "created_at": "2019-11-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z"
}
], - "shipping_lines": [
- {
- "id": 36217,
- "name": "Standard Shipping",
- "code": "Standard Shipping",
- "price": 1000,
- "value": 1000,
- "value_charged": 1000,
- "tag": "Shipping",
- "created_at": "2019-10-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z",
- "subscription_id": 1
}
], - "billing_address": {
- "id": 1,
- "shop_identifier": "12345",
- "platform_id": "14",
- "customer_id": 2,
- "platform_type": "shopify",
- "platform_customer_id": "35",
- "first_name": "John",
- "last_name": "Doe",
- "company": "Example Company",
- "phone": "123-456-7890",
- "street1": "123 example st.",
- "street2": "101",
- "city": "Toronto",
- "province": "Ontario",
- "province_code": "ON",
- "country": "Canada",
- "country_code": "CA",
- "zip": "M5V 3L9",
- "is_default": true,
- "address_use": "billing",
- "address_source": "platform",
- "created_at": "2022-12-25T00:00:00Z",
- "updated_at": "2022-12-25T00:00:00Z",
- "deleted_at": "2022-12-25T00:00:00Z"
}, - "shipping_address": {
- "id": 1,
- "shop_identifier": "12345",
- "platform_id": "14",
- "customer_id": 2,
- "platform_type": "shopify",
- "platform_customer_id": "35",
- "first_name": "John",
- "last_name": "Doe",
- "company": "Example Company",
- "phone": "123-456-7890",
- "street1": "123 example st.",
- "street2": "101",
- "city": "Toronto",
- "province": "Ontario",
- "province_code": "ON",
- "country": "Canada",
- "country_code": "CA",
- "zip": "M5V 3L9",
- "is_default": true,
- "address_use": "billing",
- "address_source": "platform",
- "created_at": "2022-12-25T00:00:00Z",
- "updated_at": "2022-12-25T00:00:00Z",
- "deleted_at": "2022-12-25T00:00:00Z"
}, - "idempotency_key": "JwGdN55C4g1z5FXRO8Hp21CMxUxKyo6VcGSf3cUsjCgNyTtoeZcIsGM1We4p7pCe-0",
- "placed_at": "2012-11-20T20:31:55Z",
- "created_at": "2019-11-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z",
- "percent_discount": 10,
- "discount_code": "DISCOUNTCODE",
- "customer_id": 1697912,
- "billing_address_id": 11697812,
- "shipping_address_id": 11697812,
- "orders_processed": 1,
- "last_failure_code": "card_expired",
- "last_failure_details": {
- "message": "The order couldn't process because the card was declined."
}, - "last_failure_reason": "credit_card",
- "note": "Staff note",
- "order_note": "Customer note",
- "order_count": 1
}
}
Get Line Item
Retrieve the details of a specific line item from a given subscription.
Authorizations:
path Parameters
shop_identifier required | string Example: 123456 The unique identifier of the shop. |
subscription_id required | integer The subscription identifier. |
line_item_id required | integer Line item ID to view and manage data for. |
Responses
Response samples
- 200
{- "subscription_line_item": {
- "id": 1,
- "subscription_id": 1,
- "platform_id": "ABC123",
- "platform_product_id": "1357908642",
- "platform_variant_id": "2468097531",
- "subscription_group_id": 1,
- "subscription_group_billing_rules_id": 1,
- "title": "Monthly Expansion Pack",
- "product_name": "Monthly Expansion Pack",
- "variant_name": "Default Title",
- "sku": "SKU-113-Red",
- "image": "",
- "quantity": 1,
- "price": 3500,
- "price_charged": 3200,
- "discounted_price": 3200,
- "discounted_price_charged": 3200,
- "full_price": 3200,
- "full_price_charged": 3200,
- "requires_shipping": false,
- "grams": 2200,
- "weight": 2.2,
- "weight_unit": "kg",
- "taxable": true,
- "discounts": [
- {
- "id": 1,
- "subscription_line_item_id": 1,
- "shop_id": 5,
- "full_price": 5,
- "discount_type": "percentage",
- "percentage_value": 10,
- "fixed_value": 0,
- "fixed_value_charged": 0,
- "description": "Subscription discount (10%) for Monthly Expansion Pack",
- "created_at": "2019-11-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z",
- "deleted_at": "2019-11-20T20:31:55Z"
}
], - "prepaid_metadata": {
- "id": 1,
- "line_item_id": 2,
- "prepaid_duration": 2,
- "current_recurrence_count": 2,
- "prepaid_continue": "no_continue"
}, - "line_item_attributes": [
- {
- "name": "size_preference",
- "value": "XL",
- "created_at": "2021-01-17T20:30:40Z",
- "updated_at": "2021-01-17T20:30:40Z",
- "subscription_id": 1,
- "line_item_id": 1
}
], - "created_at": "2019-11-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z"
}
}
List Swappable Products by Line Item
Retrieve a list of swappable products for a subscription line item.
Authorizations:
path Parameters
shop_identifier required | string Example: 123456 The unique identifier of the shop. |
subscription_id required | integer The subscription identifier. |
line_item_id required | integer Line item ID to view and manage data for. |
query Parameters
limit | integer Maximum number of results to be returned |
page | integer The desired page number for the paginated result |
Responses
Response samples
- 200
- 401
{- "swappable_products": [
- {
- "price": 1337,
- "price_charged": 1337,
- "discounted_price": 1337,
- "discounted_price_charged": 1337,
- "has_discount": true,
- "variants": [
- {
- "platform_id": "1",
- "platform_product_id": "112",
- "name": "Size Small",
- "sku": "SKU-112-Small",
- "price": 1337,
- "price_charged": 1337,
- "discounted_price": 1337,
- "discounted_price_charged": 1337,
- "discounted_cost": 1337,
- "discounted_cost_charged": 1337,
- "cost": 0,
- "weight": 1.5,
- "weight_unit": "kg",
- "grams": 1500,
- "image_id": 0,
- "image_url": "",
- "allow_backorder": false,
- "inventory_quantity": 0,
- "inventory_tracking_service": "platform",
- "inventory_tracking_entity": "product"
}
], - "title": "Monthly Expansion Pack",
- "product_name": "Monthly Expansion Pack",
- "platform_product_id": "1357908642",
- "subscription_group_id": 1
}
], - "pagination": {
- "total": 2,
- "count": 2,
- "per_page": 10,
- "total_pages": 1,
- "current_page": 1
}
}
Create Line Item Attributes
Add a new set of attributes to a line item.
Authorizations:
path Parameters
shop_identifier required | string Example: 123456 The unique identifier of the shop. |
subscription_id required | integer The subscription identifier. |
line_item_id required | integer Line item ID to view and manage data for. |
Request Body schema: application/json
Array of objects (LineItemAttributeEntity) | |||||
Array
|
Responses
Request samples
- Payload
{- "line_item_attributes": [
- {
- "name": "size_preference",
- "value": "XL"
}, - {
- "name": "color_preference",
- "value": "green"
}
]
}
Response samples
- 200
{- "line_item_attributes": [
- {
- "name": "size_preference",
- "value": "XL",
- "created_at": "2021-01-17T20:30:40Z",
- "updated_at": "2021-01-17T20:30:40Z",
- "subscription_id": 1,
- "line_item_id": 1
}, - {
- "name": "color_preference",
- "value": "green",
- "created_at": "2021-01-17T20:30:40Z",
- "updated_at": "2021-01-17T20:30:40Z",
- "subscription_id": 1,
- "line_item_id": 1
}
]
}
Update Line Item Attributes
Create, remove, or update attributes for a specific line item inside a subscription. Your request payload must contain the full list of attributes for the line item.
To add an attribute to the line item, include a new attribute in the request payload. To update an attribute that already exists on the line item, include the attribute in the payload with the same name and an updated value. To delete one attribute, leave the attribute out of the request payload. To remove all attributes of a line item, use an empty array as the request payload.
Authorizations:
path Parameters
shop_identifier required | string Example: 123456 The unique identifier of the shop. |
subscription_id required | integer The subscription identifier. |
line_item_id required | integer Line item ID to view and manage data for. |
Request Body schema: application/json
Array of objects (LineItemAttributeEntity) | |||||
Array
|
Responses
Request samples
- Payload
{- "line_item_attributes": [
- {
- "name": "size_preference",
- "value": "XL"
}, - {
- "name": "color_preference",
- "value": "green"
}
]
}
Response samples
- 200
{- "subscription_line_item": {
- "id": 1,
- "subscription_id": 1,
- "platform_id": "ABC123",
- "platform_product_id": "1357908642",
- "platform_variant_id": "2468097531",
- "subscription_group_id": 1,
- "subscription_group_billing_rules_id": 1,
- "title": "Monthly Expansion Pack",
- "product_name": "Monthly Expansion Pack",
- "variant_name": "Default Title",
- "sku": "SKU-113-Red",
- "image": "",
- "quantity": 1,
- "price": 3500,
- "price_charged": 3200,
- "discounted_price": 3200,
- "discounted_price_charged": 3200,
- "full_price": 3200,
- "full_price_charged": 3200,
- "requires_shipping": false,
- "grams": 2200,
- "weight": 2.2,
- "weight_unit": "kg",
- "taxable": true,
- "discounts": [
- {
- "id": 1,
- "subscription_line_item_id": 1,
- "shop_id": 5,
- "full_price": 5,
- "discount_type": "percentage",
- "percentage_value": 10,
- "fixed_value": 0,
- "fixed_value_charged": 0,
- "description": "Subscription discount (10%) for Monthly Expansion Pack",
- "created_at": "2019-11-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z",
- "deleted_at": "2019-11-20T20:31:55Z"
}
], - "prepaid_metadata": {
- "id": 1,
- "line_item_id": 2,
- "prepaid_duration": 2,
- "current_recurrence_count": 2,
- "prepaid_continue": "no_continue"
}, - "line_item_attributes": [
- {
- "name": "size_preference",
- "value": "XL",
- "created_at": "2021-01-17T20:30:40Z",
- "updated_at": "2021-01-17T20:30:40Z",
- "subscription_id": 1,
- "line_item_id": 1
}, - {
- "name": "color_preference",
- "value": "green",
- "created_at": "2021-01-17T20:30:40Z",
- "updated_at": "2021-01-17T20:30:40Z",
- "subscription_id": 1,
- "line_item_id": 1
}
], - "created_at": "2019-11-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z"
}
}
Create Line Item Prepaid Metadata
Add prepaid metadata to a line item to convert a subscription to prepaid. Adding this metadata to one line item converts the whole order to prepaid.
Note: Converting a subscription to prepaid does not automatically charge the customer for the balance of the prepaid subscription. To charge the customer the prepaid subscription amount on the next recurrence, set prepaid_duration
to the same value as prepaid_recurrence_count
, and set prepaid_continue
to as_prepaid
. This causes Bold to start a new prepaid subscription on the next recurrence and set the prepaid_recurrence_count
back to 1
.
Authorizations:
path Parameters
shop_identifier required | string Example: 123456 The unique identifier of the shop. |
subscription_id required | integer The subscription identifier. |
line_item_id required | integer Line item ID to view and manage data for. |
Request Body schema: application/json
object (PrepaidMetadataEntity) | |||||||||||
|
Responses
Request samples
- Payload
{- "prepaid_metadata": {
- "prepaid_continue": "as_prepaid",
- "prepaid_duration": 6,
- "current_recurrence_count": 6
}
}
Response samples
- 200
{- "prepaid_metadata": {
- "id": 1,
- "line_item_id": 2,
- "prepaid_duration": 2,
- "current_recurrence_count": 2,
- "prepaid_continue": "no_continue"
}
}
Update Line Item Prepaid Metadata
Update or create new prepaid metadata for a line item.
Note: Updating the prepaid_duration
or current_recurrence_count
does not result in any automatic charges or change in charges to an existing prepaid customer. Adding new prepaid metadata to a subscription converts it to prepaid. For more information on converting a subscription to prepaid, refer to the Create Line Item Prepaid Metadata endpoint.