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.
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": "no_continue",
- "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"
}
}
A child resource of Subscriptions. Contains information about orders in a subscription, including schedules, order histories, and current orders. Use these endpoints to list, get, skip, or unskip orders.
List Orders
Retrieve a list of subscription orders 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. |
query Parameters
page | integer The desired page number for the paginated result |
limit | integer Maximum number of results to be returned |
Responses
Response samples
- 200
- 401
{- "subscription_orders": [
- {
- "id": 151917,
- "subscription_id": 5266,
- "shop_id": 29875,
- "currency": "CAD",
- "base_to_charged_exchange_rate": 1,
- "base_currency": "CAD",
- "order": {
- "id": 185490,
- "platform_id": 1,
- "platform_customer_id": 123,
- "shop_identifier": "zya0kzb8hu",
- "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"
}
], - "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_addresses": [
- {
- "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"
}
], - "subtotal": 1337,
- "subtotal_charged": 1337,
- "subtotal_tax": 144,
- "subtotal_tax_charged": 144,
- "shipping_subtotal": 1000,
- "shipping_subtotal_charged": 1000,
- "shipping_tax": 0,
- "shipping_tax_charged": 0,
- "total": 2204,
- "total_charged": 2204,
- "total_tax": 144,
- "total_tax_charged": 144,
- "fulfillment_status": "pending",
- "source": "string",
- "payment_method": "Shopify Payments",
- "payment_method_details": {
- "type": "credit_card",
- "name": "John Doe",
- "billing_address": {
- "street": "123 Main Street",
- "city": "Toronto",
- "province": "Ontario",
- "country": "Canada",
- "zip": "H0H 0H0"
}, - "public_id": "jik1w6HrCn17CxXPDkWhtgyqvm8wLDd1PelY6k8mabglNmL8XKBnsde9PdgKZqnG",
- "update_method": "trigger_email",
- "cc_type": "Visa",
- "expiration": {
- "date": "2020-5",
- "timezone_type": "string",
- "timezone": "UTC"
}, - "last_four": "1111",
- "is_default": true,
}, - "shipping_method": "Subscription shipping",
- "shipping_rates": [
- {
- "id": 0,
- "bold_subscription_id": 0,
- "name": "string",
- "code": "string",
- "price": 0,
- "price_charged": 0,
- "value": 0,
- "value_charged": 0,
- "tag": "string",
- "hash": "string"
}
], - "tax_lines": [
- {
- "amount": 0,
- "amount_charged": 0,
- "name": "string",
- "rate": 0
}
], - "discounts": [
- {
- "discount_percentage": 10,
- "discount_type": "percentage",
- "text": "10PERCENTOFF",
- "value": 0,
- "value_charged": 0
}
], - "order_number": 0,
- "currency": "CAD",
- "currency_charged": "string",
- "currency_format": "string",
- "currency_format_charged": "string",
- "exchange_rate": 0,
- "test": false,
- "updated_at": "2019-11-20T20:31:55Z",
- "created_at": "2019-11-20T20:31:55Z",
- "placed_at": "2019-11-20T20:31:55Z",
- "deleted_at": "2021-07-09T18:13:27Z",
- "subscription_id": 5266
}, - "is_multi_currency": false,
- "created_at": "2019-11-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z"
}
]
}
Get Order
Retrieve a subscription order for 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. |
order_id required | integer The order identifier. |
Responses
Response samples
- 200
- 401
{- "id": 1008130,
- "subscription_id": 316561,
- "shop_id": 6481,
- "base_to_charged_exchange_rate": 1,
- "base_currency": "CAD",
- "order": {
- "id": 185490,
- "platform_id": 1,
- "platform_customer_id": 123,
- "shop_identifier": "zya0kzb8hu",
- "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"
}
], - "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_addresses": [
- {
- "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"
}
], - "subtotal": 1337,
- "subtotal_charged": 1337,
- "subtotal_tax": 144,
- "subtotal_tax_charged": 144,
- "shipping_subtotal": 1000,
- "shipping_subtotal_charged": 1000,
- "shipping_tax": 0,
- "shipping_tax_charged": 0,
- "total": 2204,
- "total_charged": 2204,
- "total_tax": 144,
- "total_tax_charged": 144,
- "fulfillment_status": "pending",
- "source": "string",
- "payment_method": "Shopify Payments",
- "payment_method_details": {
- "type": "credit_card",
- "name": "John Doe",
- "billing_address": {
- "street": "123 Main Street",
- "city": "Toronto",
- "province": "Ontario",
- "country": "Canada",
- "zip": "H0H 0H0"
}, - "public_id": "jik1w6HrCn17CxXPDkWhtgyqvm8wLDd1PelY6k8mabglNmL8XKBnsde9PdgKZqnG",
- "update_method": "trigger_email",
- "cc_type": "Visa",
- "expiration": {
- "date": "2020-5",
- "timezone_type": "string",
- "timezone": "UTC"
}, - "last_four": "1111",
- "is_default": true,
}, - "shipping_method": "Subscription shipping",
- "shipping_rates": [
- {
- "id": 0,
- "bold_subscription_id": 0,
- "name": "string",
- "code": "string",
- "price": 0,
- "price_charged": 0,
- "value": 0,
- "value_charged": 0,
- "tag": "string",
- "hash": "string"
}
], - "tax_lines": [
- {
- "amount": 0,
- "amount_charged": 0,
- "name": "string",
- "rate": 0
}
], - "discounts": [
- {
- "discount_percentage": 10,
- "discount_type": "percentage",
- "text": "10PERCENTOFF",
- "value": 0,
- "value_charged": 0
}
], - "order_number": 0,
- "currency": "CAD",
- "currency_charged": "string",
- "currency_format": "string",
- "currency_format_charged": "string",
- "exchange_rate": 0,
- "test": false,
- "updated_at": "2019-11-20T20:31:55Z",
- "created_at": "2019-11-20T20:31:55Z",
- "placed_at": "2019-11-20T20:31:55Z",
- "deleted_at": "2021-07-09T18:13:27Z",
- "subscription_id": 5266
}, - "is_multi_currency": true,
- "created_at": "2021-07-09T18:13:40Z",
- "updated_at": "2021-07-09T18:13:40Z"
}
Update Next Order Datetime
Update the datetime of the next subscription order in RFC 3339 format.
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
nextDate | string |
includeFutureOrders | boolean Default: false Also adjust the order datetimes of all future orders to match the new next order date with the old interval. |
Responses
Request samples
- Payload
{- "nextDate": "2020-01-20T18:00:00Z",
- "includeFutureOrders": false
}
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
}
}
Unskip Previously Skipped Order
Restore a previously skipped future subscription order. Specify the date of the order to be unskipped.
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
date | string The date of the previously skipped order (to be restored/unskipped) |
Responses
Request samples
- Payload
{- "date": "2020-01-20T18:00:00Z"
}
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
}
}
Skip Subscription Order
Skip a subscription's upcoming order by date.
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
date | string |
Responses
Request samples
- Payload
{- "date": "2020-01-20T18:00:00Z"
}
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
}
}
A child resource of Subscriptions. Contains information about future adjustments to a subscription or its orders. Use these endpoints to create, list, or delete adjustments for a subscription.
Create Subscription Adjustments
Creates adjustments for a subscription or its orders.
For more information on subscription adjustments, refer to the Adjust Subscription Orders guide.
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/json
Array of objects (SubscriptionAdjustment) | |||||||||||
Array
|
Responses
Request samples
- Payload
{- "adjustments": [
- {
- "name": "Foundation Brush Cross-Sell",
- "description": "Loving our beauty box? Up your game with the versatile, made-in-house Foundation Brush!",
- "target": "order",
- "trigger": {
- "type": "order_count",
- "count": 3
}, - "action": {
- "type": "add_line_item",
- "platform_variant_id": "17169270472755",
- "platform_product_id": "1841889509427",
- "quantity": 1,
- "price": 1500
}
}
]
}
Response samples
- 200
- 400
- 422
{- "adjustments": [
- {
- "id": 74928,
- "name": "One-time Upsell (Gift)",
- "description": "Enjoy a complementary gift every 5th order for being a loyal customer!",
- "target": "order",
- "trigger": {
- "type": "order_count",
- "count": 5,
- "relative_count": 5,
- "function": {
- "step_size": 5,
- "offset": 0
}
}, - "action": {
- "type": "add_line_item",
- "platform_product_id": "1578934692",
- "platform_variant_id": "975285185",
- "quantity": 1,
- "price": 1500
}, - "invalid_at": null,
- "created_at": "2024-10-15T06:00:00Z",
- "updated_at": "2024-10-15T06:00:00Z",
- "deleted_at": null
}
]
}
List Subscription Adjustments
Lists adjustments for a subscription or its orders.
Authorizations:
path Parameters
shop_identifier required | string Example: 123456 The unique identifier of the shop. |
subscription_id required | integer The subscription identifier. |
query Parameters
filter | string Accepts filtering options as described in Query & Pagination. For example, to limit the request to all future adjustments to individual orders, the following query param may be added: |
Responses
Response samples
- 200
{- "adjustments": [
- {
- "id": 74928,
- "name": "One-time Upsell (Gift)",
- "description": "Enjoy a complementary gift every 5th order for being a loyal customer!",
- "target": "order",
- "trigger": {
- "type": "order_count",
- "count": 5,
- "relative_count": 5,
- "function": {
- "step_size": 5,
- "offset": 0
}
}, - "action": {
- "type": "add_line_item",
- "platform_product_id": "1578934692",
- "platform_variant_id": "975285185",
- "quantity": 1,
- "price": 1500
}, - "invalid_at": null,
- "created_at": "2024-10-15T06:00:00Z",
- "updated_at": "2024-10-15T06:00:00Z",
- "deleted_at": null
}
]
}
Delete Subscription Adjustments
Deletes adjustments for a subscription or its orders.
Authorizations:
path Parameters
shop_identifier required | string Example: 123456 The unique identifier of the shop. |
subscription_id required | integer The subscription identifier. |
query Parameters
filter | string Accepts filtering options as described in Query & Pagination. For example, to limit the request to all future adjustments to individual orders, the following query param may be added: |
Responses
Response samples
- 200
[ ]
Get Subscription Adjustment by ID
Gets an adjustment 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. |
adjustment_id required | integer The subscription adjustment identifier. |
Responses
Response samples
- 200
{- "adjustment": {
- "id": 74928,
- "name": "One-time Upsell (Gift)",
- "description": "Enjoy a complementary gift every 5th order for being a loyal customer!",
- "target": "order",
- "trigger": {
- "type": "order_count",
- "count": 5,
- "relative_count": 5,
- "function": {
- "step_size": 5,
- "offset": 0
}
}, - "action": {
- "type": "add_line_item",
- "platform_product_id": "1578934692",
- "platform_variant_id": "975285185",
- "quantity": 1,
- "price": 1500
}, - "invalid_at": null,
- "created_at": "2024-10-15T06:00:00Z",
- "updated_at": "2024-10-15T06:00:00Z",
- "deleted_at": null
}
}
Delete Subscription Adjustment by ID
Deletes an adjustment 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. |
adjustment_id required | integer The subscription adjustment identifier. |
Responses
Response samples
- 200
- 404
[ ]
Contains information about future orders for subscriptions. Use these endpoints to list future orders for a shop or individual subscriptions.
List Future Orders
Lists future subscription orders for the shop.
For more information, refer to the View Future Orders guide.
Authorizations:
path Parameters
shop_identifier required | string Example: 123456 The unique identifier of the shop. |
query Parameters
limit | integer Default: 50 Example: limit=10 The maximum number of results to be returned. |
filter | string Example: filter=lte(order_datetime:2024-05-10T23:59:59) Filter future orders. Accepts filtering options as described in the Query and Pagination reference. |
subscription_filter | string Example: subscription_filter=eq(bold_customer_id:3623267) Filter future orders. Accepts filtering options as described in the Query and Pagination reference. To see available filters, refer to the Future Orders guide. |
cursor | string Example: cursor=P3NpbmNlX2lkPTE1Mjc0Jm9yZGVyX2J5PWlkJm9yZGVyX2RpcmVjdGlvbj1kZXNj A Base-64 encoded cursor. Used to get a page of data on a cursor paginated request. Obtained from the response of a previous request. |
Responses
Response samples
- 200
- 401
{- "future_orders": [
- {
- "id": "53236-2024-05-21T08:00:00Z",
- "date": "2024-05-21T08:00:00Z",
- "bold_customer_id": 1697912,
- "bold_platform_subscription_id": 4712349,
- "currency": "USD",
- "order_count": 6,
- "subscription_data": {
- "id": 4712349,
- "order_count": 2,
- "discount_code": "BOXINGDAYSUB",
- "order_rrule": "DTSTART:20210521T080000Z\nRRULE:FREQ=MONTHLY",
- "base_currency": "CAD",
- "charged_currency": "USD",
- "base_to_charged_exchange_rate": 0.79,
- "placed_at": "2024-02-21T08:00:00Z"
}, - "is_skipped": false,
- "customer": {
- "customer": {
- "id": 2,
- "platform_id": "123456790",
- "cashier_public_id": null,
- "first_name": "Jane",
- "last_name": "Doe",
- "phone": "12045551234",
- "notes": "Loyal customer",
- "addresses": [
- {
- "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"
}
], - "default_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"
}, - "subscription_summary": {
- "bold_platform_customer_id": 2,
- "next_order_date": "2020-01-20T18:00:00Z",
- "last_order_date": "2019-11-20T20:55:27Z",
- "active_subscription_count": 2,
- "inactive_subscription_count": 1,
- "subscription_order_count": 5,
- "lifetime_value_usd": 152.12
}, - "labels": [
- {
- "id": 12,
- "customer_id": 21,
- "name": "bsub_subscription_active",
- "created_at": "2022-12-25T00:00:00Z",
- "updated_at": "2022-12-25T00:00:00Z",
- "deleted_at": "2022-12-25T00:00:00Z"
}
], - "created_at": "2022-12-25T00:00:00Z"
}
}, - "adjustments": [
- {
- "id": 74928,
- "name": "One-time Upsell (Gift)",
- "description": "Enjoy a complementary gift every 5th order for being a loyal customer!",
- "target": "order",
- "trigger": {
- "type": "order_count",
- "count": 5,
- "relative_count": 5,
- "function": {
- "step_size": 5,
- "offset": 0
}
}, - "action": {
- "type": "add_line_item",
- "platform_product_id": "1578934692",
- "platform_variant_id": "975285185",
- "quantity": 1,
- "price": 1500
}, - "invalid_at": null,
- "created_at": "2024-10-15T06:00:00Z",
- "updated_at": "2024-10-15T06:00:00Z",
- "deleted_at": null
}
], - "line_items": [
- {
- "future_order_id": "53236-2024-05-21T08:00:00Z",
- "bold_platform_subscription_id": 4712349,
- "bold_platform_subscription_line_item_id": 643723,
- "adjustment_id": 36217,
- "platform_id": "6434329530",
- "platform_product_id": "478723258026",
- "platform_variant_id": "92183258642",
- "title": "Roaster's Choice - 2lb",
- "product_name": "Roaster's Choice",
- "variant_name": "2lb",
- "sku": "RC-2LB",
- "url": "/products/roasters-choice",
- "quantity": 3,
- "price": 1000,
- "requires_shipping": true,
- "grams": 1043,
- "weight": 2.3,
- "weight_unit": "lb",
- "taxable": true,
- "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
}
], - "prepaid_metadata": {
- "prepaid_continue": "as_prepaid",
- "prepaid_duration": 6,
- "recurrence_count": 1,
- "requires_payment": true
}, - "subscription_group_id": 36236,
- "subscription_group_billing_rules_id": 78365,
- "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"
}
]
}
], - "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"
}
}
], - "pagination": {
- "count": 10,
- "next": "P3NpbmNlX2lkPTE1Mjc0Jm9yZGVyX2J5PWlkJm9yZGVyX2RpcmVjdGlvbj1kZXNj"
}
}
List Future Orders by Subscription ID
Lists future orders for a subscription.
For more information, refer to the View Future Orders guide.
Authorizations:
path Parameters
shop_identifier required | string Example: 123456 The unique identifier of the shop. |
subscription_id required | integer The subscription identifier. |
query Parameters
limit | integer Default: 50 Example: limit=10 The maximum number of results to be returned. |
filter | string Example: filter=lte(order_datetime:2024-05-10T23:59:59) Filter future orders. Accepts filtering options as described in the Query and Pagination reference. |
cursor | string Example: cursor=P3NpbmNlX2lkPTE1Mjc0Jm9yZGVyX2J5PWlkJm9yZGVyX2RpcmVjdGlvbj1kZXNj A Base-64 encoded cursor. Used to get a page of data on a cursor paginated request. Obtained from the response of a previous request. |
Responses
Response samples
- 200
- 401
{- "future_orders": [
- {
- "id": "53236-2024-05-21T08:00:00Z",
- "date": "2024-05-21T08:00:00Z",
- "bold_customer_id": 1697912,
- "bold_platform_subscription_id": 4712349,
- "currency": "USD",
- "order_count": 6,
- "subscription_data": {
- "id": 4712349,
- "order_count": 2,
- "discount_code": "BOXINGDAYSUB",
- "order_rrule": "DTSTART:20210521T080000Z\nRRULE:FREQ=MONTHLY",
- "base_currency": "CAD",
- "charged_currency": "USD",
- "base_to_charged_exchange_rate": 0.79,
- "placed_at": "2024-02-21T08:00:00Z"
}, - "is_skipped": false,
- "customer": {
- "customer": {
- "id": 2,
- "platform_id": "123456790",
- "cashier_public_id": null,
- "first_name": "Jane",
- "last_name": "Doe",
- "phone": "12045551234",
- "notes": "Loyal customer",
- "addresses": [
- {
- "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"
}
], - "default_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"
}, - "subscription_summary": {
- "bold_platform_customer_id": 2,
- "next_order_date": "2020-01-20T18:00:00Z",
- "last_order_date": "2019-11-20T20:55:27Z",
- "active_subscription_count": 2,
- "inactive_subscription_count": 1,
- "subscription_order_count": 5,
- "lifetime_value_usd": 152.12
}, - "labels": [
- {
- "id": 12,
- "customer_id": 21,
- "name": "bsub_subscription_active",
- "created_at": "2022-12-25T00:00:00Z",
- "updated_at": "2022-12-25T00:00:00Z",
- "deleted_at": "2022-12-25T00:00:00Z"
}
], - "created_at": "2022-12-25T00:00:00Z"
}
}, - "adjustments": [
- {
- "id": 74928,
- "name": "One-time Upsell (Gift)",
- "description": "Enjoy a complementary gift every 5th order for being a loyal customer!",
- "target": "order",
- "trigger": {
- "type": "order_count",
- "count": 5,
- "relative_count": 5,
- "function": {
- "step_size": 5,
- "offset": 0
}
}, - "action": {
- "type": "add_line_item",
- "platform_product_id": "1578934692",
- "platform_variant_id": "975285185",
- "quantity": 1,
- "price": 1500
}, - "invalid_at": null,
- "created_at": "2024-10-15T06:00:00Z",
- "updated_at": "2024-10-15T06:00:00Z",
- "deleted_at": null
}
], - "line_items": [
- {
- "future_order_id": "53236-2024-05-21T08:00:00Z",
- "bold_platform_subscription_id": 4712349,
- "bold_platform_subscription_line_item_id": 643723,
- "adjustment_id": 36217,
- "platform_id": "6434329530",
- "platform_product_id": "478723258026",
- "platform_variant_id": "92183258642",
- "title": "Roaster's Choice - 2lb",
- "product_name": "Roaster's Choice",
- "variant_name": "2lb",
- "sku": "RC-2LB",
- "url": "/products/roasters-choice",
- "quantity": 3,
- "price": 1000,
- "requires_shipping": true,
- "grams": 1043,
- "weight": 2.3,
- "weight_unit": "lb",
- "taxable": true,
- "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
}
], - "prepaid_metadata": {
- "prepaid_continue": "as_prepaid",
- "prepaid_duration": 6,
- "recurrence_count": 1,
- "requires_payment": true
}, - "subscription_group_id": 36236,
- "subscription_group_billing_rules_id": 78365,
- "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"
}
]
}
], - "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"
}
}
], - "pagination": {
- "count": 10,
- "next": "P3NpbmNlX2lkPTE1Mjc0Jm9yZGVyX2J5PWlkJm9yZGVyX2RpcmVjdGlvbj1kZXNj"
}
}
Use these endpoints to create, update, or delete convertible adjustment plans, enabling automatic product conversions on subscription line items attached to a created plan.
Create Convertible Adjustment Group
Creates a convertible adjustment group for a store. When created, the adjustment group does not have any products associated with it. Convertible adjustments enable customers to convert their subscription after an initial order.
For example, if the initial subscription order included a coffee maker and coffee grounds, a convertible adjustment allows subsequent orders to contain only coffee grounds.
After calling this endpoint, call Create Convertible Adjustment Group Items to attach the created convertible adjustment group items to the adjustment group.
Authorizations:
path Parameters
shop_identifier required | string Example: 123456 The unique identifier of the shop. |
Request Body schema: application/jsonrequired
required | object | ||||||||
|
Responses
Request samples
- Payload
{- "data": {
- "convertible_adjustment_group": {
- "on_cycle_end": "repeat_cycle",
- "trigger": {
- "type": "order_count",
- "count": 1
}
}
}
}
Response samples
- 200
- 401
- 422
{- "data": {
- "convertible_adjustment_group": {
- "id": 1,
- "shop_platform_id": 1234,
- "on_cycle_end": "repeat_cycle",
- "trigger": {
- "type": "order_count",
- "function": null,
- "count": 1
}, - "created_at": "2024-03-11T18:56:12Z",
- "updated_at": "2024-03-11T18:56:12Z",
- "deleted_at": null
}
}
}
Create Convertible Adjustment Group Items
Creates convertible adjustment group items used for a selection option. The first item in the items
array represents the initial product and the second item represents the product it will convert to after the initial order is placed.
Authorizations:
path Parameters
shop_identifier required | string Example: 123456 The unique identifier of the shop. |
adjustment_id required | integer The convertible adjustment group identifier, obtained from calling Create Convertible Adjustment Group. |
Request Body schema: application/jsonrequired
required | object | ||||||||||||
|
Responses
Request samples
- Payload
{- "data": {
- "items": [
- {
- "type": "initial_product",
- "discount_type": "no_discount"
}, - {
- "type": "product",
- "product": {
- "platform_product_id": "7873884094619",
- "platform_variant_id": "44147851264155"
}, - "discount_type": "percentage",
- "discount_value": 50
}, - {
- "type": "product",
- "product": {
- "platform_product_id": "7873885831323",
- "platform_variant_id": "44147858473115"
}, - "discount_type": "percentage",
- "discount_value": 50
}
]
}
}
Response samples
- 200
- 400
- 401
- 404
- 422
- 500
{- "data": {
- "items": [
- {
- "id": 81,
- "shop_platform_app_id": 1007,
- "convertible_adjustment_group_id": 20,
- "type": "initial_product",
- "discount_type": "no_discount",
- "discount_value": 0,
- "product": null
}, - {
- "id": 82,
- "shop_platform_app_id": 1007,
- "convertible_adjustment_group_id": 20,
- "type": "product",
- "discount_type": "percentage",
- "discount_value": 50,
- "product": {
- "id": 82,
- "convertible_adjustment_group_id_item_id": 82,
- "platform_product_id": "7873884094619",
- "platform_variant_id": "44147851264155",
- "created_at": "2024-03-19T20:42:47Z",
- "updated_at": "2024-03-19T20:42:47Z",
- "deleted_at": null
}
}, - {
- "id": 83,
- "shop_platform_app_id": 1007,
- "convertible_adjustment_group_id": 20,
- "type": "product",
- "discount_type": "percentage",
- "discount_value": 50,
- "product": {
- "id": 83,
- "convertible_adjustment_group_id_item_id": 83,
- "platform_product_id": "7873885831323",
- "platform_variant_id": "44147858473115",
- "created_at": "2024-03-19T20:42:47Z",
- "updated_at": "2024-03-19T20:42:47Z",
- "deleted_at": null
}
}
]
}
}
Delete Convertible Adjustment Group Items
Deletes all convertible adjustment group items from a convertible adjustment group.
Authorizations:
path Parameters
shop_identifier required | string Example: 123456 The unique identifier of the shop. |
adjustment_id required | integer The convertible adjustment group identifier, obtained from calling Create Convertible Adjustment Group. |
Responses
Response samples
- 200
- 401
- 404
{- "data": {
- "deleted_item_count": 1
}
}
Delete Convertible Adjustment Group
Deletes a convertible adjustment group and its items for a store.
Authorizations:
path Parameters
shop_identifier required | string Example: 123456 The unique identifier of the shop. |
adjustment_id required | integer The convertible adjustment group identifier, obtained from calling Create Convertible Adjustment Group. |
Responses
Response samples
- 200
- 401
- 404
{- "data": {
- "convertible_adjustment_group_id": 2
}
}
Update Convertible Adjustment Group
Updates a convertible adjustment group for a store.
Authorizations:
path Parameters
shop_identifier required | string Example: 123456 The unique identifier of the shop. |
adjustment_id required | integer The convertible adjustment group identifier, obtained from calling Create Convertible Adjustment Group. |
Request Body schema: application/jsonrequired
required | object | ||||||||
|
Responses
Request samples
- Payload
{- "data": {
- "convertible_adjustment_group": {
- "on_cycle_end": "repeat_cycle",
- "trigger": {
- "type": "order_count",
- "count": 1
}
}
}
}
Response samples
- 200
- 401
- 422
{- "data": {
- "convertible_adjustment_group": {
- "id": 1,
- "shop_platform_id": 1234,
- "on_cycle_end": "repeat_cycle",
- "trigger": {
- "type": "order_count",
- "function": null,
- "count": 1
}, - "created_at": "2024-03-11T18:56:12Z",
- "updated_at": "2024-03-11T18:56:12Z",
- "deleted_at": null
}
}
}
Delete Convertible Adjustment Group Item
Deletes a convertible adjustment group item from a convertible adjustment group using the convertible adjustment group item ID
Authorizations:
path Parameters
shop_identifier required | string Example: 123456 The unique identifier of the shop. |
adjustment_id required | integer The convertible adjustment group identifier, obtained from calling Create Convertible Adjustment Group. |
adjustment_item_id required | integer The convertible adjustment group item identifier, obtained from calling Create Convertible Adjustment Group Items. |
Responses
Response samples
- 200
- 401
- 404
{- "data": {
- "item_id": 2
}
}
Update Convertible Adjustment Group Item
Updates a convertible adjustment group item from a convertible adjustment group using the convertible adjustment group item ID
Authorizations:
path Parameters
shop_identifier required | string Example: 123456 The unique identifier of the shop. |
adjustment_id required | integer The convertible adjustment group identifier, obtained from calling Create Convertible Adjustment Group. |
adjustment_item_id required | integer The convertible adjustment group item identifier, obtained from calling Create Convertible Adjustment Group Items. |
Request Body schema: application/jsonrequired
required | object | ||||||||||||
|
Responses
Request samples
- Payload
{- "data": {
- "item": {
- "type": "product",
- "product": {
- "platform_product_id": "7873884094619",
- "platform_variant_id": "44147851264155"
}, - "discount_type": "percentage",
- "discount_value": 50
}
}
}
Response samples
- 200
- 400
- 401
- 404
- 422
- 500
{- "data": {
- "item": {
- "id": 82,
- "shop_platform_app_id": 1007,
- "convertible_adjustment_group_id": 20,
- "type": "product",
- "discount_type": "percentage",
- "discount_value": 50,
- "product": {
- "id": 82,
- "convertible_adjustment_group_id_item_id": 82,
- "platform_product_id": "7873884094619",
- "platform_variant_id": "44147851264155",
- "created_at": "2024-03-19T20:42:47Z",
- "updated_at": "2024-03-19T20:42:47Z",
- "deleted_at": null
}
}
}
}
A child resource of Subscriptions. Contains information about customers for a subscription. Use these endpoints to manage customer data for a specific subscription.
List Customers
Retrieve a list of customers.
Authorizations:
path Parameters
shop_identifier required | string Example: 123456 The unique identifier of the shop. |
query Parameters
search | string Examples:
Search with a specific target. It's possible to search by subscription ID or phone number. |
status | string Default: "all" Enum: "all" "active" "inactive" Example: status=active Customer status to filter. |
limit | integer Default: 50 Example: limit=10 The maximum number of results to be returned. |
page | integer Default: 1 Example: page=2 The page to request. |
Responses
Response samples
- 200
- 401
{- "customers": [
- {
- "id": 2,
- "platform_id": "123456790",
- "cashier_public_id": null,
- "first_name": "Jane",
- "last_name": "Doe",
- "phone": "12045551234",
- "notes": "Loyal customer",
- "addresses": [
- {
- "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"
}
], - "default_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"
}, - "subscription_summary": {
- "bold_platform_customer_id": 2,
- "next_order_date": "2020-01-20T18:00:00Z",
- "last_order_date": "2019-11-20T20:55:27Z",
- "active_subscription_count": 2,
- "inactive_subscription_count": 1,
- "subscription_order_count": 5,
- "lifetime_value_usd": 152.12
}, - "labels": [
- {
- "id": 12,
- "customer_id": 21,
- "name": "bsub_subscription_active",
- "created_at": "2022-12-25T00:00:00Z",
- "updated_at": "2022-12-25T00:00:00Z",
- "deleted_at": "2022-12-25T00:00:00Z"
}
], - "created_at": "2022-12-25T00:00:00Z"
}
]
}
Get Customer
Retrieve a customer by their id.
Authorizations:
path Parameters
shop_identifier required | string Example: 123456 The unique identifier of the shop. |
customer_id required | integer Example: 12 The customer identifier. |
Responses
Response samples
- 200
- 401
{- "customer": {
- "id": 2,
- "platform_id": "123456790",
- "cashier_public_id": null,
- "first_name": "Jane",
- "last_name": "Doe",
- "phone": "12045551234",
- "notes": "Loyal customer",
- "addresses": [
- {
- "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"
}
], - "default_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"
}, - "subscription_summary": {
- "bold_platform_customer_id": 2,
- "next_order_date": "2020-01-20T18:00:00Z",
- "last_order_date": "2019-11-20T20:55:27Z",
- "active_subscription_count": 2,
- "inactive_subscription_count": 1,
- "subscription_order_count": 5,
- "lifetime_value_usd": 152.12
}, - "labels": [
- {
- "id": 12,
- "customer_id": 21,
- "name": "bsub_subscription_active",
- "created_at": "2022-12-25T00:00:00Z",
- "updated_at": "2022-12-25T00:00:00Z",
- "deleted_at": "2022-12-25T00:00:00Z"
}
], - "created_at": "2022-12-25T00:00:00Z"
}
}
Update Customer
Update a customer by their id.
Authorizations:
path Parameters
shop_identifier required | string Example: 123456 The unique identifier of the shop. |
customer_id required | integer Example: 12 The customer identifier. |
Request Body schema: application/jsonrequired
object (CustomerEntity) | |||||||||||
|
Responses
Request samples
- Payload
{- "customer": {
- "first_name": "Jane",
- "last_name": "Doe",
- "phone": "12045551234",
- "notes": "Loyal customer"
}
}
Response samples
- 200
- 401
{- "customer": {
- "id": 2,
- "platform_id": "123456790",
- "cashier_public_id": null,
- "first_name": "Jane",
- "last_name": "Doe",
- "phone": "12045551234",
- "notes": "Loyal customer",
- "addresses": [
- {
- "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"
}
], - "default_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"
}, - "subscription_summary": {
- "bold_platform_customer_id": 2,
- "next_order_date": "2020-01-20T18:00:00Z",
- "last_order_date": "2019-11-20T20:55:27Z",
- "active_subscription_count": 2,
- "inactive_subscription_count": 1,
- "subscription_order_count": 5,
- "lifetime_value_usd": 152.12
}, - "labels": [
- {
- "id": 12,
- "customer_id": 21,
- "name": "bsub_subscription_active",
- "created_at": "2022-12-25T00:00:00Z",
- "updated_at": "2022-12-25T00:00:00Z",
- "deleted_at": "2022-12-25T00:00:00Z"
}
], - "created_at": "2022-12-25T00:00:00Z"
}
}
List Customer Addresses
Retrieve a list of addresses for a customer.
Authorizations:
path Parameters
shop_identifier required | string Example: 123456 The unique identifier of the shop. |
customer_id required | integer Example: 12 The customer identifier. |
Responses
Response samples
- 200
- 401
{- "customer_addresses": [
- {
- "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"
}
]
}
Create Customer Address
Create an address for a customer.
Authorizations:
path Parameters
shop_identifier required | string Example: 123456 The unique identifier of the shop. |
customer_id required | integer Example: 12 The customer identifier. |
Request Body schema: application/jsonrequired
object (UpdateCustomerAddressEntity) | |||||||||||||||||||||||||||||
|
Responses
Request samples
- Payload
{- "customer_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": "string"
}
}
Response samples
- 200
- 401
{- "customer_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"
}
}
Update Customer Address
Update an address for a customer.
Authorizations:
path Parameters
shop_identifier required | string Example: 123456 The unique identifier of the shop. |
customer_id required | integer Example: 12 The customer identifier. |
address_id required | integer The address identifier. |
Request Body schema: application/jsonrequired
object (UpdateCustomerAddressEntity) | |||||||||||||||||||||||||||||
|
Responses
Request samples
- Payload
{- "customer_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": "string"
}
}
Response samples
- 200
- 401
{- "customer_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"
}
}
Delete Customer Address
Delete an address from a customer.
Authorizations:
path Parameters
shop_identifier required | string Example: 123456 The unique identifier of the shop. |
customer_id required | integer Example: 12 The customer identifier. |
address_id required | integer The address identifier. |
Responses
Response samples
- 401
{- "error": "invalid_request",
- "error_description": "The access token is missing"
}
List Customer Subscriptions
Retrieve a list of subscriptions for a single customer.
Authorizations:
path Parameters
shop_identifier required | string Example: 123456 The unique identifier of the shop. |
customer_id required | integer Example: 12 The customer identifier. |
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": 2,
- "count": 2,
- "per_page": 10,
- "total_pages": 1,
- "current_page": 1
}
}
A child resource of Subscriptions. Contains information about payment methods for subscriptions, including public payment IDs, alternate payment methods, and available methods. Use these endpoints to get, remove, edit, and list payment methods associated with a subscription.
Get Payment Method
Retrieve the current payment method information of 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
{- "payment_method": {
- "type": "credit_card",
- "name": "John Doe",
- "billing_address": {
- "street": "123 Main Street",
- "city": "Toronto",
- "province": "Ontario",
- "country": "Canada",
- "zip": "H0H 0H0"
}, - "public_id": "jik1w6HrCn17CxXPDkWhtgyqvm8wLDd1PelY6k8mabglNmL8XKBnsde9PdgKZqnG",
- "update_method": "trigger_email",
- "cc_type": "Visa",
- "expiration": {
- "date": "2020-5",
- "timezone_type": "string",
- "timezone": "UTC"
}, - "last_four": "1111",
- "is_default": true,
}
}
Trigger Update Payment Method Email
Note: Available for Shopify Checkout only.
Trigger an email to the customer that allows them to update their payment method for the subscription. This endpoint can only be called if the subscription's payment method has an update_method
of trigger_email
.
You can change the contents of the email in Shopify's "Customer payment method update request" email settings.
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
{ }
List Payment Methods
Retrieve a list of available payment methods 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
{- "payment_methods": [
- {
- "type": "credit_card",
- "name": "John Doe",
- "billing_address": {
- "street": "123 Main Street",
- "city": "Toronto",
- "province": "Ontario",
- "country": "Canada",
- "zip": "H0H 0H0"
}, - "public_id": "jik1w6HrCn17CxXPDkWhtgyqvm8wLDd1PelY6k8mabglNmL8XKBnsde9PdgKZqnG",
- "update_method": "trigger_email",
- "cc_type": "Visa",
- "expiration": {
- "date": "2020-5",
- "timezone_type": "string",
- "timezone": "UTC"
}, - "last_four": "1111",
- "is_default": true,
}
]
}
List Alternative Payment Methods
Retrieve a list of alternative payment methods 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
{- "gift_card": [
- {
- "payment_public_id": "string",
- "card_number": "string",
- "balance": 0
}
]
}
Create Alternative Payment Method
Add an alternate payment method to 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/json
required | Array of objects = 1 items unique | ||||
Array (= 1 items)
|
Responses
Request samples
- Payload
{- "alternative_payment_methods": [
- {
- "type": "gift_card",
- "payment_details": {
- "card_number": "ABC1234",
- "security_key": "123"
}
}
]
}
Response samples
- 200
{- "alternative_payment_methods": [
- {
- "subscription_id": 0,
- "public_payment_token": "string"
}
]
}
Delete Alternative Payment Method
Remove an alternative payment method from a subscription its paymentPublicID.
Authorizations:
path Parameters
shop_identifier required | string Example: 123456 The unique identifier of the shop. |
subscription_id required | integer The subscription identifier. |
payment_public_id required | string |
Responses
Contains information about your store, including store IDs, domains, platform, and admin configuration. Use these endpoints to manage store information and settings.
Get Shop Info
Retrieve basic information about a shop.
Authorizations:
path Parameters
shop_identifier required | string Example: 123456 The unique identifier of the shop. |
Responses
Response samples
- 200
- 401
{- "shop": {
- "id": 1,
- "shop_domain": "store-abc123def456.example.com",
- "custom_domain": "example-store.example.com",
- "shop_identifer": "zya0kzb8hu7ji",
- "platform_type": "bigcommerce",
- "timezone": "Europe/London",
- "currency": "CAD",
- "currency_format": "${{amount}}",
- "shop_owner": "John Doe",
- "pii_redacted_at": "2019-11-20T20:31:55Z",
- "created_at": "2019-11-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z",
- "deleted_at": "2019-11-20T20:31:55Z"
}
}
Contains information about webhook events, including webhook event ID, attempts, and webhook event metadata. Use these endpoints to get webhook event information.
List Webhook Events
Retrieve a list of webhook events.
Authorizations:
path Parameters
shop_identifier required | string Example: 123456 The unique identifier of the shop. |
query Parameters
since_id | integer |
limit | string Maximum number of results to be returned |
filters | Array of strings Items Enum: "shop_id" "webhook_subscription_id" "webhook_topic_id" "uuid" "attempts" "last_response_status_code" "id" "created_at" "updated_at" "delivered_at" Filter event webhooks. Mulitple filters can be passed in the array. |
Responses
Response samples
- 200
- 401
{- "webhook_events": [
- {
- "id": 0,
- "shop_id": 0,
- "webhook_subscription_id": 0,
- "webhook_topic_id": 0,
- "uuid": "string",
- "attempts": 0,
- "last_response_status_code": "string",
- "delivered_at": "string",
- "created_at": "2019-11-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z",
- "deleted_at": null
}
], - "pagination": {
- "limit": 10,
- "count": 1,
- "total": 1,
- "total_pages": 1
}
}
Get Webhook Event
Retrieve a webhook event by its id.
Authorizations:
path Parameters
shop_identifier required | string Example: 123456 The unique identifier of the shop. |
webhook_event_id required | integer The webhook event identifier. |
Responses
Response samples
- 200
- 401
{- "webhook_event": {
- "id": 0,
- "shop_id": 0,
- "webhook_subscription_id": 0,
- "webhook_topic_id": 0,
- "uuid": "string",
- "attempts": 0,
- "last_response_status_code": "string",
- "delivered_at": "string",
- "created_at": "2019-11-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z",
- "deleted_at": null
}
}
Contains webhook metadata. Use these endpoints to add, remove, edit, or list webhook subscriptions.
List Webhook Subscriptions
Retrieve a list of webhook subscriptions.
Authorizations:
path Parameters
shop_identifier required | string Example: 123456 The unique identifier of the shop. |
query Parameters
since_id | integer |
limit | string Maximum number of results to be returned |
filters | Array of strings Items Enum: "webhook_topic_id" "callback_url" "shared_secret" "created_at" "updated_at" Filter subscription webhooks. Multiple filters can be passed in the array. |
Responses
Response samples
- 200
- 401
{- "webhook_subscriptions": [
- {
- "id": 1,
- "shop_id": 1,
- "webhook_topic_id": 1,
- "callback_url": "yourapp.com/v2/sub-created",
- "created_at": "2020-09-17T18:27:03Z",
- "updated_at": "2020-09-17T18:27:03Z",
- "deleted_at": null
}, - {
- "id": 1,
- "shop_id": 1,
- "webhook_topic_id": 2,
- "callback_url": "yourapp.com/sub-updated",
- "created_at": "2020-08-17T18:27:03Z",
- "updated_at": "2020-08-17T18:27:03Z",
- "deleted_at": null
}
], - "pagination": {
- "limit": 10,
- "count": 2,
- "total": 2,
- "total_pages": 1
}
}
Create Webhook Subscription
Create a webhook subscription. For more information, refer to Register for Webhooks.
The subscription_payment_method_updated
webhook is not supported by default for all Shopify shops installed prior to January 15th 2024 (2024-01-15). Please submit a support request for access.
Authorizations:
path Parameters
shop_identifier required | string Example: 123456 The unique identifier of the shop. |
Request Body schema: application/json
required | object | ||||||
|
Responses
Callbacks
Request samples
- Payload
{- "webhook_subscription": {
- "webhook_topic_id": 10,
- "shared_secret": "exMh194qw8JD@A50dA^P"
}
}
Response samples
- 200
- 401
{- "webhook_subscription": {
- "id": 0,
- "shop_id": 0,
- "webhook_topic_id": 0,
- "callback_url": "string",
- "shared_secret": "string",
- "created_at": "2019-11-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z",
- "deleted_at": null
}
}
Callback payload samples
{- "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 Webhook Subscription
Retrieve a webhook subscription by its id.
Authorizations:
path Parameters
shop_identifier required | string Example: 123456 The unique identifier of the shop. |
webhook_subscription_id required | integer The webhook subscription identifier. |
Responses
Response samples
- 200
- 401
{- "webhook_subscription": {
- "id": 0,
- "shop_id": 0,
- "webhook_topic_id": 0,
- "callback_url": "string",
- "shared_secret": "string",
- "created_at": "2019-11-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z",
- "deleted_at": null
}
}
Update Webhook Subscription
Update a webhook subscription by its id.
Authorizations:
path Parameters
shop_identifier required | string Example: 123456 The unique identifier of the shop. |
webhook_subscription_id required | integer The webhook subscription identifier. |
Request Body schema: application/jsonrequired
object (WebhookSubscriptionEntity) | |||||||||||
|
Responses
Request samples
- Payload
{- "webhook_subscription": {
- "id": 0,
- "shop_id": 0,
- "webhook_topic_id": 0,
- "callback_url": "string",
- "shared_secret": "string"
}
}
Response samples
- 200
- 401
{- "webhook_subscription": {
- "id": 0,
- "shop_id": 0,
- "webhook_topic_id": 0,
- "callback_url": "string",
- "shared_secret": "string",
- "created_at": "2019-11-20T20:31:55Z",
- "updated_at": "2019-11-20T20:31:55Z",
- "deleted_at": null
}
}
Delete Webhook Subscription
Delete a webhook subscription by its id.
Authorizations:
path Parameters
shop_identifier required | string Example: 123456 The unique identifier of the shop. |
webhook_subscription_id required | integer The webhook subscription identifier. |
Responses
Response samples
- 401
{- "error": "invalid_request",
- "error_description": "The access token is missing"
}
Contains information about webhook topics. Use these endpoints to list all possible webhook topics.
List Webhook Topics
Retrieve a list of available webhook topics.
Authorizations:
path Parameters
shop_identifier required | string Example: 123456 The unique identifier of the shop. |
Responses
Response samples
- 200
- 401
{- "webhook_topics": [
- {
- "id": 1,
- "topic_name": "subscription_created"
}, - {
- "id": 2,
- "topic_name": "subscription_updated"
}, - {
- "id": 3,
- "topic_name": "subscription_order_created"
}, - {
- "id": 4,
- "topic_name": "customer_created"
}, - {
- "id": 5,
- "topic_name": "customer_updated"
}, - {
- "id": 6,
- "topic_name": "subscription_order_transaction_failed"
}, - {
- "id": 7,
- "topic_name": "subscription_order_max_retries_reached"
}, - {
- "id": 8,
- "topic_name": "subscription_payment_method_updated"
}, - {
- "id": 9,
- "topic_name": "subscription_upcoming_order"
}, - {
- "id": 10,
- "topic_name": "subscription_expiring_payment"
}, - {
- "id": 12,
- "topic_name": "subscription_cancelled"
}, - {
- "id": 13,
- "topic_name": "subscription_paused"
}, - {
- "id": 14,
- "topic_name": "subscription_resumed"
}, - {
- "id": 15,
- "topic_name": "subscription_reactivated"
}, - {
- "id": 16,
- "topic_name": "subscription_frequency_updated"
}, - {
- "id": 17,
- "topic_name": "subscription_quantity_updated"
}, - {
- "id": 18,
- "topic_name": "subscription_credit_card_updated"
}, - {
- "id": 19,
- "topic_name": "subscription_shipping_address_updated"
}, - {
- "id": 20,
- "topic_name": "subscription_payment_failed"
}, - {
- "id": 21,
- "topic_name": "subscription_skipped"
}, - {
- "id": 22,
- "topic_name": "subscription_line_items_added"
}
]
}