Skip to main content

Bold Subscriptions V1 Integrations

caution
  • If you are looking for API documentation and your app version is Bold Subscriptions or Bold Subscriptions for Shopify Checkout, visit the Bold Subscriptions API Documentation. All new integrations MUST be built using these APIs.
  • The documentation found on this page applies only to Bold Subscriptions V1. These APIs are only available to Bold Subscriptions V1 users on Shopify Checkout. Bold does NOT permit new integrations to be built using Bold Subscriptions V1.
  • To see which version of the app you have installed, visit the Bold Subscriptions Admin. To learn more about the feature differences between Bold Subscriptions V1 and Bold Subscriptions for Shopify Checkout, refer to the Help Center.

Introduction

Bold Subscriptions customers using the Advanced plan or higher can use our third party API and webhooks integration to interact with subscription data in unique ways. This includes the ability to modify, cancel and report on subscriptions as well as get notified about various subscription-related events. Generally our API follows the business rules set in the app. If you currently have not enabled a setting to allow customers to make the change, or cannot do the action in the admin, then the majority of the time you will not be able to perform the action via the API. Contact Bold for more information on these tools and gaining access.

Using Webhooks

Event Subscriptions

To register webhooks go into the Bold Subscriptions admin under Integrations -> Webhooks. Webhooks must use a secure protocol (https) and respond with a 200 status in a reasonable amount of time.

Learn about registering webhooks in Bold Subscriptions

Receiving Webhooks

When events occur that you have subscribed to, we will deliver the webhook(s) in batches every 10 minutes. To deliver the webhook we will send a request to your webhook URL in the following format:

POST https://example.com/my_webhooks/receive HTTPS/1.1
X-Bold-Signature: e9f65715bbc9222477b27074804bbdd5c73cde62f84d8b00cfd05b883534af3d
timestamp: 1556410547
Content-Type: application/json
charset: utf-8

See the sample webhook payloads further down on this page for a preview of how the request body is formatted.

Securing Webhooks

Like APIs, webhooks can also be prone to various cyber attacks such as replay attacks and timing attacks. To protect yourself from receiving unwanted or untrusted data we recommend verifying the request we send you.

Bold Subscriptions uses an hmac sha256 hashing algorithm to add a signature to each request. In PHP, the way we build the signature would look like this:

$now = time(); // current unix timestamp
$json = json_encode($payload, JSON_FORCE_OBJECT);
$signature = hash_hmac('sha256', $now.'.'.$json, $signingKey);

Where $payload is the body of the request and $signingKey is the shared secret provided to you in the Bold Subscriptions admin.

To secure your request we recommend for you to build this same hash in your program and compare it to the signature in the request headers (X-Bold-Signature) using constant time string comparison. Another action you can take is to check that the timestamp from the headers is recent (e.g. within the last minute).

Retry Policy

In the event of a 4XX or 5XX response code from a request to your webhook URL we will attempt to deliver it again. We will retry delivering webhooks up to a maximum of 10 attempts over an increasing period of time. The formula we use to calculate the next retry time is as follows:

60 + {numberOfAttempts}^4 = Number of seconds into the future

Number of attemptsSeconds until valid retry time
161 seconds
276 seconds
3141 seconds
4316 seconds
....
96621 seconds (1.84 hours)
note

Although the retry time may be in the past, webhooks get delivered in batches every 10 minutes which could delay the retry up to that amount of time.

Webhook Events

When logged into the Bold Subscriptions admin you can test each of the events you're subscribed to by sending sample data to your webhook URL. You can also see below for the payloads of each event type.

Note: Some sample payloads contain the text "<event.name>" in place of the corresponding event name.

Subscription Created

A new subscription was created by a new or existing customer in the checkout.

Event NameTriggers
subscription.created
  • Successful checkout

Subscription Ended

An existing subscription has been cancelled or has expired.

Event NameTriggers
subscription.ended
  • Cancelled by customer
  • Cancelled by admin
  • Cancelled through API
  • Prepaid or limited length subscription has expired
  • Exceeded failed transaction limit

Subscription Cancelled

An existing subscription has been cancelled by the customer. This will not fire if a subscription has expired, been cancelled by the store owner, or cancelled via the API.

Event NameTriggers
subscription.cancelled
  • Cancelled by customer

Subscription Reactivated

A subscription which was previously inactive has been reactivated by the store owner. This can only be completed via the subscriptions app.

Event NameTriggers
subscription.activated
  • Reactivated by admin

Subscription Paused

A subscription was paused indefinitely.

Event NameTriggers
subscription.paused
  • Paused by admin
  • Paused by customer
  • Paused through API

Subscription Resumed

A paused subscription was resumed.

Event NameTriggers
subscription.resumed
  • Resumed by admin
  • Resumed by customer
  • Resumed through API

Subscription Exceptions Removed

All subscription exceptions have been removed. This includes product quantity exceptions, order skips and order shipping rate exceptions for any upcoming orders.

Event NameTriggers
subscription.exceptions_removed
  • Next order date changed
  • Subscription frequency changed
  • Subscription ended or cancelled

Subscription Product Quantity Changed

{
"event_type": "<event.name>",
"event_time": "2019-03-27 11:24:51",
"data": {
"products_added": [],
"products_removed": [],
"current_products": [
{
"id": 1,
"shop_app_id": 1,
"bold_order_id": 1,
"product_id": 1111111,
"variant_id": 2222222,
"converted_price": 0,
"price": 12.00,
"quantity": 1,
"gram": 100,
"product_title": "Example Product",
"variant_title": "Small",
"status": 0,
"price_changed": 0,
"shopify_price": 20.00,
"shopify_new_price": null,
"sku": "skuexapmple",
"shopify_inventory": null,
"inventory_management": "shopify",
"taxable": 1,
"properties": "{}",
"vendor": "Vendor",
"is_active": 1
}
],
"subscription": { ... },
"shop": { ... }
}
}

The quantity of a subscription product was changed. This is the global quantity for the subscription. If there are any order quantity exceptions for specific upcoming orders they will still take precedence.

Event NameTriggers
subscription.product_quantity_changed
  • Changed by admin
  • Changed by customer
  • Changed through API

Subscription Order Date Changed

The next order date has been changed for the subscription. As a result this means all the upcoming orders have been adjusted according to the new date and frequency of the subscription.

Event NameTriggers
subscription.order_date_changed
  • Changed by admin
  • Changed by customer
  • Changed through API

Subscription Product Added

{
"event_type": "<event.name>",
"event_time": "2019-03-27 11:24:51",
"data": {
"products_added": [
{
"product_id": 1111111,
"variant_id": 2222222
}
],
"products_removed": [],
"current_products": [
{
"id": 1,
"shop_app_id": 1,
"bold_order_id": 1,
"product_id": 1111111,
"variant_id": 2222222,
"converted_price": 0,
"price": 12.00,
"quantity": 1,
"gram": 100,
"product_title": "Example Product",
"variant_title": "Small",
"status": 0,
"price_changed": 0,
"shopify_price": 20.00,
"shopify_new_price": null,
"sku": "skuexapmple",
"shopify_inventory": null,
"inventory_management": "shopify",
"taxable": 1,
"properties": "{}",
"vendor": "Vendor",
"is_active": 1
}
],
"subscription": { ... },
"shop": { ... }
}
}

A product was added to a subscription.

Event NameTriggers
subscription.product_added
  • Added by admin
  • Added by customer

Subscription Product Removed

{
"event_type": "<event.name>",
"event_time": "2019-03-27 11:24:51",
"data": {
"products_added": [],
"products_removed": [
{
"product_id": 3333333,
"variant_id": 5555555
}
],
"current_products": [
{
"id": 1,
"shop_app_id": 1,
"bold_order_id": 1,
"product_id": 1111111,
"variant_id": 2222222,
"converted_price": 0,
"price": 12.00,
"quantity": 1,
"gram": 100,
"product_title": "Example Product",
"variant_title": "Small",
"status": 0,
"price_changed": 0,
"shopify_price": 20.00,
"shopify_new_price": null,
"sku": "skuexapmple",
"shopify_inventory": null,
"inventory_management": "shopify",
"taxable": 1,
"properties": "{}",
"vendor": "Vendor",
"is_active": 1
}
],
"subscription": { ... },
"shop": { ... }
}
}

A product was removed from a subscription.

Event NameTriggers
subscription.product_removed
  • Removed by admin
  • Removed by customer

Order Created

A new order was successfully processed. This includes a subscription's first order as well as each recurring order.

Event NameTriggers
order.created
  • Successful checkout
  • Successful recurring order

Order Failed

A new order failed to process. This is only triggered on recurring orders, and could be caused because of a failing payment method, a lack of inventory or an app misconfiguration.

Event NameTriggers
order.failed
  • Recurring orders only

Order Skipped

An upcoming order was scheduled to be skipped.

Event NameTriggers
order.skipped
  • Skipped by admin
  • Skipped by customer
  • Skipped through API

Order Resumed

An upcoming order was resumed.

Event NameTriggers
order.resumed
  • Resumed by admin
  • Resumed by customer
  • Resumed through API

Order Quantity Exception Created

{
"event_type": "<event.name>",
"event_time": "2019-03-27 11:24:51",
"data": {
"order": {
"date": "2019-04-15",
"quantity": 6,
"product_internal_id": 1357907
},
"subscription": { ... },
"shop": { ... }
}
}

The quantity of an upcoming order was changed. This does not change the global quantity of that product on the subscription, just a specific upcoming order.

Event NameTriggers
order.quantity_exception_created
  • Quantity changed by admin
  • Quantity changed by customer
  • Quantity changed through API

Using Our API

Variables

Request Parameter variables are displayed as {parameter} with the documentation.

You can find the associated/response definitions alongside the examples in the element tables.

URL Parts

When communicating with the API your request URL should resemble the following example.

GET https://ro.boldapps.net/api/third_party/{endpoint}?shop=your-store.myshopify.com&shopify_customer_id=1234&customer_id=1234 HTTPS/1.1
BOLD-Authorization: Bearer {token}
Content-Type: application/json
PartDescriptionRequired
{endpoint}The API endpointYes
shopThe permanent myshopify domain for the store as a query paramYes
shopify_customer_idShopify customer IDYes for subscription endpoints
customer_idShopify customer IDYes for manage subscription endpoints

API Examples

We recommend viewing our sample app below containing working examples in PHP.

View PHP example app

These API reference docs are meant to clearly define the URLs, parameters, request bodies, responses and error states of the Recurring Orders Third Party API.

Authentication

The Third Party API uses a Bearer Authentication scheme. You must make a basic authentication request with your Private API Key and App Handle to receive a bearer token to use with all subsequent API requests.

The bearer token is a JWT string, generated by the server in response to a login request. The client must send this token in the BOLD-Authorization header when making requests to protected resources. This token is valid for 24 hours.

Get Token

GET api/auth/third_party_token?shop={myshopifyDomain}&handle={appHandle} HTTPS/1.1
Content-Type: application/json
BOLD-Authorization: {privateApiKey}

HTTPS/1.1 200 OK

This endpoint generates an JWT Bearer token for use with all subsequent API requests.

GET api/auth/third_party_token?shop={myshopifyDomain}&handle={appHandle}

Once you have gained access to the Third Party API, include your Private API Key in the BOLD-Authorization header to get the access token.

BOLD-Authorization: {privateApiKey}

Example response

{
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9...2ENcGARxepYj4okdGqAOwZfrm6bx4nAlQGDkq0pwDjw"
}
note

Make sure to replace {appHandle} with your application handle and {myshopifyDomain} with your full myshopify domain (e.g. example-store.myshopify.com)

Data Object
ElementTypeDescription
tokenstringRecurring Orders API Token

Once you have an access token, include it in the BOLD-Authorization header for every request you make:

BOLD-Authorization: Bearer {token}

The header name is BOLD-Authorization and the value of the header is Bearer {token}. Since the access token is being transmitted in clear text, all API calls are done over HTTPS.

note

Replace {token} with your token returned from the GET /auth/third_party_token response

Manage Subscription Endpoints

GET api/third_party/manage/subscription/{endpoint}?customer_id={customer_id}&t={current_timestamp} HTTPS/1.1
BOLD-Authorization: Bearer {token}
Content-Type: application/json

Ensure you have set Content-Type: application/json header so requests do not fail. You must also include your customer ID as a GET parameter for each request.

All of our JSON responses have a standard format. The response data includes all data returned from the endpoint.

Request Parameters
ParameterTypeInDescriptionRequired
customer_idintegerqueryShopify Customer IDtrue
ttimestampqueryCurrent timestamp
(Used to avoid Shopify caching the responses of API endpoints)
true

Example success response

{
"status": 200,
"success": true,
"message": "OK",
"data": {
"id": 1,
"order_products": {}
}
}

Example error response

{
"status": 400,
"success": false,
"message": "Bad Request",
"errors": {
"message": "Unable to find a valid discount matching the code entered"
}
}
note

All Manage Subscription endpoint responses will return a HTTP_OK (200) Response. Ensure you look at the body of the response for a status stating if it failed or not.

Response Body
ElementDescription
statusThe status of the HTTP response
successBoolean value: true/false
messageDefault message of the HTTP response
dataReturned data from request (only for "success": true responses)
errorsArray of errors (only for "success": false responses)

Rate Limiting

Example response headers

429 Too Many Requests HTTP/1.0
x-ratelimit-remaining: 20
x-ratelimit-limit: 20 requests per second

Example response body

{
"message": "HTTP/1.0 429 Too Many Requests"
}

The rate limit is 20 calls per second

To ensure we maintain a stable application, Bold enforces a rate limit on the APIs outlined in this document. Bold Subscriptions V1 uses a token bucket algorithm. All requests are limited on a per-shop basis and use a single token. We encourage our users to use good system design to avoid unnecessary or duplicate calls.

All responses will include both a x-ratelimit-remaining header, indicating the amount of requests remaining; and a x-ratelimit-limit header, indicating the rate limiting policy. Requests that exceed the limit will return a 429 status code.

Other Endpoints

GET /api/third_party/subscriptions?store={myshopifyDomain}&shopify_customer_id=267534937& HTTPS/1.1
BOLD-Authorization: Bearer {token}
Content-Type: application/json

Success response

{
"subscriptions": [
{
"id": 1,
"shopify_customer_id": 267534937,
"interval_number": 1,
"interval_type_id": 3,
"first_name": "Graydon",
"last_name": "Green",
"customer_email": "[email protected]",
...
},
...
],
}

Ensure you have set Content-Type: application/json header so requests do not fail. You must also include your Myshopify Domain as a GET parameter for each request.

All our endpoints return a JSON body type. JSON endpoints examples are contained in the json tab of the code column in the document.

Error responses will use standard HTTP headers - 400, 405, 422 etc.

Depending on the error type, a JSON response may be included with specific error information.

Discounts

Create Discount

POST api/third_party/discounts?&shop={myshopify_domain} HTTP/1.1
BOLD-Authorization: Bearer {token}
Content-Type: application/json

{
"discount_code": "DISCOUNT1",
"offer": {
"type": "fixed",
"amount": 10.00
}
"checkout_only": true
}

HTTPS/1.1 200 OK

Example response has been truncated for brevity

{
"status": 200,
"success": true,
"message": "OK",
"data": {
"discount": {
"id": 135,
"type": "standard",
"discount_code": "DISCOUNT12",
"offer": {
"type": "fixed",
"amount": "10.00"
},
"total_uses": 0,
"checkout_only": false,
"discount_condition": "entire_order",
"discount_condition_amount": "0.00",
"orders_over_enabled": false,
"orders_over_amount": "0.00",
"free_shipping_amount": "0.00",
"free_shipping_country_id": 1,
"free_shipping_country": "All countries",
"start_date": "0000-00-00",
"end_date": "0000-00-00",
"uses_per_customer": 0,
"used": 0,
"status": "enabled",
"deleted": false,
"eligible_product_list": "",
"id_parent": 0
}
}
}

This endpoint can be used to create new discount codes for subscription orders.

POST api/third_party/discounts

URL Parameters
ElementTypeDescription
shopstringmyshopify_url
Request Body
ElementTypeDescriptionRequired
discount_codestringDiscount codeYes
offerobjectYes
typestringThe string "fixed" should be used if the discount should take a fixed dollar amount off the order. The string "percentage" should be used to take a percentage amount off the orderYes
amountfloatThe amount the discount removes from the orderYes
total_usesintThe total number of times a discount code can be usedNo
uses_per_customerintThe number of times a discount code can be used by a single customerNo
checkout_onlybooleanIf discount is only valid on checkout (initial) ordersNo
min_purchasefloatThe minimum dollar purchase required to use the discount codeNo
start_datedateThe date in CST, a discount becomes validNo
end_datedateThe dates in CST, a discount becomes invalidNo

Delete Discount

DELETE api/third_party/discounts/{discount_id}?&shop={myshopify_domain} HTTP/1.1
BOLD-Authorization: Bearer {token}
Content-Type: application/json

HTTPS/1.1 200 OK

Example response has been truncated for brevity

{
"status": 200,
"success": true,
"message": "Discount Code Deleted",
"data": {
"id": "49"
}
}

This endpoint can be used to delete discount codes. When a discount code is deleted it will still be applied to existing subscriptions. To prevent existing subscriptions from having the discount applied also mark the discount as disabled using the disable parameter.

Delete api/third_party/discounts/{discount_id}

URL Parameters
ElementTypeDescription
discount_idintegerThe id of the discount code
shopstringmyshopify_url
disablebooleanSet to 'true' or '1' to disable
Data Object
ElementTypeDescription
idintegerDiscount Code ID

Get Discounts

GET /api/third_party/discounts?shop={myshopifyDomain}&since_id={since_id}&limit={limit} HTTPS/1.1
BOLD-Authorization: Bearer {token}
Content-Type: application/json

HTTPS/1.1 200 OK
{
"status": 200,
"success": true,
"message": "OK",
"data": {
"discounts": [
{
"id": 135,
"type": "standard",
"discount_code": "DISCOUNT12",
"offer": {
"type": "fixed",
"amount": "10.00"
},
"total_uses": 0,
"checkout_only": false,
"discount_condition": "entire_order",
"discount_condition_amount": "0.00",
"orders_over_enabled": false,
"orders_over_amount": "0.00",
"free_shipping_amount": "0.00",
"free_shipping_country_id": 1,
"free_shipping_country": "All countries",
"start_date": "0000-00-00",
"end_date": "0000-00-00",
"uses_per_customer": 0,
"used": 0,
"status": "enabled",
"deleted": false,
"eligible_product_list": "",
"id_parent": 0
}
]
}
}

This endpoint retrieves a filtered page of the store's discount codes. This endpoint is paginated, returning a page with 50 results. To retrieve the next page of results use the greatest subscription id in a subsequent request. The required URL parameters are shop, which is the store's myshopify domain.since_id which the is id of the last discount code you received. For the first page since_id should be equal to 0. As well as limit, this is the maximum number of results returned, (Note: limit cannot be set to greater than 50). To only return certain types of discount codes, use the optional URL parameters listed below.

GET /api/third_party/discounts?shop={myshopifyDomain}&since_id={since_id}&limit={limit}

URL Parameters
ElementTypeRequiredDescription
shopstringyesThe store's Shopify Domain, e.g. mystore.myshopify.com
since_idintegeryesSubscriptions will return all discounts with id greater than the number specified. For the first page set to 0.
limitintegernoThe page size. This can be set with any number between 1 to 50.
idintegernoThe unique id of the discount code
typeintegernoRefers to the discount type, standard, cancellation, bulk_group
discount_codestringnoThe string code used to identify the discount, and to be entered at checkout or on the manage subscription page
total_usesintegernoThe total number of times a discount code can be used
checkout_onlybooleannoWhether the discount can be used on checkout only
offer_typeintegernoRefers to whether the discount is a fixed or percentage amount, fixed or percentage
offer_amountstringnoThe amount that the discount would subtract from the order
discount_conditionintegernoRefers to whether the discount will remove the amount from the entire order or chosen products. (0 = entire order, 2 = these products, 3 = not these products)
discount_condition_amountstringnoThe minimum order total amount for a discount code to be applied
free_shipping_amountstringnoIf the shipping amount is less than or equal to this value and discount_type is set to 3 then free shipping is applied
free_shipping_country_idintegernoThe ids countries that qualify for free shipping
free_shipping_countrystringnoThe countries that qualify for free shipping if discount code is of type 3
start_datedatenoThe date in CST, that a discount code will become valid
end_datedatenoThe date in CST, that a discount code will become invalid
usedintnoThe total number of times a discount code has been used
statusstringnoenabled, disabled and partially_disabled (disabled at checkout only)
deletedbooleannoRefers to is a discount code has been deleted
uses_per_customerintegernoRefers to the total number of times a discount code can be used per customer
id_parentintegernoThe id of the parent discount code in the case of bulk group discount codes
start_date_mindateno
start_date_maxdateno
end_date_mindateno
end_date_maxdateno
discount_amount_minstringno
discount_amount_maxstringno
used_minintegerno
used_maxintegerno
total_uses_minintegerno
total_uses_maxintegerno
uses_per_customer_minintegerno
uses_per_customer_maxintegerno

Manage Subscription

Add Products

POST api/third_party/manage/subscription/orders/{order_id}/products HTTP/1.1
BOLD-Authorization: Bearer {token}
Content-Type: application/json

{
"new_order_products": [
{
"shopify_product_id": 111111,
"shopify_variant_id": 222222,
"quantity": 3,
"price" : 10.99
},
{
"shopify_product_id": 333333,
"shopify_variant_id": 444444,
"quantity": 1,
},
],
"order_shipping_rate": {
"code": "Free Shipping",
"name": "Free Shipping",
"price": "0.00",
"source": "shopify",
"need_change": false,
"hash": "2abcbdea0deff6e6d85b506c247dbebf4475b41358e023f7b3781230ff423c9c5692c5fcf4f643bfca48bdd0759687e4c3c0401da376ee8da4471a7617f5f43b",
},
"one_time": false
}

HTTPS/1.1 200 OK

Example response has been truncated for brevity

{
"status": 200,
"success": true,
"message": "OK",
"data": {
"id": 1,
"order_products": [
{...}, {...}
],
"order_product_exceptions": [
{...}, {...}
],
"order_shipping_rate": {
"bold_order_id": 1,
"code": "Free Shipping",
"name": "Free Shipping",
"price": "0.00",
"source": "shopify",
"need_change": false,
"hash": "hash"
}
}
}

This endpoint allows you to add products to a subscription. These products can be added as recurring products or added only for the next shipment. You can add a maximum of 20 products at a time. If a product is already on a subscription the quantity would be updated. To add a product as a one time product to just the next shipment then set the flag "one_time" = true in the request body. You can only set the one time flag if you are adding a new product, or adding additional product quantities to the order.

POST api/third_party/manage/subscription/orders/{order_id}/products

URL Parameters
ElementTypeDescription
order_idintegerSubscription Order ID
Request Body
ElementSub ElementTypeDescription
new_order_products
 shopify_product_idintegerShopify Product ID
 shopify_variant_idintegerShopify Variant ID
 quantityintegerProduct Quantity
 pricefloatThe price that should be used for the product. If no price is sent, the price from Shopify will be used.
order_shipping_rate Object
 bold_order_idintegerSubscription Order ID
 codestringOrder Shipping Code
 namestringOrder Shipping Name
 pricestringShipping Price
 sourcestringShipping Source
for example: shopify, cashier, decimal etc.
 need_changeinteger0/1
 hashstringShipping Hash
one_time booleanAdd products to next upcoming shipment only
Data Object
ElementTypeDescription
idintegerSubscription Order ID
order_hooksarrayList of Order Hook Objects
order_productsarrayList of Order Product Object
order_product_exceptionsarrayList of Order Product Exceptions Object
order_shipping_rateobjectOrder Shipping Object

Cancel Subscription

DELETE api/third_party/manage/subscription/orders/{order_id}?customer_id={customer_id}&shop={myshopify_domain} HTTP/1.1
BOLD-Authorization: Bearer {token}
Content-Type: application/json

{
"cancel_reason": "I want to delete the order"
}

HTTPS/1.1 200 OK

Example response has been truncated for brevity

{
"status": 200,
"success": true,
"message": "Order Deleted",
"data": {
"id": 1
}
}

This endpoint cancels the specified subscription. When a subscription is cancelled we clear all records of order skips and product exceptions. Most subscriptions can be reactivated if you would like orders to process in the future. You can reactivate a subscription through the Bold Subscription admin.

DELETE api/third_party/manage/subscription/orders/{order_id}

URL Parameters
ElementTypeDescription
order_idintegerSubscription Order ID
customer_idintegerShopify Customer ID
shopstringThe store's Shopify domain, e.g. mystore.myshopify.com
Request Body
ElementTypeDescription
cancel_reasonstringReason of cancellation provided by the customer
Data Object
ElementTypeDescription
idintegerSubscription Order ID

Get Cancellation Offers

GET api/third_party/manage/subscription/orders/{order_id}/cancellation_offers?customer_id={customer_id}&shop={myshopify_domain} HTTP/1.1
BOLD-Authorization: Bearer {token}
Content-Type: application/json

HTTPS/1.1 200 OK

Example response has been truncated for brevity

{
"id": "1",
"reasonId": "1",
"manageOffers": [
{
"id": 3,
"offer_type": 2,
"discount_code_id": null,
"cancel_reason_id": 1
}
],
"discountOffers": [
{
"id": 5,
"type": 2,
"discount_code": "CANCELCODE",
"useable_time": 200,
"only_first_discount": 0,
"discount_type": 2,
"discount_amount": "2.00",
"discount_condition": 0,
"discount_condition_amount": "0.00",
"free_shipping_amount": "0.00",
"free_shipping_country_id": 1,
"free_shipping_country": "All countries",
"start_date": "2017-03-24",
"end_date": "0000-00-00",
"used": 0,
"status": 0,
"deleted": 0,
"once_per_customer": 0,
"eligible_product_list": "",
"id_parent": 0,
"cancel_id": 1,
"offer_type": 1,
"cancel_reason_id": 1
}
]
}

In the Bold Subscriptions admin you can set up difference cancellation flows that your customer wil experience when they go to cancel their subscription. In your cancellation flow you can provide your customers with incentives to keep their subscription, like discount codes they can add to their subscription. This endpoint returns valid cancellation incentives for the given subscription.

GET api/third_party/manage/subscription/orders/{order_id}/cancellation_offers

URL Parameters
ElementTypeDescription
order_idintegerSubscription Order ID
reason_idintegerCancellation Reason ID
customer_idintegerShopify Customer ID
shopstringThe store's Shopify domain, e.g. mystore.myshopify.com
Response Data
ElementTypeDescription
idintegerSubscription Order ID
reasonIdintegerCancellation Reason ID
manageOffersarrayList of Discount Manage Offers Object
discountOffersarrayList of Discount Offer Objects

Get Subscription Credit Card

GET api/third_party/manage/subscription/orders/{order_id}/card?customer_id={customer_id}&shop={myshopify_domain} HTTP/1.1
BOLD-Authorization: Bearer {token}
Content-Type: application/json

HTTPS/1.1 200 OK
{
"status": 200,
"success": true,
"message": "OK",
"data": {
"id": 1,
"credit_card": {
"expiry_date": "2020-06-30",
"last_four": 4532
}
}
}

This endpoint gets the basic credit card information associated with the subscription.

GET api/third_party/manage/subscription/orders/{order_id}/card

URL Parameters
ElementTypeDescription
order_idintegerSubscription Order ID
customer_idintegerShopify Customer ID
shopstringThe store's Shopify domain, e.g. mystore.myshopify.com
Response Data
ElementSub ElementTypeDescription
idintegerSubscription Order ID
credit_cardarray
 expiry_datedateCredit Card Expiry date
 last_fourintegerLast 4 Credit Card digits

Get Discounts

GET api/third_party/manage/subscription/orders/{order_id}/discounts?customer_id={customer_id}&shop={myshopify_domain}  HTTP/1.1
BOLD-Authorization: Bearer {token}
Content-Type: application/json

HTTPS/1.1 200 OK

Example response has been truncated for brevity

{
"status": 200,
"success": true,
"message": "OK",
"data": {
"id": 15,
"discount": {
"discount_code": "DISCOUNTCODE",
"discount_details": "Free shipping to Anywhere up to $100.00 or less"
},
"discount_queue": [
{
"discount_queue_id": 2,
"discount_code": "DISCOUNT10",
"discount_details": "$10.00 off all orders"
}
]
}
}

This endpoint retrieves discount information for an order.

GET api/third_party/manage/subscription/orders/{order_id}/discounts

URL Parameters
ElementTypeDescription
order_idintegerSubscription Order ID
customer_idintegerShopify Customer ID
shopstringThe store's Shopify domain, e.g. mystore.myshopify.com
Data Object
ElementTypeDescription
idintegerSubscription Order ID
discountobjectOrder Discount Object
discount_queuearrayList of Order Discount Queue Objects

Get Initial Data

GET api/third_party/manage/subscription/initial_data?customer_id={customer_id}&shop={myshopify_domain} HTTPS/1.1
BOLD-Authorization: Bearer {token}
Content-Type: application/json

HTTPS/1.1 200 OK

Example response has been truncated for brevity

{
"status": 200,
"success": true,
"message": "OK",
"data": {
"orders": [
{
"id": 1,
"shopify_customer_id": 1,
"interval_number": 1,
"interval_type_id": 1,
"first_name": "FirstName",
"last_name": "LastName",
"customer_email": "[email protected]",
"idempotency_key": "",
"shopify_cart_token": "1",
"address1": "Address1",
"address2": null,
"country": "Country",
"province": "Province",
"city": "City",
"zip": "Zip",
"phone": "1111111111",
"company": "Bold",
"purchase_date": "2018-06-12",
"delete_date": null,
"last_ship_date": "2018-06-12",
"next_ship_date": "2018-06-12",
"discount_code_id": 1,
"cancel_discount_code_id": 0,
"billing_first_name": "FirstName",
"billing_last_name": "LastName",
"billing_address1": "Address1",
"billing_address2": "Apt 102",
"billing_country": "Country",
"billing_province": "Province",
"billing_city": "City",
"billing_zip": "Zip",
"billing_phone": "1111111111",
"billing_company": "Bold",
"notes": null,
"taxes_included": 0,
"tax_shipping": 0,
"attributes": "[]",
"is_cancellable": 1,
"cancel_reason": null,
"reactivatable": false,
"next_active_ship_date": null,
"billing_plan_id": 0,
"order_day": null,
"last_updated": "2018-06-12 11:11:51",
"order_logs": [
{
"shopify_order_num": "#1",
"shopify_order_token": "1",
"price": "1.00",
"tax": "1.00",
"shipping": "1.00",
"purchase_date": "2018-06-12",
"share_shipping": false,
"discount_amount": "0.00",
"free_shipping_discount_applied": 0,
"charged_amount": "1.00"
}
],
"order_product_exceptions": [
{
"date": "2018-07-12",
"products": [
{
"product_internal_id": 1,
"quantity": 8
}
]
}
],
"order_interval_type": {
"interval_type": "day",
"interval_text": "Day",
"estimated_days": 1
},
"order_fixed_recurrences": null,
"order_products": [
{
"id": 1,
"bold_order_id": 1,
"product_id": 111,
"variant_id": 222,
"price": "1.00",
"quantity": 1,
"gram": 0,
"product_title": "ProductTitle",
"variant_title": "VariantTitle",
"status": 0,
"price_changed": 0,
"shopify_price": "1.00",
"shopify_new_price": null,
"sku": "",
"shopify_inventory": null,
"inventory_management": null,
"taxable": 1,
"properties": "{\u0022frequency_num\u0022:\u00227\u0022,\u0022frequency_type\u0022:\u00221\u0022,\u0022group_id\u0022:\u00226\u0022,\u0022is_prepaid\u0022:\u0022\u0022,\u0022total_recurrences\u0022:\u0022\u0022,\u0022prepaid_id\u0022:\u0022\u0022,\u0022recurr_after_limit\u0022:\u00221\u0022,\u0022_ro_subscription_box_choices\u0022:[{\u0022slot\u0022:\u002211\u0022,\u0022quantity\u0022:\u00222\u0022},{\u0022slot\u0022:\u002212\u0022,\u0022quantity\u0022:\u00221\u0022}],\u0022_ro_billing_plan\u0022:0,\u0022frequency_type_text\u0022:\u0022Day(s)\u0022}",
"vendor": "VendorName",
"is_active": true,
"last_updated": "2018-06-12 11:06:23",
"properties_group_id": 6
}
],
"order_shipping_rate": {
"bold_order_id": 1,
"code": "DOM.EP",
"name": "ShipName",
"price": 1.00,
"source": "shopify",
"need_change": false,
"hash": "123"
},
"order_exceptions":[
"2018-08-12",
"2018-09-12"
],
"order_hooks": [
{
"bold_product_id": 111,
"conditions": [
{
"condition_type": "countdown",
"condition_value": "8"
}
],
"title": "Switch Price",
"new_price": null
}
],
"next_orders": ["2018-06-12",...],
"is_billing_the_same": true,
"build_a_box_next_orders": [
{
"date": "2018-06-12",
"status": "See details in Build a Box Statuses table",
"choices": [
{
"slot_id": 1,
"product_id": 111,
"variant_id": 222,
"quantity": 1
},{...},{...}],
},{...},{...}
],
"build_a_box": true,
"has_prepaid": false,
"group_id": 1,
"discount": {
"discount_details": "$0.00 off entire order",
"discount_code": "SAVE0",
"discount_uses_per_customer": 2,
"discount_used_by_customer": 1
},
"discount_queue": [
],
"status": 0
}, {...}, {...}
],
"general_settings": {
"recurring_type": 2,
"cancel_mode": 1,
"provide_cancel_incentives_enabled": false,
"custom_cancel_message_enabled": false,
"custom_cancel_message": null,
"shop_name": "",
"allow_change_shipping_date": true,
"allow_change_discounts": true,
"allow_manage_prepaid": false,
"bold_token": "123",
"bold_signature": "123",
"select_products_url": "https:\/\/test.myshopify.com\/tools\/checkout\/manage_subscription_box\/select_products\/",
"gateway_name": "",
"gateway_token": "token"
},
"groups":[
{
"id":6,
"frequency_info": {
"frequency_max": 7,
"frequency_types": [
{
"interval_id": 1,
"interval_type": "day",
"interval_text": "Day",
"estimated_days": 1
}
],
"is_fixed_interval": true
}
},{...},{...}],
"countries": [
{
"code": "CA",
"country_id": 54200369218,
"name": "Canada",
"tax": 0.05,
"tax_name": "GST"
},{...},{...}],
"products": [
{
"product_id": 111,
"handle": "Product1"
},{...},{...}]
}
}

This endpoint retrieves all information needed to render a customer portal page for the specified customer.

GET api/third_party/manage/subscription/initial_data

URL Parameters
ElementTypeDescription
customer_idintegerShopify Customer ID
shopstringThe store's Shopify domain, e.g. mystore.myshopify.com
Data Object
ElementDescription
ordersArray of all the Initial Data Orders Object associated to a customer
general_settingsGeneral Settings Object containing the Recurring Orders App settings for the shop
groups
countriesList of available countries
productsArray of all products appearing in the orders above

Get Prepaid Settings

GET api/third_party/manage/subscription/orders/{order_id}/prepaid_settings?customer_id={customer_id}&shop={myshopify_domain} HTTP/1.1
BOLD-Authorization: Bearer {token}
Content-Type: application/json

HTTPS/1.1 200 OK

Example response has been truncated for brevity

{
"status": 200,
"success": true,
"message": "OK",
"data": {
"id": 1,
"prepaid_settings": {
"bold_order_id": 1,
"total_recurrences": 6,
"recurrence_count": 1,
"one_charge_only": 0,
"recurr_after_limit": 0
}
}
}

When setting up a subscription group you have the ability to allow customers to prepay for the subscription. This endpoint retrieves information including, but not limited to, how many orders the customer has received, and whether or not the subscription is set to recur after the total number of orders have been processed.

GET api/third_party/manage/subscription/orders/{order_id}/prepaid_settings

URL Parameters
ElementTypeDescription
order_idintegerSubscription Order ID
customer_idintegerShopify Customer ID
shopstringThe store's Shopify domain, e.g. mystore.myshopify.com
Data Object
ElementTypeDescription
idintegerSubscription Order ID
prepaid_settingsobjectOrder Fixed Recurrences Object

Get Products

GET api/third_party/manage/subscription/orders/{order_id}/products?customer_id={customer_id}&shop={myshopify_domain} HTTPS/1.1
BOLD-Authorization: Bearer {token}
Content-Type: application/json

HTTPS/1.1 200 OK

Example response has been truncated for brevity

{
"status": 200,
"success": true,
"message": "OK",
"data": {
"id": 1,
"products": [
{
"id": 5,
"shop_app_id": 1,
"bold_order_id": 1,
"product_id": 111,
"variant_id": 222,
"price": "10.00",
"quantity": 1,
"gram": 100,
"product_title": "ProductTitle",
"variant_title": "VariantTItle",
"status": 0,
"price_changed": 0,
"shopify_price": "10.00",
"shopify_new_price": null,
"sku": "skuprod1",
"shopify_inventory": null,
"inventory_management": "shopify",
"taxable": 1,
"properties": "{\u0022frequency_num\u0022:1,\u0022frequency_type\u0022:2,\u0022frequency_type_text\u0022:\u0022Weekx(s***)\u0022,\u0022group_id\u0022:\u00221\u0022,\u0022is_prepaid\u0022:\u0022\u0022,\u0022total_recurrences\u0022:\u0022\u0022,\u0022prepaid_id\u0022:\u0022\u0022,\u0022recurr_after_limit\u0022:\u00220\u0022,\u0022_ro_billing_plan\u0022:0}",
"vendor": "Vendor",
"is_active": true,
"shopify_product": {
"id": 111,
"body_html": "",
"handle": "product_handle",
"product_type": "",
"published_scope": "global",
"title": "ProductTitle",
"vendor": "vendor",
"tags": "",
"options": [
{
"id": 123,
"name": "Title",
"position": 1,
"product_id": 111,
"values": [
{
"Default Title"
}
]
}
],
"images":{...},
"created_at": "2017-02-28T09:41:56+10:30",
"updated_at": "2017-06-16T02:12:55+09:30",
"published_at": "2017-02-28T09:35:00+10:30",
"image": {...},
"variant": {...}
}
}
],
"order": {...},
"coupon": null,
"taxes_included": 0,
"has_prepaid": true
}
}

This endpoint retrieves all associated products for a subscription.

GET api/third_party/manage/subscription/orders/{order_id}/products

URL Parameters
ElementTypeDescription
order_idintegerSubscription Order ID
customer_idintegerShopify Customer ID
shopstringThe store's Shopify domain, e.g. mystore.myshopify.com
Data Object
ElementTypeDescription
idintegerSubscription Order ID
productsarrayArray of Order Product Objects
orderobjectOrder Object
couponobjectOrder Discount Object
taxes_includedinteger0 - no / 1 - yes
has_prepaidbooleanIf order is prepaid

Get Shipping Rates

GET api/third_party/manage/subscription/orders/{order_id}/shipping_rates?customer_id={customer_id}&shop={myshopify_domain} HTTPS/1.1
BOLD-Authorization: Bearer {token}
Content-Type: application/json

HTTPS/1.1 200 OK

Example response has been truncated for brevity

{
"status": 200,
"success": true,
"message": "OK",
"data": {
"id": 1,
"shipping_rates": [
{
"code": "DOM.EP",
"name": "Expedited Parcel",
"price": "10.00",
"source": "canada_post",
"need_change": false,
"hash": "hash_value"
},{...},{...}
]
}

This endpoint retrieves all the shipping rates that a subscription qualifies for.

GET api/third_party/manage/subscription/orders/{order_id}/shipping_rates

URL Parameters
ElementTypeDescription
order_idintegerSubscription Order ID
customer_idintegerShopify Customer ID
shopstringThe store's Shopify domain, e.g. mystore.myshopify.com
Data Object
ElementTypeDescription
idintegerSubscription Order ID
shipping_ratesarrayList of Order Shipping Rate Objects

Get Upcoming Orders

GET api/third_party/manage/subscription/orders/{order_id}/upcoming?customer_id={customer_id}&shop={myshopify_domain} HTTP/1.1
BOLD-Authorization: Bearer {token}
Content-Type: application/json

HTTPS/1.1 200 OK

Example response has been truncated for brevity

{
"status": 200,
"success": true,
"message": "OK",
"data": {
"id": 1,
"has_prepaid": false,
"next_orders": ["2018-06-20", "2018-06-27", "2018-07-04", "2018-07-11", "2018-07-18", "2018-07-25", "2018-08-01"]
}
}

This endpoint retrieves a listing of the next upcoming order dates for a subscription.

GET api/third_party/manage/subscription/orders/{order_id}/upcoming

URL Parameters
ElementTypeDescription
order_idintegerSubscription Order ID
customer_idintegerShopify Customer ID
shopstringThe store's Shopify domain, e.g. mystore.myshopify.com
Data Object
ElementTypeDescription
idintegerSubscription Order ID
has_prepaidbooleanIf order is prepaid
next_ordersarrayList of next order dates

Get Upcoming Products

GET api/third_party/manage/subscription/orders/{order_id}/upcoming_products?customer_id={customer_id}&shop={myshopify_domain} HTTPS/1.1
BOLD-Authorization: Bearer {token}
Content-Type: application/json

HTTPS/1.1 200 OK

Example response has been truncated for brevity

{
"status": 200,
"success": true,
"message": "OK",
"data": {
"id": "1",
"products": [
{
"id": 222,
"shop_app_id": 1,
"bold_order_id": 1,
"product_id": 222,
"variant_id": 333,
"price": "10.00",
"quantity": 1,
"gram": 0,
"product_title": "ProductTitle",
"variant_title": "VariantTitle",
"status": 0,
"price_changed": 0,
"shopify_price": "10.00",
"shopify_new_price": null,
"sku": "",
"shopify_inventory": null,
"inventory_management": null,
"taxable": 1,
"properties": "{\"frequency_num\":\"7\",\"frequency_type\":\"1\",\"group_id\":\"6\",\"is_prepaid\":\"\",\"total_recurrences\":\"\",\"prepaid_id\":\"\",\"recurr_after_limit\":\"1\",\"_ro_subscription_box_choices\":{{\"slot\":\"11\",\"quantity\":\"2\"},{\"slot\":\"12\",\"quantity\":\"1\"}},\"_ro_billing_plan\":0,\"frequency_type_text\":\"Day(s)\"}",
"vendor": "VendorName",
"is_active": true,
"last_updated": "2018-06-12 11:06:23",
"properties_group_id": null,
"shopify_product": {
"id": 222,
"body_html": "123",
"handle": "product-handle",
"product_type": "",
"title": "ProductTitle",
"vendor": "VenderName",
"tags": "",
"images": {
{...},{...}
},
"image": {...},
"variant": {...}
}
}
],
"order_date": "2018-06-12",
"has_prepaid": false
}
}

This endpoint returns the products that will be in an upcoming order for the subscription.

GET api/third_party/manage/subscription/orders/{order_id}/upcoming_products

URL Parameters
ElementTypeDescription
order_idintegerSubscription Order ID
customer_idintegerShopify Customer ID
shopstringThe store's Shopify domain, e.g. mystore.myshopify.com
Data Object
ElementTypeDescription
idintegerSubscription Order ID
productsarrayArray of Order Product Objects
order_datedateOrder Date in Y-m-d format
has_prepaidbooleanIf order is prepaid

Log Attempted Cancellation

POST api/third_party/manage/subscription/orders/{order_id}/cancellation_log?customer_id={customer_id}&shop={myshopify_domain} HTTP/1.1
BOLD-Authorization: Bearer {token}
Content-Type: application/json

{
"cancel_reason": "Too expensive"
}
HTTPS/1.1 200 OK

Example response has been truncated for brevity

{
"status": 200,
"success": true,
"message": "OK"
}

This endpoint allows you to add a User Activity Log to the customer history with type "Cancellation Flow Started".

POST api/third_party/manage/subscription/orders/{order_id}/cancellation_log

URL Parameters
ElementTypeDescription
order_idintegerSubscription Order ID
customer_idintegerShopify Customer ID
shopstringThe store's Shopify domain, e.g. mystore.myshopify.com
Data Object
ElementTypeDescription
idintegerSubscription Order ID
cancel_reasonStringThe reason selected for starting the cancellation flow

Pause Subscription

POST api/third_party/manage/subscription/orders/{order_id}/pause?customer_id={customer_id}&shop={myshopify_domain} HTTP/1.1
BOLD-Authorization: Bearer {token}
Content-Type: application/json

HTTPS/1.1 200 OK

Example response has been truncated for brevity

{
"status": 200,
"success": true,
"message": "OK",
"data": {
"id": 99,
"is_paused": true
}
}

This endpoint allows the user to pause all orders of that subscription until it is resumed. When a subscription is in a paused state all upcoming orders will be skipped.

POST api/third_party/manage/subscription/orders/{order_id}/pause

URL Parameters
ElementTypeDescription
order_idintegerSubscription Order ID
customer_idintegerShopify Customer ID
shopstringThe store's Shopify domain, e.g. mystore.myshopify.com
Data Object
ElementTypeDescription
idintegerSubscription Order ID
is_pausedbooleanIf subscription is paused

Reactivate Subscription

POST api/third_party/manage/subscription/orders/{order_id}/reactivate?customer_id={customer_id}&shop={myshopify_domain} HTTP/1.1
BOLD-Authorization: Bearer {token}
Content-Type: application/json

{
"next_ship_date": "2020-05-20"
}

HTTPS/1.1 200 OK

Example response has been truncated for brevity

{
"status": 200,
"success": true,
"message": "OK",
"data": {
"id": 99,
"active": true,
"is_paused": false,
"next_ship_date": "2020-05-25",
"reactivatable": false
}
}

This endpoint allows the user to reactivate a subscription that was cancelled in the past. This endpoint will only work for subscriptions that have the reactivatable property set to true. Prepaid and limited length subscriptions are not reactivatable. You can optionally send the next_ship_date for the date you would like the next order to generate, if no date is sent, then the current date will be used.

POST api/third_party/manage/subscription/orders/{order_id}/reactivate

URL Parameters
ElementTypeDescription
order_idintegerSubscription Order ID
customer_idintegerShopify Customer ID
shopstringThe store's Shopify domain, e.g. mystore.myshopify.com
Request Body
ElementDescription
next_ship_dateNext date order should generate in the Y-m-d format
Data Object
ElementTypeDescription
idintegerSubscription Order ID
activedateSubscription active status
is_pausedbooleanSubscription is paused status
next_ship_datearrayNext date order will generate
reactivatablebooleanStatus on if a subscription can be reactivated

Recover Order

POST api/third_party/manage/subscription/orders/{order_id}/recover?customer_id={customer_id}&shop={myshopify_domain} HTTP/1.1
BOLD-Authorization: Bearer {token}
Content-Type: application/json

{
"order_date": "2018-06-20"
}

HTTPS/1.1 200 OK

Example response has been truncated for brevity

{
"status": 200,
"success": true,
"message": "OK",
"data": {
"id": 1,
"next_active_ship_date": "2018-06-20",
"order_exceptions": {}
}
}

This endpoint allows you to un skip an order that was previously set to be skipped for a given order date.

POST api/third_party/manage/subscription/orders/{order_id}/recover

URL Parameters
ElementTypeDescription
order_idintegerSubscription Order ID
customer_idintegerShopify Customer ID
shopstringThe store's Shopify domain, e.g. mystore.myshopify.com
Request Body
ElementDescription
order_daterecover date in the Y-m-d format
Data Object
ElementTypeDescription
idintegerSubscription Order ID
next_active_ship_datedateNext Active Order Date
order_exceptionsarrayList of order exceptions

Resume Subscription

POST api/third_party/manage/subscription/orders/{order_id}/resume?customer_id={customer_id}&shop={myshopify_domain} HTTP/1.1
BOLD-Authorization: Bearer {token}
Content-Type: application/json

HTTPS/1.1 200 OK

Example response has been truncated for brevity

{
"status": 200,
"success": true,
"message": "OK",
"data": {
"id": 99,
"is_paused": false
}
}

This endpoint allows the user to resume a paused subscription. We will start to process orders again according to the next ship date for the subscription.

POST api/third_party/manage/subscription/orders/{order_id}/resume

URL Parameters
ElementTypeDescription
order_idintegerSubscription Order ID
customer_idintegerShopify Customer ID
shopstringThe store's Shopify domain, e.g. mystore.myshopify.com
Data Object
ElementTypeDescription
idintegerSubscription Order ID
is_pausedbooleanIf subscription is paused

Save Build-a-Box Choices

POST api/third_party/manage/subscription/orders/{order_id}/build_a_box_choices?customer_id={customer_id} HTTPS/1.1
BOLD-Authorization: Bearer {token}
Content-Type: application/json

{
"order_date":"2019-11-15",
"choices": [
{
"slot_id": 1,
"quantity": 1
},
{
"slot_id": 2,
"quantity": 2
}
]
}

HTTPS/1.1 200 OK

Example response

{
"status": 200,
"success": true,
"message": "OK",
"data": {
"orders": [
{
"id": 1,
"shopify_customer_id": 1234,
"interval_number": 1,
"interval_type_id": 1,
"first_name": "Marie",
"last_name": "Curie",
"customer_email": "[email protected]",
"gateway_payment_method_id": "",
"address1": "50 Fultz blvd",
"address2": null,
"country": "Canada",
"province": "Manitoba",
"city": "Winnipeg",
"zip": "R3Y 0L6",
"phone": "5555555555",
"company": "",
"purchase_date": "2019-10-25",
"last_ship_date": "2019-10-25",
"next_ship_date": "2019-11-12",
"active": true,
"discount_code_id": 0,
"cancel_discount_code_id": 0,
"billing_first_name": "Marie",
"billing_last_name": "Curie",
"billing_address1": "50 Fultz blvd",
"billing_address2": null,
"billing_country": "Canada",
"billing_province": "Manitoba",
"billing_city": "Winnipeg",
"billing_zip": "R3Y 0L6",
"billing_phone": "5555555555",
"billing_company": "",
"notes": null,
"taxes_included": 0,
"tax_shipping": 1,
"attributes": "[]",
"is_cancellable": true,
"cancel_reason": null,
"reactivatable": false,
"next_active_ship_date": "2019-10-26",
"billing_plan_id": 0,
"order_day": null,
"last_updated": "2019-11-13 08:49:11",
"shopify_order_tags": null,
"is_paused": false,
"currency": "",
"currency_exchange_rate": "1.000000000000",
"currency_format": null,
"order_products": [
{
"id": 2530,
"bold_order_id": 1,
"product_id": 1574423429210,
"variant_id": 15434163224666,
"price": "10.00",
"quantity": 1,
"gram": 0,
"product_title": "BUILD A BOX",
"variant_title": "Default Title",
"status": 0,
"price_changed": 0,
"shopify_price": "10.00",
"shopify_new_price": null,
"sku": "",
"shopify_inventory": null,
"inventory_management": null,
"taxable": 1,
"properties": "{\"frequency_num\":\"1\",\"frequency_type\":\"1\",\"group_id\":\"6\",\"is_prepaid\":\"\",\"total_recurrences\":\"\",\"prepaid_id\":\"\",\"recurr_after_limit\":\"1\",\"_ro_subscription_box_choices\":[{\"slot\":\"1\",\"quantity\":\"3\"},{\"slot\":\"2\",\"quantity\":\"0\"}],\"_ro_billing_plan\":0,\"frequency_type_text\":\"Day(s)\"}",
"vendor": "test-shop",
"is_active": true,
"last_updated": "2019-10-25 13:16:39",
"converted_price": 0,
"properties_group_id": 6
}
],
"order_fixed_recurrences": null,
"next_orders": [
"2019-11-12",
"2019-11-13",
"2019-11-14",
"2019-11-15",
"2019-11-16",
"2019-11-17",
"2019-11-18"
],
"build_a_box": true,
"build_a_box_next_orders": [
{
"date": "2019-11-12",
"status": "build_a_box_locked_default_choices",
"choices": [
{
"slot_id": 1,
"product_id": 1649329406042,
"variant_id": 16089077022810,
"quantity": 2
},
{
"slot_id": 2,
"product_id": 1649345200218,
"variant_id": 16089118081114,
"quantity": 1
}
]
},
{
"date": "2019-11-13",
"status": "build_a_box_locked_default_choices",
"choices": [
{
"slot_id": 1,
"product_id": 1649329406042,
"variant_id": 16089077022810,
"quantity": 2
},
{
"slot_id": 2,
"product_id": 1649345200218,
"variant_id": 16089118081114,
"quantity": 1
}
]
},
{
"date": "2019-11-14",
"status": "build_a_box_locked_default_choices",
"choices": [
{
"slot_id": 1,
"product_id": 1649329406042,
"variant_id": 16089077022810,
"quantity": 2
},
{
"slot_id": 2,
"product_id": 1649345200218,
"variant_id": 16089118081114,
"quantity": 1
}
]
},
{
"date": "2019-11-15",
"status": "build_a_box_available_choices_made",
"choices": [
{
"slot_id": 1,
"product_id": 1649329406042,
"variant_id": 16089077022810,
"quantity": 1
},
{
"slot_id": 2,
"product_id": 1649345200218,
"variant_id": 16089118081114,
"quantity": 2
}
]
},
{
"date": "2019-11-16",
"status": "build_a_box_available",
"choices": [
{
"slot_id": 1,
"product_id": 1649329406042,
"variant_id": 16089077022810,
"quantity": 2
},
{
"slot_id": 2,
"product_id": 1649345200218,
"variant_id": 16089118081114,
"quantity": 1
}
]
},
{
"date": "2019-11-17",
"status": "build_a_box_unavailable",
"choices": [
{
"slot_id": 1,
"product_id": 1649329406042,
"variant_id": 16089077022810,
"quantity": 2
},
{
"slot_id": 2,
"product_id": 1649345200218,
"variant_id": 16089118081114,
"quantity": 1
}
]
},
{
"date": "2019-11-18",
"status": "build_a_box_unavailable",
"choices": [
{
"slot_id": 1,
"product_id": 1649329406042,
"variant_id": 16089077022810,
"quantity": 2
},
{
"slot_id": 2,
"product_id": 1649345200218,
"variant_id": 16089118081114,
"quantity": 1
}
]
}
],
"is_price_based_on_choices": false
}
]
}
}

This endpoint allows you to save selections for an order date, for a Build-a-Box subscription. This endpoint respects the lock settings, of the subscription group.

POST api/third_party/manage/subscription/orders/{order_id}/build_a_box_choices

URL Parameters
ElementTypeDescription
order_idintegerSubscription Order ID
customer_idintegerShopify Customer ID
Request Body
ElementTypeDescription
order_datedateUpcoming order date
choicesarrayArray of selected choices for build-a-box slots
Response Data
ElementTypeDescription
ordersarrayList of Order objects
order_productsarrayList of Order Product Objects
build_a_box_next_ordersarrayList of Build-a-Box Objects

Save Cancellation Offer Code

POST api/third_party/manage/subscription/orders/{order_id}/cancellation_offer_code?customer_id={customer_id}&shop={myshopify_domain} HTTP/1.1
BOLD-Authorization: Bearer {token}
Content-Type: application/json

{
"discount_code": "CANCELCODE",
"reason_id": 1
}

HTTPS/1.1 200 OK

Example response has been truncated for brevity

{
"status": 200,
"success": true,
"message": "OK",
"data": {
"id": "1",
"cancel_discount_code_id": 1,
"message": "Order Updated"
}
}

This endpoint applies cancellation discount code to the given order.

POST api/third_party/manage/subscription/orders/{order_id}/cancellation_offer_code

URL Parameters
ElementTypeDescription
order_idintegerSubscription Order ID
customer_idintegerShopify Customer ID
shopstringThe store's Shopify domain, e.g. mystore.myshopify.com
Request Body
ElementTypeDescription
discount_codestringDiscount Code
reason_idintegerCancellation Reason ID
Data Object
ElementTypeDescription
idintegerSubscription Order ID
cancel_discount_code_idintegerCancel Discount Code ID
messagestringResponse message

Save Discount

POST api/third_party/manage/subscription/orders/{order_id}/discount?customer_id={customer_id}&shop={myshopify_domain} HTTP/1.1
BOLD-Authorization: Bearer {token}
Content-Type: application/json

{
"discount_code": "DISCOUNTCODE"
}

HTTPS/1.1 200 OK

Example response has been truncated for brevity

{
"status": 200,
"success": true,
"message": "OK",
"data": {
"id": 15,
"discount": {
"discount_code": "DISCOUNTCODE",
"discount_details": "Free shipping to Anywhere up to $100.00 or less"
},
"discount_queue": [
{
"discount_queue_id": 2,
"discount_code": "DISCOUNTCODE2",
"discount_details": "$10.00 off all orders"
}
]
}
}

This endpoint adds or updates existing discount code for a subscription.

POST api/third_party/manage/subscription/orders/{order_id}/discount

URL Parameters
ElementTypeDescription
order_idintegerSubscription Order ID
customer_idintegerShopify Customer ID
shopstringThe store's Shopify domain, e.g. mystore.myshopify.com
Request Body
ElementTypeDescription
discount_codestringDiscount code
Data Object
ElementTypeDescription
idintegerSubscription Order ID
discountobjectOrder Discount Object
discount_queuearrayList of Order Discount Queue Objects

Save Swap Product

PUT api/third_party/manage/subscription/orders/{order_id}/save_swap_product?customer_id={customer_id}&shop={myshopify_domain} HTTPS/1.1
BOLD-Authorization: Bearer {token}
Content-Type: application/json

{
"order_id": 1,
"product_internal_id": 1,
"product_id": 123456789,
"variant_id": 234567891,
"order_shipping_rate": {
"code": "DOM.EP",
"name": "Expedited Parcel",
"source": "canada_post",
"price": "2312.10",
"need_change": false,
"hash": "hash"
}
}

HTTPS/1.1 200 OK

Example response has been truncated for brevity

{
"status": 200,
"success": true,
"message": "OK",
"data": {
"id": 1,
"order_products": [
{
"id": 1,
"bold_order_id": 1,
"product_id": 123456789,
"variant_id": 234567891,
"price": "5.00",
"quantity": 1,
"gram": 0,
"product_title": "SwappedProductTitle",
"variant_title": "SwappedVariantTitle",
"status": 0,
"price_changed": 0,
"shopify_price": "1.00",
"shopify_new_price": null,
"sku": "",
"shopify_inventory": null,
"inventory_management": null,
"taxable": 1,
"properties": "{\u0022frequency_num\u0022:\u00227\u0022,\u0022frequency_type\u0022:\u00221\u0022,\u0022group_id\u0022:\u00226\u0022,\u0022is_prepaid\u0022:\u0022\u0022,\u0022total_recurrences\u0022:\u0022\u0022,\u0022prepaid_id\u0022:\u0022\u0022,\u0022recurr_after_limit\u0022:\u00221\u0022,\u0022_ro_subscription_box_choices\u0022:[{\u0022slot\u0022:\u002211\u0022,\u0022quantity\u0022:\u00222\u0022},{\u0022slot\u0022:\u002212\u0022,\u0022quantity\u0022:\u00221\u0022}],\u0022_ro_billing_plan\u0022:0,\u0022frequency_type_text\u0022:\u0022Day(s)\u0022}",
"vendor": "VendorName",
"is_active": true,
"last_updated": "2018-06-12 11:06:23",
"properties_group_id": 6
},
{...}
],
"order_shipping_rate": {
"code": "DOM.EP",
"name": "Expedited Parcel",
"source": "canada_post",
"price": "2312.10",
"need_change": false,
"hash": "hash"
}
}
}

This endpoint will swap a product on an order with the product indicated by the product id and variant id. You must send a valid shipping rate for the subscription that was calculated with the new product.

PUT api/third_party/manage/subscription/orders/{order_id}/save_swap_product

URL Parameters
ElementTypeDescription
order_idintegerSubscription Order ID
customer_idintegerShopify Customer ID
shopstringThe store's Shopify domain, e.g. mystore.myshopify.com
Request Body
ElementSub ElementTypeDescription
product_internal_id integerRecurring Orders internal product ID for the product being replaced.
product_id integerShopify product ID for the swap product.
variant_id integerShopify variant ID for the swap product.
order_shipping_rate object
 codestringOrder Shipping Code
 namestringOrder Shipping Name
 pricestringShipping Price
 sourcestringShipping Source
for example: shopify, cashier, decimal etc.
 need_changeinteger0/1
 hashstringshipping Hash
Response Data
ElementTypeDescription
idintegerSubscription Order ID
order_productsarrayList of Order Product Objects
order_shipping_rateobjectOrder Shipping Object

Save Upcoming Products

PUT api/third_party/manage/subscription/orders/{order_id}/upcoming_products?customer_id={customer_id}&shop={myshopify_domain} HTTPS/1.1
BOLD-Authorization: Bearer {token}
Content-Type: application/json

{
"order_date": "2017-06-01",
"order_products": [
{
"product_internal_id": 1,
"quantity": 1
},
{
"product_internal_id": 2,
"quantity": 1
},
{
"product_internal_id": 3,
"quantity": 0
}
],
"order_shipping_rate": {
"code": "DOM.EP",
"name": "Expedited Parcel",
"source": "canada_post",
"price": "2312.10",
"need_change": false,
"hash": "hash"
}
}

HTTPS/1.1 200 OK

Example response has been truncated for brevity

{
"status": 200,
"success": true,
"message": "OK",
"data": {
"id": 145,
"order_product_exceptions": [
{
"date": "2017-06-01",
"products": [
{
"product_internal_id": 1,
"quantity": 1
},
{
"product_internal_id": 2,
"quantity": 1
},
{
"product_internal_id": 3,
"quantity": 0
}
]
}
]
}
}

This endpoint updates products quantity for a specific upcoming order for the subscription.

PUT api/third_party/manage/subscription/orders/{order_id}/upcoming_products

URL Parameters
ElementTypeDescription
order_idintegerSubscription Order ID
customer_idintegerShopify Customer ID
shopstringThe store's Shopify domain, e.g. mystore.myshopify.com
Request Body
ElementSub ElementTypeDescription
order_date dateOrder Date in Y-m-d format
order_productsarray
 product_internal_idintegerRecurring Orders internal product ID
 quantityintegerProduct quantity
order_shipping_rate Object
 codestringOrder Shipping Code
 namestringOrder Shipping Name
 pricestringShipping Price
 sourcestringShipping Source
for example: shopify, cashier, decimal etc.
 need_changeinteger0/1
 hashstringshipping Hash
Response Data
ElementTypeDescription
idinteger
order_product_exceptionsarrayList of Order Product Exceptions Object

Skip Order

POST api/third_party/manage/subscription/orders/{order_id}/skip?customer_id={customer_id}&shop={myshopify_domain} HTTP/1.1
BOLD-Authorization: Bearer {token}
Content-Type: application/json

{
"order_date": "2018-06-20"
}

HTTPS/1.1 200 OK

Example response has been truncated for brevity

{
"status": 200,
"success": true,
"message": "OK",
"data": {
"id": 15,
"next_active_ship_date": "2018-06-27",
"order_exceptions": ["2018-06-20"]
}
}

This endpoint allows to add order exception date. When this order goes to process it will be skipped. The order will not be placed in Shopify, and the next ship date will be advanced for the subscription.

POST api/third_party/manage/subscription/orders/{order_id}/skip

URL Parameters
ElementTypeDescription
shopstringmyshopify url
order_idintegerSubscription Order ID
customer_idintegerShopify Customer ID
shopstringThe store's Shopify domain, e.g. mystore.myshopify.com
Request Body
ElementDescription
order_dateskip date in the Y-m-d format
Data Object
ElementTypeDescription
idintegerSubscription Order ID
next_active_ship_datedateNext Active Order Date
order_exceptionsarrayList of order exceptions

Update Billing Address

PUT api/third_party/manage/subscription/orders/{order_id}/billing_address?customer_id={customer_id}&shop={myshopify_domain} HTTP/1.1
BOLD-Authorization: Bearer {token}
Content-Type: application/json

{
"billing_address": {
"billing_first_name": "John",
"billing_last_name": "Doe",
"billing_address1": "123 Not Real St.",
"billing_address2": "",
"billing_country": "CA",
"billing_province": "MB",
"billing_city": "Winnipeg",
"billing_zip": "R3T 0H4",
"billing_phone": "",
"billing_company": ""
}
}

HTTPS/1.1 200 OK

Example response has been truncated for brevity

{
"status": 200,
"success": true,
"message": "OK",
"data": {
"id": 1,
"billing_first_name": "John",
"billing_last_name": "Doe",
"billing_address1": "123 Not Real St.",
"billing_address2": null,
"billing_country": "CA",
"billing_province": "MB",
"billing_city": "Winnipeg",
"billing_zip": "R3T 0H4",
"billing_phone": "",
"billing_company": ""
}
}

This endpoint updates the billing address for subscription.

PUT api/third_party/manage/subscription/orders/{order_id}/billing_address

URL Parameters
ElementTypeDescription
order_idintegerSubscription Order ID
customer_idintegerShopify Customer ID
shopstringThe store's Shopify domain, e.g. mystore.myshopify.com
Request Body
ElementSub ElementTypeDescription
billing_address Object
 billing_first_namestringBilling First name
 billing_last_namestringBilling Last name
 billing_address1stringBilling Address
 billing_address2stringBilling Address optional
 billing_countrystringBilling Country
 billing_companystringBilling Company
 billing_provincestringBilling Province
 billing_citystringBilling City
 billing_zipstringBilling Zip code
 billing_phonestringBilling Phone number
Data Object
ElementTypeDescription
idintegerSubscription Order ID
billing_first_namestringBilling First Name
billing_last_namestringBilling Last name
billing_address1stringBilling Address
billing_address2stringBilling Address optional
billing_countrystringBilling Country
billing_provincestringBilling Province
billing_citystringBilling City
billing_zipstringBilling Zip Code
billing_phonestringBilling Phone Number
billing_companystringBilling Company

Update Next Order Date

PUT api/third_party/manage/subscription/orders/{order_id}/next_ship_date?customer_id={customer_id}&shop={myshopify_domain} HTTP/1.1
BOLD-Authorization: Bearer {token}
Content-Type: application/json

{
"next_shipping_date": "2018-06-20"
}

HTTPS/1.1 200 OK

Example response has been truncated for brevity

{
"status": 200,
"success": true,
"message": "OK",
"data": {
"id": 1,
"next_ship_date": "2018-06-20",
"next_orders": {
"2018-06-20",
"2018-06-27",
"2018-07-04",
"2018-07-11",
"2018-07-18",
"2018-07-25",
"2018-08-01",
},
"build_a_box_next_orders" : [],
"order_product_exceptions": [],
"order_exceptions": [],
"message": "Upcoming order date was changed."
}
}

This endpoint updates next order date for subscription.

PUT api/third_party/manage/subscription/orders/{order_id}/next_ship_date

URL Parameters
ElementTypeDescription
order_idintegerSubscription Order ID
customer_idintegerShopify Customer ID
shopstringThe store's Shopify domain, e.g. mystore.myshopify.com
Request Body
ElementTypeDescription
next_shipping_datestringNext order date in the Y-m-d format
Data Object
ElementTypeDescription
idintegerSubscription Order ID
next_ship_datedateNext order date in the Y-m-d format
next_ordersdateNext orders date in the Y-m-d format
build_a_box_next_ordersdateNext orders date and selections if the type is build a box
order_exceptionsarrayArray of order exception dates
order_product_exceptionsarrayList of Order Product Exceptions Object
messagestringMessage with translations

Update Subscription Interval

PUT api/third_party/manage/subscription/orders/{order_id}/interval?customer_id={customer_id}&shop={myshopify_domain} HTTP/1.1
BOLD-Authorization: Bearer {token}
Content-Type: application/json

{
"frequency_type": "1",
"frequency_num": "7"
}

HTTPS/1.1 200 OK

Example response has been truncated for brevity

{
"status": 200,
"success": true,
"message": "OK",
"data": {
"id": 1,
"interval_number": 7,
"interval_type_id": 1,
"next_ship_date": "2018-06-12",
"next_orders": {
"2018-06-12",
"2018-06-19",
"2018-06-26",
"2018-07-03",
"2018-07-10",
"2018-07-17",
"2018-07-24"
},
"order_exceptions": {}
}
}

This endpoint updates order interval for a subscription. When you update the subscription interval all order exceptions (e.g. skipped orders), will be removed.

PUT api/third_party/manage/subscription/orders/{order_id}/interval

URL Parameters
ElementTypeDescription
order_idintegerSubscription Order ID
customer_idintegerShopify Customer ID
shopstringThe store's Shopify domain, e.g. mystore.myshopify.com
Request Body
ElementTypeDescription
frequency_typeintegerRecurring interval type:
1 - Day
2 - Week
3 - Month
5 - Year
frequency_numintegerRecurring interval number
for example: 2 (for every 2 weeks/days etc.)
Data Object
ElementDescription
idSubscription Order ID
interval_numberRecurring interval number
interval_type_idRecurring interval type
next_ship_dateNext order date in date string Y-m-d
next_ordersThe array of new next order dates
order_exceptionsThe array of order exceptions dates

Update Prepaid Settings

PUT api/third_party/manage/subscription/orders/{order_id}/prepaid_settings?customer_id={customer_id}&shop={myshopify_domain} HTTP/1.1
BOLD-Authorization: Bearer {token}
Content-Type: application/json

{
"prepaid_settings": {
"recurr_after_limit": 1
}
}

HTTPS/1.1 200 OK

Example response has been truncated for brevity

{
"status": 200,
"success": true,
"message": "OK",
"data": {
"id": 1,
"prepaid_settings": {
"total_recurrences": 6,
"recurrence_count": 1,
"one_charge_only": 0,
"recurr_after_limit": 1
}
}
}

This endpoint updates the prepaid settings for specific order.

PUT api/third_party/manage/subscription/orders/{order_id}/prepaid_settings

URL Parameters
ElementTypeDescription
order_idintegerSubscription Order ID
customer_idintegerShopify Customer ID
shopstringThe store's Shopify domain, e.g. mystore.myshopify.com
Request Body
ElementSub ElementTypeDescription
prepaid_settingsobject
 recurr_after_limitintegerAutomatically renew after last prepaid order
Allowed: 0 / 1
Response Data
ElementTypeDescription
idintegerSubscription Order ID
prepaid_settingsobjectOrder Fixed Recurrences Object

Update Quantity

PUT api/third_party/manage/subscription/orders/{order_id}/quantity?customer_id={customer_id}&shop={myshopify_domain} HTTP/1.1
BOLD-Authorization: Bearer {token}
Content-Type: application/json

{
"order_products": [
{
"product_internal_id": 1,
"quantity": 3,
"is_deleted": false
},
{
"product_internal_id": 2,
"quantity": 2,
"is_deleted": false
},
{
"product_internal_id": 3,
"quantity": 0,
"is_deleted": false
}
],
"order_shipping_rate": {
"code": "Free Shipping",
"name": "Free Shipping",
"price": "0.00",
"source": "shopify",
"need_change": false,
"hash": "2abcbdea0deff6e6d85b506c247dbebf4475b41358e023f7b3781230ff423c9c5692c5fcf4f643bfca48bdd0759687e4c3c0401da376ee8da4471a7617f5f43b",
}
}

HTTPS/1.1 200 OK

Example response has been truncated for brevity

{
"status": 200,
"success": true,
"message": "OK",
"data": {
"id": 1,
"order_products": [
{...}, {...}
],
"order_product_exceptions": [
{...}, {...}
],
"order_shipping_rate": {
"bold_order_id": 1,
"code": "Free Shipping",
"name": "Free Shipping",
"price": "0.00",
"source": "shopify",
"need_change": false,
"hash": "hash"
}
}
}

This endpoint updates the quantity of specified products in the subscription for the remainder of the subscription.

PUT api/third_party/manage/subscription/orders/{order_id}/quantity

URL Parameters
ElementTypeDescription
order_idintegerSubscription Order ID
customer_idintegerShopify Customer ID
shopstringThe store's Shopify domain, e.g. mystore.myshopify.com
Request Body
ElementSub ElementTypeDescription
order_products
 product_internal_idintegerRecurring Orders internal product ID
 quantityintegerProduct quantity
 is_deletedbooleantrue/false
order_shipping_rate Object
 bold_order_idintegerSubscription Order ID
 codestringOrder Shipping Code
 namestringOrder Shipping Name
 pricestringShipping Price
 sourcestringShipping Source
for example: shopify, cashier, decimal etc.
 need_changeinteger0/1
 hashstringshipping Hash
Data Object
ElementTypeDescription
idintegerSubscription Order ID
order_productsarrayList of Order Product Object
order_product_exceptionsarrayList of Order Product Exceptions Object
order_shipping_rateobjectOrder Shipping Object

Update Shipping Address

PUT api/third_party/manage/subscription/orders/{order_id}/shipping_address?customer_id={customer_id}&shop={myshopify_domain} HTTP/1.1
BOLD-Authorization: Bearer {token}
Content-Type: application/json

{
"shipping_address": {
"first_name": "John",
"last_name": "Doe",
"address1": "123 Not Real St.",
"address2": "",
"country": "CA",
"province": "MB",
"city": "Winnipeg",
"zip": "R3T 0H4",
"phone": ""
},
"order_shipping_rate": {
"bold_order_id": 1,
"code": "Canada Post",
"name": "Canada Post",
"price": "10.00",
"source": "cashier",
"need_change": 0,
"hash": "73c168a51022850a4d1ca9f863c5bf29d911c292feaddeac0228f8d8908cce7ac9554a310972832b841e08b6e0d3fe489d7170819ea77bdcea1b2eba56856e81"
}
}

HTTPS/1.1 200 OK

Example response has been truncated for brevity

{
"status": 200,
"success": true,
"message": "OK",
"data": {
"id": 1,
"first_name": "John",
"last_name": "Doe",
"address1": "123 Not Real St.",
"address2": "",
"country": "CA",
"province": "MB",
"city": "Winnipeg",
"zip": "R3T 0H4",
"phone": "",
"company": "",
"order_shipping_rate": {
"bold_order_id": 1,
"code": "Canada Post",
"name": "Canada Post",
"price": "10",
"source": "cashier",
"need_change": false,
"hash": "33c83de87223252049549928fdbd133762a07db4d18073ca1620016591aa02c5c8965f1e2a24f224cb6cfdecf3fa097f0b7ab375d5a7d13e4fa46fd94e71bd36"
}
}
}

This endpoint updates the shipping address for a subscription.

PUT api/third_party/manage/subscription/orders/{order_id}/shipping_address

URL Parameters
ElementTypeDescription
order_idintegerSubscription Order ID
customer_idintegerShopify Customer ID
shopstringThe store's Shopify domain, e.g. mystore.myshopify.com
Request Body
ElementSub ElementTypeDescription
shipping_address Object
 first_namestringShipping First name
 last_namestringShipping Last name
 address1stringShipping Address
 address2stringShipping Address optional
 countrystringShipping Country
 companystringShipping Company
 provincestringShipping Province
 citystringShipping City
 zipstringShipping Zip code
 phonestringShipping Phone number
order_shipping_rate Object
 codestringOrder Shipping Code
 namestringOrder Shipping Name
 pricestringShipping Price
 sourcestringShipping Source
for example: shopify, cashier, decimal etc.
 need_changeinteger0/1
 hashstringshipping Hash
Data Object
ElementTypeDescription
idintegerSubscription Order ID
first_namestringShipping First Name
last_namestringShipping Last name
address1stringShipping Address
address2stringShipping Address optional
countrystringShipping Country
provincestringShipping Province
citystringShipping City
zipstringShipping Zip Code
phonestringShipping Phone Number
companystringShipping Company
order_shipping_rateobjectOrder Shipping Object

Update Shipping Method

PUT api/third_party/manage/subscription/orders/{order_id}/shipping_method?customer_id={customer_id}&shop={myshopify_domain} HTTPS/1.1
BOLD-Authorization: Bearer {token}
Content-Type: application/json

{
"order_shipping_rate": {
"code": "NEWSHIP",
"name": "new shipping method",
"price": "10.00",
"source": "new_source",
"need_change": 0,
"hash": "hashValue"
}
}

HTTPS/1.1 200 OK

Example response has been truncated for brevity

{
"success": true,
"status": 200,
"message": "OK",
"data": {
"id": 1,
"order_shipping_rate": {
"code": "NEWSHIP",
"name": "new shipping method",
"price": "10.00",
"source": "new_source",
"need_change": 0,
"hash": "hashValue"
}
}
}

This endpoint updates the shipping method for a subscription.

PUT api/third_party/manage/subscription/orders/{order_id}/shipping_method

URL Parameters
ElementTypeDescription
order_idintegerSubscription Order ID
shopstringThe store's Shopify domain, e.g. mystore.myshopify.com
Body Request
ElementSub ElementTypeDescription
order_shipping_rate Object
 codestringOrder Shipping Code
 namestringOrder Shipping Name
 pricestringShipping Price
 sourcestringShipping Source
for example: shopify, cashier, decimal etc.
 need_changeinteger0/1
 hashstringshipping Hash
Data Object
ElementTypeDescription
idintegerSubscription Order ID
order_shipping_rateobjectOrder Shipping Object

Update Shopify Order Tags

PUT api/third_party/manage/subscription/orders/{order_id}/shopify_order_tags?customer_id={customer_id}&shop={myshopify_domain} HTTP/1.1
BOLD-Authorization: Bearer {token}
Content-Type: application/json

{
"shopify_order_tags" : "initial_order,new_subscriber"
}

HTTPS/1.1 200 OK

Example response has been truncated for brevity

{
"status": 200,
"success": true,
"message": "OK",
"data": {
"id": 1,
"shopify_order_tags": "initial_order,new_subscriber"
}
}

This endpoint updates the order tags in Shopify for the subscription. This will only apply to future orders.

PUT api/third_party/manage/subscription/orders/{order_id}/shopify_order_tags

URL Parameters
ElementTypeDescription
order_idintegerSubscription Order ID
customer_idintegerShopify Customer ID
shopstringThe store's Shopify domain, e.g. mystore.myshopify.com
Request Body
ElementTypeDescription
shopify_order_tagsstringA comma separated string of all the tags that are to be applied to the upcoming orders
Data Object
ElementTypeDescription
idintegerSubscription Order ID
shopify_order_tagsstringA comma separated string of all the tags that are to be applied to the upcoming orders

Get Swap Information From Group

GET api/third_party/manage/subscription/groups/{group_id}/swap_information?product_internal_id={product_internal_id}&order_id={order_id}&customer_id={customer_id}&shop={myshopify_domain} HTTPS/1.1
BOLD-Authorization: Bearer {token}
Content-Type: application/json

HTTPS/1.1 200 OK

Example response has been truncated for brevity

{
"status": 200,
"success": true,
"message": "OK",
"data": {
"id": 1,
"product_internal_id": 1,
"products_with_price_difference": [
{
"handle": "product-handle-test",
"product_id": 123456789,
"shopify_data": {...},
},
{...}
]
}
}

This endpoint retrieves all swap information for a subscription group id, internal product id and order id.

GET api/third_party/manage/subscription/groups/{group_id}/swap_information

URL Parameters
ElementTypeDescription
group_idintegerSubscription Group ID
product_internal_idintegerInternal Product ID
order_idintegerSubscription Order ID
customer_idintegerShopify Customer ID
shopstringThe store's Shopify domain, e.g. mystore.myshopify.com
Data Object
ElementTypeDescription
idintegerSubscription Order ID
product_internal_idintegerSubscription Order Product ID
products_with_price_differencearrayArray of products with price differences
(Shopify Product Object)

Subscription Groups

Get

GET /api/third_party/subscription_groups?shop={myshopifyDomain} HTTPS/1.1
BOLD-Authorization: Bearer {token}
Content-Type: application/json

HTTPS/1.1 200 OK
{
"subscription_groups": [
{
"id": 1,
"shop_app_id": 3,
"group_name": "Bob's Burgers",
"subscription_type": 1,
"filter": "{\"select\":1,\"products\":[{\"prod_id\":\"691778060343\",\"id\":\"8291055108151\"}]}",
"group_discount": "0.0000",
"visible": true,
"max_number": 6,
"min_recurrences_before_cancellable": 0,
"pause_filter": "{\"select\":0,\"products\":[]}",
"is_paused": 0,
"interval_type": 0,
"subscription_only": 0,
"total_recurrences": 0,
"is_limited_subscription": 0,
"limited_continue": 1,
"allow_one_payment": 0,
"prepaid_continue": 1,
"is_prepaid_only": 0,
"is_prepaid_always_expires": 0,
"allow_is_gift": 0,
"billing_plan": 0,
"billing_day": 0,
"billing_offset": 0,
"allow_swap": 0,
"include_free_gift": 0,
"gift_filter": "",
"allow_ongoing": 0,
"apply_secondary_discount_on_product_swap": 0,
"affected_products": [
{
"group_id": 1,
"variant_id": 8291055108151
},
{
"group_id": 1,
"variant_id": 8291055108151
}
],
"intervals": [
{
"interval_id": 1
},
{
"interval_id": 2
},
{
"interval_id": 3
},
{
"interval_id": 5
},
{
"interval_id": 1
},
{
"interval_id": 2
},
{
"interval_id": 3
},
{
"interval_id": 5
}
]
},
{
"id": 3,
"shop_app_id": 3,
"group_name": "another test",
"subscription_type": 1,
"filter": "{\"select\":1,\"products\":[{\"prod_id\":\"691778060343\",\"id\":\"8291055108151\"}]}",
"group_discount": "0.0000",
"visible": true,
"max_number": 9,
"min_recurrences_before_cancellable": 0,
"pause_filter": null,
"is_paused": 0,
"interval_type": 0,
"subscription_only": 0,
"total_recurrences": 0,
"is_limited_subscription": 0,
"limited_continue": 1,
"allow_one_payment": 0,
"prepaid_continue": 1,
"is_prepaid_only": 0,
"is_prepaid_always_expires": 0,
"allow_is_gift": 0,
"billing_plan": 0,
"billing_day": 0,
"billing_offset": 0,
"allow_swap": 0,
"include_free_gift": 0,
"gift_filter": "",
"allow_ongoing": 0,
"apply_secondary_discount_on_product_swap": 0,
"affected_products": [],
"intervals": [
{
"interval_id": 3
}
]
},
{
"id": 4,
"shop_app_id": 3,
"group_name": "Tim's Tulips",
"subscription_type": 1,
"filter": "{\"select\":0,\"products\":[]}",
"group_discount": "0.0000",
"visible": true,
"max_number": 6,
"min_recurrences_before_cancellable": 0,
"pause_filter": "{\"select\":1,\"products\":[{\"prod_id\":\"691778060343\",\"id\":\"8291055108151\"}]}",
"is_paused": 1,
"interval_type": 0,
"subscription_only": 0,
"total_recurrences": 0,
"is_limited_subscription": 0,
"limited_continue": 1,
"allow_one_payment": 0,
"prepaid_continue": 1,
"is_prepaid_only": 0,
"is_prepaid_always_expires": 0,
"allow_is_gift": 0,
"billing_plan": 0,
"billing_day": 0,
"billing_offset": 0,
"allow_swap": 0,
"include_free_gift": 0,
"gift_filter": "",
"allow_ongoing": 0,
"apply_secondary_discount_on_product_swap": 0,
"affected_products": [],
"intervals": [
{
"interval_id": 1
},
{
"interval_id": 2
},
{
"interval_id": 3
},
{
"interval_id": 5
},
{
"interval_id": 1
},
{
"interval_id": 2
},
{
"interval_id": 3
},
{
"interval_id": 5
}
]
}
]
}

This endpoint retrieves a list of all subscription groups created by the store.

GET /api/third_party/subscription_groups?shop={myshopifyDomain}

URL Parameters
ElementTypeDescription
shopstringThe store's Shopify domain, e.g. mystore.myshopify.com
Data Object
ElementTypeDescription

Element descriptions pending...

Subscriptions

Get

GET /api/third_party/v2/subscriptions?shop={myshopifyDomain}&since_id={since_id}&limit={limit} HTTPS/1.1
BOLD-Authorization: Bearer {token}
Content-Type: application/json

HTTPS/1.1 200 OK
{
"subscriptions": [
{
"id": 3,
"shopify_customer_id": 267534937,
"interval_number": 1,
"interval_type_id": 1,
"first_name": "Donnie",
"last_name": "Blasco",
"customer_email": "[email protected]",
"address1": "511 meadowlark",
"address2": null,
"country": "Canada",
"province": "Manitoba",
"city": "Ile Des Chenes",
"zip": "R0A 0T0",
"phone": "250-555-3413",
"company": "",
"purchase_date": "2018-06-28",
"delete_date": null,
"last_ship_date": "2018-06-28",
"next_ship_date": "2018-06-29",
"active": false,
"is_paused": true,
"discount_code_id": 0,
"cancel_discount_code_id": 0,
"billing_first_name": "Donnie",
"billing_last_name": "Blasco",
"billing_address1": "511 meadowlark",
"billing_address2": null,
"billing_country": "Canada",
"billing_province": "Manitoba",
"billing_city": "Ile Des Chenes",
"billing_zip": "R0A 0T0",
"billing_phone": "250-555-3413",
"billing_company": "",
"notes": null,
"shopify_order_tags": null,
"taxes_included": 0,
"tax_shipping": 0,
"currency": "",
"currency_exchange_rate": "1.000000000000",
"currency_format": "",
"attributes": "[]",
"is_cancellable": true,
"cancel_reason": null,
"reactivatable": false,
"next_active_ship_date": "2018-06-29",
"billing_plan_id": 0,
"order_day": null,
"last_updated": "2018-06-28 11:22:07",
"paused_date": "2018-06-28 10:18:46",
"order_products": [
{
"id": 3,
"bold_order_id": 3,
"product_id": 691777929271,
"variant_id": 8291054583863,
"price": "1040.00",
"quantity": 1,
"gram": 0,
"product_title": "1.50ctw Diamond 14k Gold Wedding Band Eternity Ring",
"variant_title": "Default Title",
"status": 0,
"price_changed": 0,
"shopify_price": "1300.00",
"shopify_new_price": null,
"sku": "14522",
"shopify_inventory": null,
"inventory_management": null,
"taxable": 1,
"properties": "{\"frequency_num\":\"1\",\"frequency_type\":\"1\",\"group_id\":\"2\",\"is_prepaid\":\"1\",\"total_recurrences\":\"3\",\"prepaid_id\":\"2\",\"recurr_after_limit\":0,\"_ro_subscription_box_choices\":[],\"_ro_billing_plan\":0,\"frequency_type_text\":\"Day(s)\"}",
"vendor": "Not Signed",
"is_active": true,
"last_updated": "2018-06-28 11:22:06",
"properties_group_id": null,
"order_product_exceptions": []
}
],
"order_fixed_recurrences": {
"bold_order_id": 3,
"total_recurrences": 5,
"recurrence_count": 1,
"one_charge_only": 1,
"recurr_after_limit": 0,
"last_updated": "2018-07-17 17:16:38"
},
"order_exceptions": [],
"order_logs": [
{
"id": 3,
"shopify_order_num": "#2257",
"shopify_order_token": "17fddcd6290183b5b7c97f65919995e5",
"price": "3120.00",
"tax": "405.60",
"shipping": "28.50",
"purchase_date": "2018-06-28",
"share_shipping": false,
"discount_amount": "0.00",
"free_shipping_discount_applied": 0,
"charged_amount": "3554.10"
}
],
"order_log_failed_transactions": [],
"order_shipping_rate_exceptions": []
}
]
}

This endpoint retrieves a filtered page of the store's subscriptions. This endpoint is paginated, returning a page with 50 results. To retrieve the next page of results use the greatest subscription id in a subsequent request.

GET /api/third_party/v2/subscriptions?shop={myshopifyDomain}&since_id={since_id}&limit={limit}

URL Parameters
ElementTypeRequiredDescription
shopstringyesThe store's Shopify domain, e.g. mystore.myshopify.com
since_idintyesRO will return all orders greater than the number specified. For the first page you should set it to 0.
limitintnoThe cursor's size. This can be set with any number between 1 to 50.
idintegernoBold's internal subscription id.
customer_emailstringnothe customer email associated with this subscription.
activebooleannoShow subscriptions filtered on their active status
is_pausedbooleannoShow subscriptions filtered on their paused status
cancel_reasonstringnoShow subscriptions filtered on their cancel reason
shopify_customer_idbig intnoShow subscriptions based on the customer's Shopify unique id.
first_namestringnoShow subscriptions filtered by shipping first name
last_namestringnoShow subscriptions filtered by shipping last name
phonestringnoShow subscriptions filtered by phone
address1stringnoShow subscriptions filtered by shipping address 1
address2stringnoShow subscriptions filtered by shipping address 2
countrystringnoShow subscriptions filtered by shipping country
provincestringnoShow subscriptions filtered by shipping province/state
zipstringnoShow subscriptions filtered on shipping zip/postal code
purchase_datestringnoShow subscriptions filtered on the original purchase date of the subscription
last_ship_datedatenoShow subscriptions filtered by the most recent Shopify order date.
next_ship_datedatenoShow subscriptions filtered by the next upcoming Shopify order date.
discount_code_idbig intnoShow subscriptions filtered by the ID of the discount code used on this subscription.
billing_first_namestringnoShow subscriptions filtered on the billing first name
billing_last_namestringnoShow subscriptions filtered on the billing last name
billing_address1stringnoShow subscriptions filtered on billing address 1
billing_countrystringnoShow subscriptions filtered on billing address 2
billing_provincestringnoShow subscriptions filtered on billing province
billing_zipstringnoShow subscriptions filtered on billing zip/postal code
billing_phonestringnoShow subscriptions filtered on billing phone
taxes_includedbooleannoShow subscriptions filtered whether taxes were applied to the subscription.
tax_shippingbooleannoShow subscriptions filtered whether taxes were applied to the shipping lines.
next_active_ship_datedatenoShow subscriptions filtered on next ship date, taking order exceptions into account. (Example: If a customer has skipped the next two recurrences, the next active ship date will reflect the date of the third next recurrence.)
billing_plan_idintegernoShow subscriptions filtered on the billing plan id for fixed schedule recurring subscriptions.
order_daydatenoShow subscriptions filtered the day of the month the subscription was placed.
is_cancellablebooleannoShow subscriptions filtered on whether the subscription is currently cancellable
purchase_date_mindatenoShow subscriptions filtered on minimum purchase date
purchase_date_maxdatenoShow subscriptions filtered on maximum purchase date
next_ship_date_mindatenoShow subscriptions filtered on a minimum next ship date
next_ship_date_maxdatenoShow subscriptions filtered on the maximum next ship date
last_ship_date_mindatenoShow subscriptions filtered on a minimum last ship date
last_ship_date_maxdatenoShow subscriptions filtered on the maximum last ship date
next_active_ship_date_mindatenoShow subscriptions filtered on the minimum next active ship date
next_active_ship_date_maxdatenoShow subscriptions filtered on the maximum next active ship date
product_idbig intnoShow subscriptions filtered on the product ID of a line item on the subscription.
pageintegernoThe page of the result to show. (Size 50)
Data Object
ElementTypeDescription

Element descriptions pending...

Order Hooks

Reduce Product Quantity Hook

POST /api/third_party/manage/subscription/orders/{order_id}/reduce_product_quantity?customer_id={customer_id}&shop={myshopify_domain} HTTP/1.1
BOLD-Authorization: Bearer {token}
Content-Type: application/json

{
"product_internal_id": "644",
"quantity": "1",
"order_count": "1"
}

HTTPS/1.1 200 OK

Example response has been truncated for brevity

{
"status": 200,
"success": true,
"message": "OK",
"data": {
"id": 500,
"order_hooks": [
{
"title": "reduce_quantity",
"orders_remaining": 1,
"quantity": 1,
"bold_product_id": 644,
"conditions": [
{
"condition_type": "countdown",
"condition_value": "1"
}
]
}
]
}
}

This endpoint allows you to apply a hook to a subscription that will reduce the quantity of a product or remove the product if the quantity is reduced below 1. The hook will occur after the number of orders indicated by the order_count in the request. The number of orders required to process with the specific product on the order will be indicated in the response by the condition_value.

POST /api/third_party/manage/subscription/orders/{order_id}/reduce_product_quantity

URL Parameters
ElementTypeDescription
order_idintegerSubscription Order ID
customer_idintegerShopify Customer ID
shopstringThe store's Shopify domain, e.g. mystore.myshopify.com
Request Body
ElementTypeDescription
product_internal_idintegerRecurring Orders internal product ID for the subscription product receiving the hook.
quantityintegerThe number that will be used to subtract from the subscription product quantity.
order_countintegerThe number of orders that will process before the hook will be applied.
Data Object
ElementTypeDescription
idintegerSubscription Order ID
order_hooksarrayList of Order Hook Object

Delete Order Hooks

DELETE api/third_party/manage/subscription/orders/{order_id}/order_hooks?customer_id={customer_id}&shop={myshopify_domain} HTTP/1.1
BOLD-Authorization: Bearer {token}
Content-Type: application/json

HTTPS/1.1 200 OK

Example response has been truncated for brevity

{
"status": 200,
"success": true,
"data": {
"id": 1
}
}

This endpoint will delete or remove all pending order hooks on a subscription. Order hooks represent changes that are going to take place to the subscription in the future such as the removal of one time products, dynamic discounts, and the ability to cancel a subscription after a number of orders have passed. If these order hooks are removed, these future changes will not take place, but you will be more freely allowed to edit a subscription.

DELETE api/third_party/manage/subscription/orders/{order_id}/order_hooks

URL Parameters
ElementTypeDescription
order_idintegerSubscription Order ID
customer_idintegerShopify Customer ID
shopstringThe store's Shopify domain, e.g. mystore.myshopify.com
Data Object
ElementTypeDescription
idintegerSubscription Order ID

Objects

Build a Box Object

{
"date": "2018-06-12",
"status": "See details in Build a Box Statuses table",
"choices": [
{
"slot_id": 1,
"product_id": 111,
"variant_id": 222,
"quantity": 1
}
]
}
ElementSub ElementTypeDescription
date integerBuild a Box date in Y-m-d format
status integerLook on statuses
choices arrayList of BaB choices
 slot_idintegerSlot ID
 product_idintegerShopify Product ID
 variant_idintegerShopify variant ID
 quantityintegerProduct Quantity
Build a Box Statuses
StatusDefinition
lockedInside of lock time with choices in database
locked_default_choicesInside of lock time without choices in database
locked_after_choices_madeChoices made and in available range but lock after choices is turned on in group
availableIn available range with no changes in database
available_choices_madeIn available range with choices in database
unavailableDate beyond time to make choices
unavailable_choices_madeDate beyond time to make choices but previously choices were made

Order Discount Object

{
"discount_code": "DISCOUNTCODE",
"discount_details": "Free shipping to Anywhere up to $100.00 or less"
"discount_uses_per_customer": 3,
"discount_used_by_customer": 2
}
ElementTypeDescription
discount_codestringDiscount Code
discount_detailsstringTranslated details for discount, for example: $10.00 off all orders
discount_uses_per_customerintegerNumber of times the discount code can be used per customer. If value is 0, no limit has been set. Note that this is only included in the Get Initial Data endpoint.
discount_used_by_customerintegerNumber of times the discount code has been used by the customer. If discount_uses_per_customer is set to 0, this elements value will be null. Note that this is only included in the Get Initial Data endpoint.

Order Discount Queue Object

{
"discount_queue_id": 2,
"discount_code": "DISCOUNT10",
"discount_details": "$10.00 off all orders"
}
ElementTypeDescription
discount_queue_idintegerInternal Discount Queue ID
discount_codestringDiscount Code
discount_detailsstringTranslated details for discount, for example: $10.00 off all orders

Discount Manage Offer Object

{
"id": 3,
"offer_type": 2,
"discount_code_id": null,
"cancel_reason_id": 1
}
ElementTypeDescription
idinteger
offer_typeinteger
discount_code_idinteger
cancel_reason_idinteger

Discount Offer Object

{
"id": 5,
"type": 2,
"discount_code": "CANCELCODE",
"useable_time": 200,
"only_first_discount": 0,
"discount_type": 2,
"discount_amount": "2.00",
"discount_condition": 0,
"discount_condition_amount": "0.00",
"free_shipping_amount": "0.00",
"free_shipping_country_id": 1,
"free_shipping_country": "All countries",
"start_date": "2017-03-24",
"end_date": "0000-00-00",
"used": 0,
"status": 0,
"deleted": 0,
"once_per_customer": 0,
"eligible_product_list": "",
"id_parent": 0,
"cancel_id": 1,
"offer_type": 1,
"cancel_reason_id": 1
}
ElementTypeDescription
idintegerUnique identifier of the discount code
typeintegerRefers to the discount type, ( 1 = Standard Discount, 2 = Cancellation Discount, 3 = Bulk Group Discount)
discount_codestringThe string code used to identify the discount, and to be entered at checkout or on the manage subscription page
useable_timeintegerThe total number of times a discount code can be used
only_first_discountintegerWhether the discount can be used on checkout only
discount_typeintegerRefers to whether the discount is a fixed or percentage amount. (Fixed = 1, Percentage = 2)
discount_amountstringThe amount that the discount would subtract from the order
discount_conditionintegerRefers to whether the discount will remove the amount from the entire order or chosen products. (0 = entire order, 2 = these products, 3 = not these products)
discount_condition_amountstringThe minimum order total amount for a discount code to be applied
free_shipping_amountstringIf the shipping amount is less than or equal to this value and discount_type is set to 3 then free shipping is applied
free_shipping_country_idintegerThe ids countries that qualify for free shipping
free_shipping_countrystringThe countries that qualify for free shipping if discount code is of type 3
start_datedateThe date in CST, that a discount code will become valid
end_datedateThe date in CST, that a discount code will become invalid
usedintegerThe total number of times a discount code has been used
statusintegerIf equal to 1, then discount code is disabled and pauses the code from being applied to subscriptions that currently have it. If equal to 2 then, discount code is disabled and allows current subscriptions with the code applied to keep getting the discount applied to their orders.
deletedintegerRefers to is a discount code has been deleted
once_per_customerintegerRefers to the total number of times a discount code can be used per customer
eligible_product_liststringThe list of products that a discount code either applies to or does not apply to.
id_parentintegerThe id of the parent discount code in the case of bulk group discount codes
cancel_idinteger
offer_typeinteger
cancel_reason_idinteger

Order Fixed Recurrences Object

{
"bold_order_id": 1,
"total_recurrences": 6,
"recurrence_count": 1,
"one_charge_only": 0,
"recurr_after_limit": 0
}
ElementTypeDescription
bold_order_idintegerSubscription Order ID
total_recurrencesintegerNumber of prepaid/limited subscriptions
recurrence_countintegerCurrent Orders Shipped
one_charge_onlyintegerIf order is prepaid:
0 - no, 1 - yes
recurr_after_limitintegerAutomatically renew after last prepaid order
Allowed: 0 - no / 1 - yes

General Settings Object

{
"recurring_type": 2,
"cancel_mode": 1,
"provide_cancel_incentives_enabled": false,
"custom_cancel_message_enabled": false,
"custom_cancel_message": null,
"shop_name": "Test Shop",
"allow_change_shipping_date": true,
"allow_change_discounts": true,
"allow_manage_prepaid": false,
"bold_token": "123",
"bold_signature": "123",
"select_products_url": "https://test.myshopify.com/tools/checkout/manage_subscription_box/select_products/",
"gateway_name": "cashier",
"gateway_token": "token"
}
ElementTypeDescription
recurring_typeinteger1 - 2 -
cancel_modestringCancellation Management mode:
cancel_mode_standard
cancel_mode_off
cancel_mode_custom_reasons
cancel_mode_special_instruction
gateway_namestringPayment gateway name:
stripe
braintree
spreedly
cashier
gateway_tokenstringPayment gateway token
provide_cancel_incentives_enabledstring
custom_cancel_message_enabledboolean
custom_cancel_messagestring
shop_namestringShop name
allow_change_shipping_dateboolean
allow_change_discountsboolean
allow_manage_prepaidboolean
bold_tokenstringBOLD-Authorization Token
bold_signaturestringBOLD Signature
select_products_urlstringThe URL for Select Build A Box products

Order Object

{
"id": 1,
"shopify_customer_id": 1,
"interval_number": 1,
"interval_type_id": 1,
"first_name": "FirstName",
"last_name": "LastName",
"customer_email": "[email protected]",
"address1": "Address1",
"address2": null,
"country": "Country",
"province": "Province",
"city": "City",
"zip": "Zip",
"phone": "1111111111",
"company": "Bold",
"purchase_date": "2018-06-12",
"delete_date": null,
"last_ship_date": "2018-06-12",
"next_ship_date": "2018-06-12",
"discount_code_id": 0,
"cancel_discount_code_id": 0,
"billing_first_name": "FirstName",
"billing_last_name": "LastName",
"billing_address1": "Address1",
"billing_address2": "Apt 102",
"billing_country": "Country",
"billing_province": "Province",
"billing_city": "City",
"billing_zip": "Zip",
"billing_phone": "1111111111",
"billing_company": "Bold",
"notes": null,
"taxes_included": 0,
"tax_shipping": 0,
"attributes": "[]",
"is_cancellable": 1,
"cancel_reason": null,
"reactivatable": false,
"next_active_ship_date": null,
"billing_plan_id": 0,
"order_day": null,
"last_updated": "2018-06-12 11:11:51",
"order_logs": [
{
"shopify_order_num": "#1",
"shopify_order_token": "1",
"price": "1.00",
"tax": "1.00",
"shipping": "1.00",
"purchase_date": "2018-06-12",
"share_shipping": false,
"discount_amount": "0.00",
"free_shipping_discount_applied": 0,
"charged_amount": "1.00"
}
],
"order_product_exceptions": [
{
"date": "2018-07-12",
"products": [
{
"product_internal_id": 1,
"quantity": 8
}
]
}
],
"order_interval_type": {
"interval_type": "day",
"interval_text": "Day",
"estimated_days": 1
},
"order_fixed_recurrences": null,
"order_products": [
{
"id": 1,
"shop_app_id": 1,
"bold_order_id": 1,
"product_id": 111,
"variant_id": 222,
"price": "1.00",
"quantity": 1,
"gram": 0,
"product_title": "ProductTitle",
"variant_title": "VariantTitle",
"status": 0,
"price_changed": 0,
"shopify_price": "1.00",
"shopify_new_price": null,
"sku": "",
"shopify_inventory": null,
"inventory_management": null,
"taxable": 1,
"properties": "{\u0022frequency_num\u0022:\u00227\u0022,\u0022frequency_type\u0022:\u00221\u0022,\u0022group_id\u0022:\u00226\u0022,\u0022is_prepaid\u0022:\u0022\u0022,\u0022total_recurrences\u0022:\u0022\u0022,\u0022prepaid_id\u0022:\u0022\u0022,\u0022recurr_after_limit\u0022:\u00221\u0022,\u0022_ro_subscription_box_choices\u0022:[{\u0022slot\u0022:\u002211\u0022,\u0022quantity\u0022:\u00222\u0022},{\u0022slot\u0022:\u002212\u0022,\u0022quantity\u0022:\u00221\u0022}],\u0022_ro_billing_plan\u0022:0,\u0022frequency_type_text\u0022:\u0022Day(s)\u0022}",
"vendor": "VendorName",
"is_active": true,
"last_updated": "2018-06-12 11:06:23",
"properties_group_id": 6
}
],
"order_shipping_rate": {
"bold_order_id": 1,
"code": "DOM.EP",
"name": "ShipName",
"price": 1.00,
"source": "shopify",
"need_change": false,
"hash": "123"
},
"order_exceptions":[
"2018-08-12",
"2018-09-12"
],
"order_hooks": [
{
"bold_product_id": 111,
"conditions": [
{
"condition_type": "countdown",
"condition_value": "8"
}
],
"title": "Switch Price",
"new_price": null
}
],
"next_orders": ["2018-06-12",...],
"is_billing_the_same": true,
"build_a_box_next_orders": [
{
"date": "2018-06-12",
"status": "See details in Build a Box Statuses table",
"choices": [
{
"slot_id": 1,
"product_id": 111,
"variant_id": 222,
"quantity": 1
},{...},{...}],
},{...},{...}],
"build_a_box": true,
"has_prepaid": false,
"group_id": 1,
"discount": null,
"discount_queue": [
],
"credit_card": {
"last_four": "1111",
"expiry_date": "2021-12-31 00:00:00"
}
}
ElementTypeDescription
idintegerRecurring Orders internal product ID
shopify_customer_idintegerShopify Customer ID
interval_numberintegerRecurring interval number
for example: 2 (for every 2 weeks/days etc.)
interval_type_idintegerRecurring interval type:
1 - Day
2 - Week
3 - Month
5 - Year
first_namestringShipping First Name
last_namestringShipping Last name
customer_emailstringCustomer Email address
address1stringShipping Address
address2stringShipping Address optional
countrystringShipping Country
provincestringShipping Province
citystringShipping City
zipstringShipping Zip Code
phonestringShipping Phone Number
companystringShipping Company
purchase_datedateFirst order date
delete_datedateDelete date or null
last_ship_datedateLast order date
next_ship_datedatenext order date
discount_code_idintegerDiscount Code ID
cancel_discount_code_idintegerCancellation Code ID
billing_first_namestringBilling First Name
billing_last_namestringBilling Last name
billing_address1stringBilling Address
billing_address2stringBilling Address optional
billing_countrystringBilling Country
billing_provincestringBilling Province
billing_citystringBilling City
billing_zipstringBilling Zip Code
billing_phonestringBilling Phone Number
billing_companystringBilling Company
notesstringOrder notes
taxes_includedinteger
tax_shippinginteger
attributesstring
is_cancellableinteger
cancel_reasonstring
reactivatableinteger0/1
next_active_ship_datedate
billing_plan_idinteger
order_dayinteger
last_updateddatetime
order_logsarrayList of Order Log Objects
order_product_exceptionsarrayList of Order Product Exceptions Object
order_interval_typearray
order_fixed_recurrencesobject/nullOrder Fixed Recurrences Object
order_productsarrayList of Order Product Object
order_shipping_rateobjectOrder Shipping Object
order_exceptionsarrayArray of order exception dates
order_hooksarrayOrder hooks Object
next_ordersarrayArray of next order dates
is_billing_the_samebooleantrue/false
build_a_box_next_ordersarrayBuild A Box Object
build_a_boxbooleanIf order is Build a Box type
has_prepaidbooleanIf order is prepaid
group_idintegerSubscription Group ID
discountobject / nullOrder Discount Object
discount_queuearrayList of Order Discount Queue Objects
credit_cardarray

##Order Log Object

{
"shopify_order_num": "#1",
"shopify_order_token": "1",
"price": "1.00",
"tax": "1.00",
"shipping": "1.00",
"purchase_date": "2018-06-12",
"share_shipping": false,
"discount_amount": "0.00",
"free_shipping_discount_applied": 0,
"charged_amount": "1.00"
}
ElementTypeDescription
shopify_order_numstringShopify order Number
shopify_order_tokenstring
pricestringOrder Price value
taxstringOrder Tax value
shippingstringOrder Shipping value
purchase_datedatePurchase date
share_shippingbooleanIs shipping is shared
discount_amountstringDiscount amount
free_shipping_discount_appliedinteger
charged_amountstringCharged amount

Order Hook Object

{
"title": "reduce_quantity",
"bold_product_id": 644,
"quantity": 1,
"orders_remaining": 1,
"conditions": [
{
"condition_type": "countdown",
"condition_value": "1"
}
]
}
{
"title": "switch_price",
"bold_product_id": 644,
"price": 3.0,
"orders_remaining": 1,
"conditions": [
{
"condition_type": "countdown",
"condition_value": "1"
}
]
}
{
"title": "switch_product",
"bold_product_id": 644,
"price": 3.0,
"product_id": 23456432,
"variant_id": 34456634,
"orders_remaining": 1,
"conditions": [
{
"condition_type": "countdown",
"condition_value": "1"
}
]
}
{
"title": "make_cancellable",
"bold_product_id": NULL,
"orders_remaining": 1,
"conditions": [{
"condition_type": "order_countdown",
"condition_value": "1"
}]
}
ElementSub ElementTypeDescription
titlestringType of hook
bold_product_id*integerIndicates the id from the Order Product Object that the hook will be applied to. Only used for product based hooks which have a condition type of countdown.
conditions
 condition_typestringThe condition type countdown indicates the hook is monitoring the number of orders where a specific product exists. The condition type order_countdown indicates the hook is monitoring the number of orders that have processed for the subscription.
 condition_valuestringIndicates the amount of orders that need to process before the hook is applied.
quantity*integerIndicates the quantity that a product will be reduced by after the number of orders has passed.
price*decimalIndicates the price the product will be changed to after the number of orders has passed.
product_id*integerIndicates the Shopify product_id of the product that will replace the existing product after the number of orders has passed.
variant_id*integerIndicates the Shopify variant_id of the product that will replace the existing product after the number of orders has passed.
orders_remainingintegerIndicates the number of orders remaining before the hook is applied to the order.

*These attributes are dependant on the hook type

HookAttributeCondition Type 
reduce_quantitycountdownReduce Product Quantity Hook
 bold_product_id
 quantity
switch_pricecountdown
 bold_product_id
 price
switch_productcountdown
 bold_product_id
 product_id (Shopify)
 product_id (Shopify)
make_cancellableorder_countdown

Order Product Object

{
"id": 5,
"shop_app_id": 1,
"bold_order_id": 1,
"product_id": 111,
"variant_id": 222,
"price": "10.00",
"quantity": 1,
"gram": 100,
"product_title": "ProductTitle",
"variant_title": "VariantTItle",
"status": 0,
"price_changed": 0,
"shopify_price": "10.00",
"shopify_new_price": null,
"sku": "skuprod1",
"shopify_inventory": null,
"inventory_management": "shopify",
"taxable": 1,
"properties": "{\u0022frequency_num\u0022:1,\u0022frequency_type\u0022:2,\u0022frequency_type_text\u0022:\u0022Weekx(s***)\u0022,\u0022group_id\u0022:\u00221\u0022,\u0022is_prepaid\u0022:\u0022\u0022,\u0022total_recurrences\u0022:\u0022\u0022,\u0022prepaid_id\u0022:\u0022\u0022,\u0022recurr_after_limit\u0022:\u00220\u0022,\u0022_ro_billing_plan\u0022:0}",
"vendor": "Vendor",
"is_active": true,
"shopify_product": {
"id": 111,
"body_html": "",
"handle": "product_handle",
"product_type": "",
"published_scope": "global",
"title": "ProductTitle",
"vendor": "vendor",
"tags": "",
"options": [
{
"id": 123,
"name": "Title",
"position": 1,
"product_id": 111,
"values": [
{
"Default Title"
}
]
}
],
"images":{...},
"created_at": "2017-02-28T09:41:56+10:30",
"updated_at": "2017-06-16T02:12:55+09:30",
"published_at": "2017-02-28T09:35:00+10:30",
"image": {...},
"variant": {...}
}
}
ElementTypeDescription
idintegerRecurring Orders internal product ID
shop_app_idintegerShop App ID
bold_order_idintegerSubscription Order ID
product_idintegerShopify product ID
variant_idintegerShopify variant ID
pricestringProduct Price
quantityintegerProduct quantity
gramintegerGram
product_titlestringProduct title
variant_titlestringProduct variant
statusinteger0 - active, 1 - inactive
price_changedinteger
shopify_pricestringShopify price
shopify_new_pricestring
skustringSKU
shopify_inventorystringShopify inventory
inventory_managementstringShopify Inventory Management
taxableintegerIf product is taxable
propertiesstringRecurring Orders properties
vendorstringVendor name
is_activeinteger0/1
shopify_productobjectShopify Product Object

Order Product Exceptions Object

{
"date": "2017-06-01",
"products": [
{
"product_internal_id": 1,
"quantity": 1
},
{
"product_internal_id": 2,
"quantity": 1
},
{
"product_internal_id": 3,
"quantity": 0
}
]
}
ElementSub ElementTypeDescription
date integerproduct exception date in Y-m-d format
products 
 product_internal_idintegerRecurring Orders internal product ID
 quantityintegerProduct Quantity

Order Shipping Rate Object

{
"bold_order_id": 1,
"code": "DOM.EP",
"name": "Expedited Parcel",
"price": "10.00",
"source": "canada_post",
"need_change": false,
"hash": "hash_value"
}
ElementTypeDescription
bold_order_idintegerSubscription Order ID
codestringOrder Shipping Code
namestringOrder Shipping Name
pricestringShipping Price
sourcestringShipping Source
for example: shopify, cashier, decimal etc.
need_changeinteger0/1
hashstringshipping Hash

Initial Data Order Object

{
"id": 1,
"shopify_customer_id": 1,
"interval_number": 1,
"interval_type_id": 1,
"first_name": "FirstName",
"last_name": "LastName",
"customer_email": "[email protected]",
"address1": "Address1",
"address2": null,
"country": "Country",
"province": "Province",
"city": "City",
"zip": "Zip",
"phone": "1111111111",
"company": "Bold",
"purchase_date": "2018-06-12",
"delete_date": null,
"last_ship_date": "2018-06-12",
"next_ship_date": "2018-06-12",
"discount_code_id": 0,
"cancel_discount_code_id": 0,
"billing_first_name": "FirstName",
"billing_last_name": "LastName",
"billing_address1": "Address1",
"billing_address2": "Apt 102",
"billing_country": "Country",
"billing_province": "Province",
"billing_city": "City",
"billing_zip": "Zip",
"billing_phone": "1111111111",
"billing_company": "Bold",
"notes": null,
"taxes_included": 0,
"tax_shipping": 0,
"attributes": "[]",
"is_cancellable": 1,
"cancel_reason": null,
"reactivatable": false,
"next_active_ship_date": null,
"billing_plan_id": 0,
"order_day": null,
"last_updated": "2018-06-12 11:11:51",
"order_logs": [
{
"shopify_order_num": "#1",
"shopify_order_token": "1",
"price": "1.00",
"tax": "1.00",
"shipping": "1.00",
"purchase_date": "2018-06-12",
"share_shipping": false,
"discount_amount": "0.00",
"free_shipping_discount_applied": 0,
"charged_amount": "1.00"
}
],
"order_product_exceptions": [
{
"date": "2018-07-12",
"products": [
{
"product_internal_id": 1,
"quantity": 8
}
]
}
],
"order_interval_type": {
"interval_type": "day",
"interval_text": "Day",
"estimated_days": 1
},
"order_fixed_recurrences": null,
"order_products": [
{
"id": 1,
"shop_app_id": 1,
"bold_order_id": 1,
"product_id": 111,
"variant_id": 222,
"price": "1.00",
"quantity": 1,
"gram": 0,
"product_title": "ProductTitle",
"variant_title": "VariantTitle",
"status": 0,
"price_changed": 0,
"shopify_price": "1.00",
"shopify_new_price": null,
"sku": "",
"shopify_inventory": null,
"inventory_management": null,
"taxable": 1,
"properties": "{\u0022frequency_num\u0022:\u00227\u0022,\u0022frequency_type\u0022:\u00221\u0022,\u0022group_id\u0022:\u00226\u0022,\u0022is_prepaid\u0022:\u0022\u0022,\u0022total_recurrences\u0022:\u0022\u0022,\u0022prepaid_id\u0022:\u0022\u0022,\u0022recurr_after_limit\u0022:\u00221\u0022,\u0022_ro_subscription_box_choices\u0022:[{\u0022slot\u0022:\u002211\u0022,\u0022quantity\u0022:\u00222\u0022},{\u0022slot\u0022:\u002212\u0022,\u0022quantity\u0022:\u00221\u0022}],\u0022_ro_billing_plan\u0022:0,\u0022frequency_type_text\u0022:\u0022Day(s)\u0022}",
"vendor": "VendorName",
"is_active": true,
"last_updated": "2018-06-12 11:06:23",
"properties_group_id": 6
}
],
"order_shipping_rate": {
"bold_order_id": 1,
"code": "DOM.EP",
"name": "ShipName",
"price": 1.00,
"source": "shopify",
"need_change": false,
"hash": "123"
},
"order_exceptions":[
"2018-08-12",
"2018-09-12"
],
"order_hooks": [
{
"bold_product_id": 111,
"conditions": [
{
"condition_type": "countdown",
"condition_value": "8"
}
],
"title": "Switch Price",
"new_price": null
}
],
"next_orders": ["2018-06-12",...],
"is_billing_the_same": true,
"build_a_box_next_orders": [
{
"date": "2018-06-12",
"status": "See details in Build a Box Statuses table",
"choices": [
{
"slot_id": 1,
"product_id": 111,
"variant_id": 222,
"quantity": 1
},{...},{...}],
},{...},{...}
],
"build_a_box": true,
"has_prepaid": false,
"group_id": 1,
"discount": null,
"discount_queue": [
],
"credit_card": {
"last_four": "1111",
"expiry_date": "2021-12-31 00:00:00"
},
"status": 0
}
ElementTypeDescription
idintegerRecurring Orders internal product ID
shopify_customer_idintegerShopify Customer ID
interval_numberintegerRecurring interval number
for example: 2 (for every 2 weeks/days etc.)
interval_type_idintegerRecurring interval type:
1 - Day
2 - Week
3 - Month
5 - Year
first_namestringShipping First Name
last_namestringShipping Last name
customer_emailstringCustomer Email address
address1stringShipping Address
address2stringShipping Address optional
countrystringShipping Country
provincestringShipping Province
citystringShipping City
zipstringShipping Zip Code
phonestringShipping Phone Number
companystringShipping Company
purchase_datedateFirst order date
delete_datedateDelete date or null
last_ship_datedateLast order date
next_ship_datedatenext order date
discount_code_idintegerDiscount Code ID
cancel_discount_code_idintegerCancellation Code ID
billing_first_namestringBilling First Name
billing_last_namestringBilling Last name
billing_address1stringBilling Address
billing_address2stringBilling Address optional
billing_countrystringBilling Country
billing_provincestringBilling Province
billing_citystringBilling City
billing_zipstringBilling Zip Code
billing_phonestringBilling Phone Number
billing_companystringBilling Company
notesstringOrder notes
taxes_includedinteger
tax_shippinginteger
attributesstring
is_cancellableinteger
cancel_reasonstring
reactivatableinteger0/1
next_active_ship_datedate
billing_plan_idinteger
order_dayinteger
last_updateddatetime
order_logsarrayList of Order Log Objects
order_product_exceptionsarrayList of Order Product Exceptions Object
order_interval_typearray
order_fixed_recurrencesobject/nullOrder Fixed Recurrences Object
order_productsarrayList of Order Product Object
order_shipping_rateobjectOrder Shipping Object
order_exceptionsarrayArray of order exception dates
order_hooksarrayOrder hooks Object
next_ordersarrayArray of next order dates
is_billing_the_samebooleantrue/false
build_a_box_next_ordersarrayBuild A Box Object
build_a_boxbooleanIf order is Build a Box type
has_prepaidbooleanIf order is prepaid
group_idintegerSubscription Group ID
discountobject / nullOrder Discount Object
discount_queuearrayList of Order Discount Queue Objects
credit_cardarray
statusintegerOrder payment status:
0 - no failed tx's
1 - failed tx's
2 - authentication required

How-to Guides

Get Shipping Rates

You can use the Shipping Rates endpoint to get the shipping rates that the subscription currently qualifies for, or the shipping rates the subscription would qualify for if a change to the subscription was made.

Getting Available Shipping Rates for a Subscription

To get all of the available shipping rates that a subscription currently qualifies for, make a GET request to the Shipping Rates endpoint with the subscription id. (Order id)

GET api/third_party/manage/subscription/orders/{order_id}/shipping_rates?customer_id={customer_id}&shop={myshopify_domain} HTTPS/1.1
BOLD-Authorization: Bearer {token}
Content-Type: application/json

HTTPS/1.1 200 OK

Get Shipping Rates for Shipping Address Changes

When you are going to change the shipping address associated with a subscription, you may qualify for different shipping rates.

To get the available rates you will send the new shipping address in the URL parameters of the request.

GET api/third_party/manage/subscription/orders/2478/shipping_rates?zip={shipping_zip}&country={shipping_country}&city={shipping_city}&province={shipping_province}&address1={shipping_address_1}&address2={shipping_address2}=&phone={phone}&customer_id={shopify_customer_id}&t=1575060452553 HTTPS/1.1
BOLD-Authorization: Bearer {token}
Content-Type: application/json

HTTPS/1.1 200 OK

Getting Shipping Rates for Product Quantity Changes

When you are going to change the quantity of a product on a subscription, you may qualify for different shipping rates. This is because the total price or weight of the subscription may change if you change the quantity.

To get the available shipping rates, with a product quantity changed you will send a URL encoded array of the products and the new quantities.

[
{
"product_internal_id": 2542,
"quantity": "2",
"is_deleted": false
}
]

product_internal_id: The bold product id quantity: The new quantity that you want to change it to is_deleted: This is used if you are setting the quantity to 0. If set to true, will delete the product from the subscription

GET api/third_party/manage/subscription/orders/2478/shipping_rates?zip={shipping_zip}&country={shipping_country}&city={shipping_city}&province={shipping_province}&order_products={url_encoded_product_quantity}&customer_id={shopify_customer_id}t=1575056879485 HTTPS/1.1
BOLD-Authorization: Bearer {token}
Content-Type: application/json

HTTPS/1.1 200 OK

Getting Shipping Rates when Adding a Product

When you are going to add a product on a subscription, you may qualify for different shipping rates. This is because the total price or weight of the subscription may change if you add a product.

To get the available shipping rates, when adding a product you will send a URL encoded array of the products you are adding, and their quantities.

[
{
"shopify_product_id": 164932858,
"shopify_variant_id": 1608966106,
"quantity": 1
}
]

shopify_product_id: The Shopify product id you are adding to the subscription shopify_variant_id: The Shopify variant id you are adding to the subscription quantity: The quantity of the products you are adding to the subscription

GET api/third_party/manage/subscription/orders/2463/shipping_rates?zip={shipping_zip}&country={shipping_country}&city={shipping_city}&province={shipping_province}&new_order_products={url_encoded_new_products}&customer_id={shopify_customer_id}&t=1571328584531 HTTPS/1.1
BOLD-Authorization: Bearer {token}
Content-Type: application/json

HTTPS/1.1 200 OK

Getting Shipping Rates when Swapping a Product

When you are going to swap a product on a subscription, you may qualify for different shipping rates. This is because the total price or weight of the subscription may change if you swap a product.

To get the available shipping rates, for a product swap you will send the Shopify product id an variant id of the product you are swapping to.

GET api/third_party/manage/subscription/orders/2478/shipping_rates?zip={shipping_zip}&country={shipping_country}&city={shipping_city}&province={shipping_province}&product_internal_id={bold_product_id}&product_id={new_shopify_producut_id}&variant_id={new_shopify_variant_id}&customer_id={shopify_customer_id}&t=1575059258150 HTTPS/1.1
BOLD-Authorization: Bearer {token}
Content-Type: application/json

HTTPS/1.1 200 OK

Swap a Product

In the settings for a subscription group there is an option to allow swapping of products. This allows customers to switch the product they are subscribed to with another product in the subscription group. This can be achieved through the Integrations API.

Step 1: Obtain Your Bearer Token

The Third Party or Integrations API uses a Bearer Authentication scheme. You must make a basic authentication request with your Private API Key and App Handle to receive a bearer token to use with all subsequent API requests.

Generate an API Key

In the Bold Subscriptions Admin navigate to Integrations > API Keys.

Here you can create a new API key. The handle is a way to keep track of where you are using each of the API keys you have generated. Note you must be on the Advanced Price Plan to be able to generate API keys.

Generate Your Token

You will need to create a single request to the authentication endpoint. Read more about authentication The token you receive in response will be valid for 24 hours.

GET api/auth/third_party_token?shop={myshopifyDomain}&handle={appHandle} HTTPS/1.1
Content-Type: application/json
BOLD-Authorization: {privateApiKey}

HTTPS/1.1 200 OK

Step 2: Get Customer Subscription Information

You will need to get information about the customers and subscription to be able to swap the product.

group_id : The id of the subscription group that the subscribed to product belongs to

product_internal_id : The Bold product id of the subscribed to product

To get this information we will make a GET request call to the Subscriptions endpoint.

GET /api/third_party/subscriptions?shop={myshopifyDomain}&shopify_customer_id={shopify_customer_id}7&id={bold_order_id} HTTPS/1.1
BOLD-Authorization: Bearer {token}
Content-Type: application/json

HTTPS/1.1 200 OK

The product_internal_id is subscriptions->order_products->id The group_id is found subscriptions->order_products->properties->group_id

note

You can find the subscription id or bold order id in the Bold Subscriptions Admin under Subscriptions > Customers > Edit > ID

Step 3: Get Swappable Products

You can swap a product with any other product in the same subscription group. You will make a GET request to Group endpoint.

GET /api/third_party/manage/subscription/groups/{group_id}/swap_information?product_internal_id={product_internal_id}&order_id={order_id}&customer_id={customer_id}&shop={myshopify_domain} HTTPS/1.1
BOLD-Authorization: Bearer {token}
Content-Type: application/json

HTTPS/1.1 200 OK

Step 4: Get Available Shipping Rates

When swapping a product, you will need to update the shipping rate for the subscription. In the Shipping Rate object you will see a unique hash. This hash changes depending on the products in the subscription. Because of this even if you are going to keep the same shipping rate, you will need to resend the rate because the hash will have changed.

You will send a GET request to the Shipping Rates endpoint. In the GET request we will include how we are hoping to change the order (i.e. with a product swapped)

GET api/third_party/manage/subscription/orders/2477/shipping_rates?zip={zip_code}&country={shipping_country}&city={shipping_city}&province={shipping_province}&product_id={new_shopify_product_id}&variant_id={new_shopify_variant_id}&customer_id=97235533851&t=1574784594893&shop={myshopify_domain}
BOLD-Authorization: Bearer {token}
Content-Type: application/json

HTTPS/1.1 200 OK

If you are swapping from Product A to Product B then the product_internal_id is Bold product id of Product A product_id and variant_id are the Shopify product and variant ids of Product B.

Step 5: Saving the New Product

Now you have all the information we need to swap the old product with the new product on the subscription. We will send a PUT request to the Swap Product endpoint. You need to send the new product information as well as one of the valid shipping rates we receive in the previous request.

PUT /third_party/manage/subscription/orders/{order_id}/save_swap_product?customer_id={customer_id}&shop={myshopify_domain} HTTPS/1.1
BOLD-Authorization: Bearer {token}
Content-Type: application/json

{
"order_id": 1,
"product_internal_id": 1,
"product_id": 123456789,
"variant_id": 234567891,
"order_shipping_rate": {
"code": "DOM.EP",
"name": "Expedited Parcel",
"source": "canada_post",
"price": "2312.10",
"need_change": false,
"hash": "ajk20934joskefj098234kj3ok2o9sudkjasd"
}
}

HTTPS/1.1 200 OK

When you view the subscription now, you should see the new product. You should also be able to see in the customer's history that the item was swapped.