Subscription Builder Customer API (1.0)
Download OpenAPI specification:Download
Note: Subscription Builder requires Bold Checkout to be installed on your store. Therefore, it is not available to merchants using Shopify. For information on build-a-box subscriptions on Shopify, refer to the Help Center.
Subscription Builder makes it possible to create advanced build-a-box style subscription boxes, where customers can choose the contents of each subscription order. Merchants must be using Bold Checkout to use this functionality.
The Subscription Builder Customer API contains endpoints specific to customer functionality and requires JWT authentication.
Refer to the changelog for the latest updates to this API.
Contains information about a customer's product selections for a subscription box, including customer ID, shop ID, and subscription boxes. Use these endpoints to get, create, remove, and update customer selections.
Create Customer Selection
Creates a new selection for a customer using their platform ID.
Authorizations:
path Parameters
shop_identifier required | string Example: zp3oafdor9 The identifier of the shop. Can be retrieved by making a request to the Get Info endpoint. |
platform_customer_id required | string Example: 50942578465125 The platform identifier for an authenticated customer. |
Request Body schema: application/json
object (Selection) The subscription properties selected by the customer. | |||||||||||||||||
|
Responses
Request samples
- Payload
{- "selection": {
- "id": 17,
- "bold_platform_subscription_line_item_id": 6578818383929,
- "order_datetime": "2021-01-17T20:30:40Z",
- "box_size_id": 2,
- "time_slot_id": 7,
- "line_items": [
- {
- "box_product_id": 348,
- "choice_quantity": 3
}
], - "created_at": "2021-01-15T20:30:40Z",
- "updated_at": "2021-01-16T20:30:40Z"
}
}
Response samples
- 200
{- "data": {
- "selection": {
- "id": 17,
- "bold_platform_subscription_line_item_id": 6578818383929,
- "order_datetime": "2021-01-17T20:30:40Z",
- "box_size_id": 2,
- "time_slot_id": 7,
- "line_items": [
- {
- "box_product_id": 348,
- "choice_quantity": 3
}
], - "created_at": "2021-01-15T20:30:40Z",
- "updated_at": "2021-01-16T20:30:40Z"
}
}
}
List Customer Selections
Lists selections for a single customer using their platform ID.
Authorizations:
path Parameters
shop_identifier required | string Example: zp3oafdor9 The identifier of the shop. Can be retrieved by making a request to the Get Info endpoint. |
platform_customer_id required | string Example: 50942578465125 The platform identifier for an authenticated customer. |
query Parameters
bold_platform_subscription_line_item_id | integer Example: bold_platform_subscription_line_item_id=200 An internal-only string that Bold uses to identify subscription line items. |
order_datetime | string <date-time> Example: order_datetime=2021-01-17T20:30:40Z The date and time of the order, in RFC date-time format. |
Responses
Response samples
- 200
{- "data": {
- "selections": [
- {
- "id": 17,
- "bold_platform_subscription_line_item_id": 6578818383929,
- "order_datetime": "2021-01-17T20:30:40Z",
- "box_size_id": 2,
- "time_slot_id": 7,
- "line_items": [
- {
- "box_product_id": 348,
- "choice_quantity": 3
}
], - "created_at": "2021-01-15T20:30:40Z",
- "updated_at": "2021-01-16T20:30:40Z"
}
]
}, - "pagination": {
- "total": 150,
- "count": 35,
- "per_page": 30,
- "current_page": 2,
- "total_pages": 5
}
}
Get Customer Selection
Gets a customer's selection by the selection ID.
Authorizations:
path Parameters
shop_identifier required | string Example: zp3oafdor9 The identifier of the shop. Can be retrieved by making a request to the Get Info endpoint. |
selection_id required | integer Example: 17 The selection ID. |
platform_customer_id required | string Example: 50942578465125 The platform identifier for an authenticated customer. |
Responses
Response samples
- 200
{- "data": {
- "selection": {
- "id": 17,
- "bold_platform_subscription_line_item_id": 6578818383929,
- "order_datetime": "2021-01-17T20:30:40Z",
- "box_size_id": 2,
- "time_slot_id": 7,
- "line_items": [
- {
- "box_product_id": 348,
- "choice_quantity": 3
}
], - "created_at": "2021-01-15T20:30:40Z",
- "updated_at": "2021-01-16T20:30:40Z"
}
}
}
Update Customer Selection
Partially updates a customer's existing selection by the selection ID.
Authorizations:
path Parameters
shop_identifier required | string Example: zp3oafdor9 The identifier of the shop. Can be retrieved by making a request to the Get Info endpoint. |
selection_id required | integer Example: 17 The selection ID. |
platform_customer_id required | string Example: 50942578465125 The platform identifier for an authenticated customer. |
Request Body schema: application/json
object (Selection) The subscription properties selected by the customer. | |||||||||||||||||
|
Responses
Request samples
- Payload
{- "selection": {
- "id": 17,
- "bold_platform_subscription_line_item_id": 6578818383929,
- "order_datetime": "2021-01-17T20:30:40Z",
- "box_size_id": 2,
- "time_slot_id": 7,
- "line_items": [
- {
- "box_product_id": 348,
- "choice_quantity": 3
}
], - "created_at": "2021-01-15T20:30:40Z",
- "updated_at": "2021-01-16T20:30:40Z"
}
}
Delete Customer Selection
Deletes a customer's existing selection by the selection ID.
Authorizations:
path Parameters
shop_identifier required | string Example: zp3oafdor9 The identifier of the shop. Can be retrieved by making a request to the Get Info endpoint. |
selection_id required | integer Example: 17 The selection ID. |
platform_customer_id required | string Example: 50942578465125 The platform identifier for an authenticated customer. |