Checkout Remote State Authority (1.0.0)
Download OpenAPI specification:Download
The Checkout Remote State Authority API enables Bold to interact with a remote system that owns and has complete control over the state of an order during checkout. When a Remote State Authority (RSA) is configured, Bold Checkout calls the Remote Authority with order information, which manipulates the order and sends an updated order back to Bold Checkout.
This specification file defines the expected server behavior of the Remote State Authority server. Bold applications require the endpoints listed here to be implemented in order to function properly.
Process Order Events
Applies various state changes to the order. Events on any given request will only ever correspond to a single order, identified by the public_order_id
.
Authorizations:
path Parameters
shop_identifier required | string Example: zp3oafdor9 The identifier of the shop, which can be retrieved by making a request to the Get Info endpoint. |
public_order_id required | string Example: SpMIhOL7Q36EDZUagB5GnnPh4TUb9zW9t0DGrWd8PvrwdV1S1PhGpf9wFIJRyZEi The public order identifier generated when the order is initialized within Bold Checkout. |
Request Body schema: application/jsonrequired
cart_id required | string The platform-defined identifier of the cart associated with the order. |
public_order_id required | string The public order identifier generated when the order is initialized within Bold Checkout. |
required | object (Incoming Order State) Represents the current state of the order, as calculated by Bold Checkout. |
required | Array of SetShippingAddress (object) or RemoveShippingAddress (object) or SetBillingAddress (object) or RemoveBillingAddress (object) or SetCustomer (object) or RemoveCustomer (object) or SetShippingLine (object) or GetShippingLines (object) or ApplyTaxes (object) or AddDiscountCode (object) or RemoveDiscountCode (object) or AddLineItem (object) or UpdateLineItem (object) or RemoveLineItem (object) or EstimateTax (object) or EstimateShipping (object) non-empty An array of one or more changes to make to the order state. The RSA must process these events in the order they are received. |
Responses
Request samples
- Payload
{- "cart_id": "R1F6BiWNxI0Gg9WMfSZtMkTiUoFSlBD6",
- "public_order_id": "SpMIhOL7Q36EDZUagB5GnnPh4TUb9zW9t0DGrWd8PvrwdV1S1PhGpf9wFIJRyZEi",
- "order_state": {
- "cart_id": "R1F6BiWNxI0Gg9WMfSZtMkTiUoFSlBD6",
- "line_items": [
- {
- "title": "Ground Coffee, 16oz",
- "description": "Our delicious coffee blend is ground from the finest Colombian beans, guaranteeing you the best cup of coffee you've had!",
- "visible": true,
- "quantity": 1,
- "taxable": true,
- "line_item_key": "ERQ-GND-16_1",
- "sku": "ERQGND16",
- "platform_variant_id": "e7ba4c75-b1bb-483d-94d8-2c4a10f78472",
- "requires_shipping": true,
- "weight_unit": "oz",
- "tax_code": "PF050211",
- "note": "Extra-fine ground requested",
- "volume_unit": "bag",
- "unit_price": 1299,
- "item_weight": 16,
- "vendor": "Example Enterprises",
- "properties": {
- "grind": "extra-fine",
- "roast": "dark"
}, - "taxes": [
- {
- "name": "GST",
- "rate": 0.05,
- "unit_amount": 64.95
}
], - "discounts": [
- {
- "text": "First time buyer - 10% off",
- "unit_amount": 136.4,
- "code": "FIRSTTIMER_PR45TY90",
- "source": "cart"
}, - {
- "text": "Spring Sale - $5.00 off",
- "unit_amount": 5,
- "code": "SPRING2023_E44J23",
- "source": "coupon"
}
]
}
], - "customer": {
- "platform_id": "836206",
- "public_id": "TwyAWDwCkrdZqbifdcF6XAZjLgDEeyK4j0d4qani2exHwaQYl4jZzLhVciqenJ4T",
- "first_name": "Carl",
- "last_name": "Smith",
- "accepts_marketing": true
}, - "shipping_address": {
- "first_name": "Carl",
- "last_name": "Smith",
- "address_line_1": "50 Fultz Boulevard",
- "address_line_2": "Unit 2",
- "city": "Winnipeg",
- "province": "Manitoba",
- "province_code": "MB",
- "country": "Canada",
- "country_code": "CA",
- "postal_code": "R3Y 0L6",
- "business_name": "Bold Commerce",
- "phone_number": "204-808-8095"
}, - "billing_address": {
- "first_name": "Carl",
- "last_name": "Smith",
- "address_line_1": "50 Fultz Boulevard",
- "address_line_2": "Unit 2",
- "city": "Winnipeg",
- "province": "Manitoba",
- "province_code": "MB",
- "country": "Canada",
- "country_code": "CA",
- "postal_code": "R3Y 0L6",
- "business_name": "Bold Commerce",
- "phone_number": "204-808-8095"
}, - "shipping_options": [
- {
- "rate_name": "Standard Shipping",
- "cost": 500,
- "code": "SHIPPING_AR36F"
}, - {
- "rate_name": "Expedited Shipping",
- "cost": 2499,
- "code": "SHIPPING_P3R44"
}
], - "selected_shipping": {
- "rate_name": "Standard Shipping",
- "cost": 500,
- "code": "SHIPPING_AR36F",
- "taxes": [
- {
- "name": "GST",
- "rate": 0.05,
- "unit_amount": 25
}
]
}, - "tags": [
- "Wholesale",
- "Order Packed"
], - "fees": [
- {
- "description": "Convenience fee",
- "value": 150,
- "taxable": true
}
], - "notes": [
- "Customer called to clarify delivery date on October 12th"
], - "cart_params": {
- "customer_first_name": "Carl",
- "customer_last_name": "Smith",
- "shirt_size": "XL"
}
}, - "events": [
- {
- "event_name": "set_shipping_address",
- "data": {
- "first_name": "Carl",
- "last_name": "Smith",
- "address_line_1": "50 Fultz Boulevard",
- "address_line_2": "Unit 2",
- "city": "Winnipeg",
- "province": "Manitoba",
- "province_code": "MB",
- "country": "Canada",
- "country_code": "CA",
- "postal_code": "R3Y 0L6",
- "business_name": "Bold Commerce",
- "phone_number": "204-808-8095"
}
}
]
}
Response samples
- 200
- 400
{- "cart_id": "R1F6BiWNxI0Gg9WMfSZtMkTiUoFSlBD6",
- "line_items": [
- {
- "title": "Ground Coffee, 16oz",
- "description": "Our delicious coffee blend is ground from the finest Colombian beans, guaranteeing you the best cup of coffee you've had!",
- "visible": true,
- "quantity": 1,
- "taxable": true,
- "line_item_key": "ERQ-GND-16_1",
- "sku": "ERQGND16",
- "platform_variant_id": "e7ba4c75-b1bb-483d-94d8-2c4a10f78472",
- "requires_shipping": true,
- "item_weight": 16,
- "weight_unit": "oz",
- "tax_code": "PF050211",
- "note": "Extra-fine ground requested",
- "volume_unit": "bag",
- "unit_price": 1299,
- "vendor": "Example Enterprises",
- "properties": {
- "grind": "extra-fine",
- "roast": "dark"
}, - "taxes": [
- {
- "name": "GST",
- "rate": 0.05,
- "unit_amount": 64.95
}
], - "discounts": [
- {
- "text": "First time buyer - 10% off",
- "unit_amount": 136.4,
- "code": "FIRSTTIMER_PR45TY90",
- "source": "cart"
}, - {
- "text": "Spring Sale - $5.00 off",
- "unit_amount": 5,
- "code": "SPRING2023_E44J23",
- "source": "coupon"
}
]
}
], - "customer": {
- "platform_id": "836206",
- "public_id": "TwyAWDwCkrdZqbifdcF6XAZjLgDEeyK4j0d4qani2exHwaQYl4jZzLhVciqenJ4T",
- "first_name": "Carl",
- "last_name": "Smith",
- "accepts_marketing": true
}, - "shipping_address": {
- "first_name": "Carl",
- "last_name": "Smith",
- "address_line_1": "50 Fultz Boulevard",
- "address_line_2": "Unit 2",
- "city": "Winnipeg",
- "province": "Manitoba",
- "province_code": "MB",
- "country": "Canada",
- "country_code": "CA",
- "postal_code": "R3Y 0L6",
- "business_name": "Bold Commerce",
- "phone_number": "204-808-8095"
}, - "billing_address": {
- "first_name": "Carl",
- "last_name": "Smith",
- "address_line_1": "50 Fultz Boulevard",
- "address_line_2": "Unit 2",
- "city": "Winnipeg",
- "province": "Manitoba",
- "province_code": "MB",
- "country": "Canada",
- "country_code": "CA",
- "postal_code": "R3Y 0L6",
- "business_name": "Bold Commerce",
- "phone_number": "204-808-8095"
}, - "shipping_options": [
- {
- "rate_name": "Standard Shipping",
- "cost": 500,
- "code": "SHIPPING_AR36F"
}, - {
- "rate_name": "Expedited Shipping",
- "cost": 2499,
- "code": "SHIPPING_P3R44"
}
], - "selected_shipping": {
- "rate_name": "Standard Shipping",
- "cost": 500,
- "code": "SHIPPING_AR36F",
- "taxes": [
- {
- "name": "GST",
- "rate": 0.05,
- "unit_amount": 25
}
]
}, - "tags": [
- "Wholesale",
- "Order Packed"
], - "fees": [
- {
- "description": "Convenience fee",
- "value": 150,
- "taxable": true
}
], - "notes": [
- "Customer called to clarify delivery date on October 12th"
], - "cart_params": {
- "customer_first_name": "Carl",
- "customer_last_name": "Smith",
- "shirt_size": "XL"
}
}
Validate Address
Validates the given address. This will not apply the address, but can allow for ahead-of-time validation of particular fields.
Authorizations:
path Parameters
shop_identifier required | string Example: zp3oafdor9 The identifier of the shop, which can be retrieved by making a request to the Get Info endpoint. |
public_order_id required | string Example: SpMIhOL7Q36EDZUagB5GnnPh4TUb9zW9t0DGrWd8PvrwdV1S1PhGpf9wFIJRyZEi The public order identifier generated when the order is initialized within Bold Checkout. |
Request Body schema: application/jsonrequired
first_name | string or null First name. |
last_name | string or null Last name. |
address_line_1 | string or null Line 1 of the address. |
address_line_2 | string or null Line 2 of the address. |
city | string or null City name. |
province | string or null Province or state name. |
province_code | string or null Province or state code, using ISO-3166 standards. |
country required | string Country name. |
country_code required | string Country code, using ISO-3166 standards. |
postal_code | string or null Postal/zip code. |
business_name | string or null The name of the company associated with this address. |
phone_number | string or null Phone number. |
Responses
Request samples
- Payload
{- "first_name": "Carl",
- "last_name": "Smith",
- "address_line_1": "50 Fultz Boulevard",
- "address_line_2": "Unit 2",
- "city": "Winnipeg",
- "province": "Manitoba",
- "province_code": "MB",
- "country": "Canada",
- "country_code": "CA",
- "postal_code": "R3Y 0L6",
- "business_name": "Bold Commerce",
- "phone_number": "204-808-8095"
}
Response samples
- 200
- 400
{ }
Validate Email Address
Validates the customer email address. This will not add the email address to the customer, but can allow for validation before being applied.
Authorizations:
path Parameters
shop_identifier required | string Example: zp3oafdor9 The identifier of the shop, which can be retrieved by making a request to the Get Info endpoint. |
public_order_id required | string Example: SpMIhOL7Q36EDZUagB5GnnPh4TUb9zW9t0DGrWd8PvrwdV1S1PhGpf9wFIJRyZEi The public order identifier generated when the order is initialized within Bold Checkout. |
Request Body schema: application/jsonrequired
email_address required | string The email address of the customer. |
Responses
Request samples
- Payload
{- "email_address": "[email protected]"
}
Response samples
- 200
- 400
{ }
Validate Discount Code
Validates the given discount code. This will not apply the discount, but can allow for validation before being applied.
Authorizations:
path Parameters
shop_identifier required | string Example: zp3oafdor9 The identifier of the shop, which can be retrieved by making a request to the Get Info endpoint. |
public_order_id required | string Example: SpMIhOL7Q36EDZUagB5GnnPh4TUb9zW9t0DGrWd8PvrwdV1S1PhGpf9wFIJRyZEi The public order identifier generated when the order is initialized within Bold Checkout. |
Request Body schema: application/jsonrequired
discount_code required | string The discount code that may be applied to the order. |
cart_id required | string The platform-defined identifier of the cart associated with the order. |
Responses
Request samples
- Payload
{- "discount_code": "SPRINGSALE2022_Q8RT4"
}
Response samples
- 200
- 400
{ }
Validate Inventory
Validates that there is sufficient inventory to fulfill the order. Bold Checkout can request an inventory check during two different order stages:
initial
: A preliminary inventory check, typically at (but not restricted to) the beginning of the Checkout flow.final
: A final inventory check, which indicates that the order is being finalized and that the customer intends to complete the transaction.
Authorizations:
path Parameters
shop_identifier required | string Example: zp3oafdor9 The identifier of the shop, which can be retrieved by making a request to the Get Info endpoint. |
public_order_id required | string Example: SpMIhOL7Q36EDZUagB5GnnPh4TUb9zW9t0DGrWd8PvrwdV1S1PhGpf9wFIJRyZEi The public order identifier generated when the order is initialized within Bold Checkout. |
Request Body schema: application/jsonrequired
cart_id required | string The platform-defined identifier of the cart associated with the order. |
public_order_id required | string The public order identifier generated when the order is initialized within Bold Checkout. |
type required | string Enum: "initial" "final" The type of inventory check being performed.
|
required | Array of objects >= 0 items |
required | object or null (Address) |
tags | Array of strings[ items >= 0 items ] Arbitrary labels to help sort and identify particular orders. |
notes | Array of strings[ items >= 0 items ] Free text fields attached to the order. |
cart_params | object or null Variable data to apply to the cart. |
Responses
Request samples
- Payload
{- "cart_id": "R1F6BiWNxI0Gg9WMfSZtMkTiUoFSlBD6",
- "public_order_id": "SpMIhOL7Q36EDZUagB5GnnPh4TUb9zW9t0DGrWd8PvrwdV1S1PhGpf9wFIJRyZEi",
- "type": "final",
- "items": [
- {
- "line_item_key": "ERQ-GND-16_1",
- "platform_variant_id": "e7ba4c75-b1bb-483d-94d8-2c4a10f78472",
- "quantity": 2,
- "sku": "ERQGND16",
- "properties": {
- "grind": "extra-fine",
- "roast": "dark"
}
}
], - "shipping_address": {
- "first_name": "Carl",
- "last_name": "Smith",
- "address_line_1": "50 Fultz Boulevard",
- "address_line_2": "Unit 2",
- "city": "Winnipeg",
- "province": "Manitoba",
- "province_code": "MB",
- "country": "Canada",
- "country_code": "CA",
- "postal_code": "R3Y 0L6",
- "business_name": "Bold Commerce",
- "phone_number": "204-808-8095"
}, - "tags": [
- "Wholesale"
], - "notes": [
- "Customer called to clarify delivery date on October 12th"
], - "cart_params": {
- "customer_first_name": "Carl",
- "customer_last_name": "Smith",
- "shirt_size": "XL"
}
}
Response samples
- 200
- 400
{ }