JWT
Authenticates the API request. The expected token is a JSON Web Token (JWT) generated during the initialization of the the order via the Initialize Order endpoint.
Once the JWT expires (after 60 minutes), you must generate a new JWT using the Refresh JWT for Order endpoint.
Security Scheme Type | API Key |
---|---|
Header parameter name: | JWT |
A child of the Order resource. Contains information about shipping and billing addresses. Use these endpoints to add shipping and billing addresses to an order.
Set Shipping Address
Sets the shipping address on the order.
Each order can have only one shipping address. If you call this endpoint and a shipping address already exists, the existing address will be overwritten.
Authorizations:
path Parameters
shop_identifier required | string The identifier of the shop. Can be retrieved by making a request to the Get Info endpoint. |
public_order_id required | string The public order id generated when the order is initialized by making a request to the Initialize Order endpoint. |
header Parameters
Authorization required | string <Bearer JWT> Example: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdXRoX3R5cGUiOiJWMl9BUEkiLCJwYXlsb2FkIjp7InB1YmxpY19vcmRlcl9pZCI6Inlyb0Y2NDNNeUpTZVZRUUpES2R2c2QxYXdXY3BpRVFJbkhOaTJkWlhmWW9PdVI0dmFGVUhpNHBPRG9pRWFpOVQifSwiZXhwIjoxNjMyMzQxMjg3LCJuYmYiOm51bGwsImlhdCI6bnVsbH0.swmYcVBHyK2i86jN-bIOL3WOCzP5VQVLq9Ev-TfIC_c Authenticates the API request. The expected token is a JWT generated during the initialization of the the order via the Initialize Order endpoint. Once the JWT has expired (after 60 minutes), a new JWT can be regenerated using the Refresh JWT endpoint. |
Request Body schema: application/json
first_name | string First Name. |
last_name | string Last Name. |
address_line_1 | string Street Address. |
address_line_2 | string Additional Street address details(apt #, suite #, etc). |
country required | string Country Name. |
city | string City Name. |
province | string Province name if exists. |
country_code required | string ISO 3166 country code. |
province_code | string ISO 3166 Province code if exists. |
postal_code | string Postal/Zip code. |
business_name | string Business Name. |
phone_number | string Phone Number. |
Responses
Request samples
- Payload
{- "id": "12",
- "first_name": "Dorris",
- "last_name": "Parker",
- "address_line_1": "331 2nd Street",
- "address_line_2": "Apt 2",
- "country": "Canada",
- "city": "Winnipeg",
- "province": "Manitoba",
- "country_code": "CA",
- "province_code": "MB",
- "postal_code": "R0A 0Y0",
- "business_name": "Bold",
- "phone_number": "800-555-102"
}
Response samples
- 200
- 401
- 422
{- "data": {
- "address": {
- "id": "12",
- "first_name": "Dorris",
- "last_name": "Parker",
- "address_line_1": "331 2nd Street",
- "address_line_2": "Apt 2",
- "country": "Canada",
- "city": "Winnipeg",
- "province": "Manitoba",
- "country_code": "CA",
- "province_code": "MB",
- "postal_code": "R0A 0Y0",
- "business_name": "Bold",
- "phone_number": "800-555-0102"
}, - "application_state": {
- "customer": {
- "platform_id": "50942578465125",
- "public_id": "pjpTyGh8KzNQ225wPqxgy7LwNuC887h6ecGyp3omwT4XW8SszjVSdHzWHN4NBwqhA",
- "first_name": "John",
- "last_name": "Doe",
- "email_address": "john.doe@mydomain.com",
- "saved_addresses": [
- {
- "id": "123",
- "first_name": "John",
- "last_name": "Doe",
- "address_line_1": "50 Fultz Blvd",
- "address_line_2": "",
- "country": "Canada",
- "city": "Winnipeg",
- "province": "Manitoba",
- "country_code": "CA",
- "province_code": "MB",
- "postal_code": "R3Y0L6",
- "business_name": "Acme Inc.",
- "phone_number": "8005550101"
}
]
}, - "addresses": {
- "billing": {
- "id": "987654321",
- "first_name": "John",
- "last_name": "Doe",
- "address_line_1": "50 Fultz Blvd",
- "address_line_2": "",
- "country": "Canada",
- "city": "Winnipeg",
- "province": "Manitoba",
- "country_code": "CA",
- "province_code": "MB",
- "postal_code": "R3Y0L6",
- "business_name": "Acme Inc.",
- "phone_number": "8005550101"
}, - "shipping": {
- "id": "12",
- "first_name": "Dorris",
- "last_name": "Parker",
- "address_line_1": "331 2nd Street",
- "address_line_2": "Apt 2",
- "country": "Canada",
- "city": "Winnipeg",
- "province": "Manitoba",
- "country_code": "CA",
- "province_code": "MB",
- "postal_code": "R0A 0Y0",
- "business_name": "Bold",
- "phone_number": "800-555-102"
}
}, - "line_items": [
- {
- "product_data": {
- "id": "999",
- "product_title": "Oak Cheese Grater",
- "title": "Variant Title",
- "properties": { },
- "description": "",
- "quantity": 2,
- "price": 2350,
- "total_price": 4700,
- "visible": 1,
- "line_item_key": "oak_cheese_grater_0",
- "barcode": "",
- "compare_at_price": 4700,
- "weight": 1000,
- "weight_unit": "g",
- "product_id": "121",
- "variant_id": "80",
- "requires_shipping": true,
- "sku": "OCG",
- "taxable": true,
- "tags": "",
- "vendor": "",
- "total_weight": 2000
}, - "taxes": [
- {
- "value": 750,
- "name": "GST",
- "is_included": true
}
], - "fees": [
- {
- "value": 500,
- "name": "Miscellaneous Fee"
}
], - "discounts": [
- {
- "code": "DC43KJ81",
- "text": "Miscellaneous Discount",
- "value": "500",
- "valid": true
}
]
}
], - "shipping": {
- "select _shipping_line": {
- "id": "0",
- "desciption": "Custom Weight based rate - tier 2",
- "amount": 450
}, - "available_shipping_lines": [
- {
- "id": "0",
- "desciption": "Custom Weight based rate - tier 2",
- "amount": 450
}, - {
- "id": "1",
- "desciption": "Custom Price based rate - tier 1",
- "amount": 600
}
], - "taxes": [
- {
- "value": 250,
- "name": "GST",
- "is_included": true
}
], - "discounts": [
- {
- "code": "SH12345",
- "text": "Tax Free Shipping Discount",
- "value": "250",
- "valid": true
}
]
}, - "taxes": [
- {
- "value": 1000,
- "name": "GST",
- "is_included": true
}
], - "discounts": [
- {
- "code": "DC43KJ81",
- "text": "Miscellaneous Discount",
- "value": "500",
- "valid": true
}, - {
- "code": "SH12345",
- "text": "Tax Free Shipping Discount",
- "value": "250",
- "valid": true
}
], - "payments": [
- {
- "gateway_public_id": "i7z2xT0sKrDvhGWzex5SLjf5e6ndlQfrRL4AROkfhf3vNBkVT38JKBy5PSjB63qW",
- "amount": 4700,
- "currency": "CAD",
- "type": "spreedly",
- "display_string": "Credit Card Payment",
- "id": "",
- "token": "7uZAMRAf80KiEwibsrrM5IB41yU",
- "retain": false
}
], - "order_meta_data": {
- "cart_parameters": {
- "cp-key1": "A cart param"
}, - "note_attributes": {
- "na-key1": "A note attribute"
}, - "notes": "A special delivery note.",
- "tags": [
- "order-1"
]
}
}
}
}
Update Shipping Address
Updates the shipping address on the order.
This endpoint updates all fields of the shipping address associated with the order, and any value left blank in this request body will be made blank in the updated address. The fields country
, country_code
, province
, and province_code
cannot be left blank.
Note: If taxes have already been calculated, changes to the shipping address may affect those calculations. Taxes are not recalculated automatically, so you must call the Generate Taxes endpoint to recalculate taxes for the order.
Authorizations:
path Parameters
shop_identifier required | string The identifier of the shop. Can be retrieved by making a request to the Get Info endpoint. |
public_order_id required | string The public order id generated when the order is initialized by making a request to the Initialize Order endpoint. |
header Parameters
Authorization required | string <Bearer JWT> Example: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdXRoX3R5cGUiOiJWMl9BUEkiLCJwYXlsb2FkIjp7InB1YmxpY19vcmRlcl9pZCI6Inlyb0Y2NDNNeUpTZVZRUUpES2R2c2QxYXdXY3BpRVFJbkhOaTJkWlhmWW9PdVI0dmFGVUhpNHBPRG9pRWFpOVQifSwiZXhwIjoxNjMyMzQxMjg3LCJuYmYiOm51bGwsImlhdCI6bnVsbH0.swmYcVBHyK2i86jN-bIOL3WOCzP5VQVLq9Ev-TfIC_c Authenticates the API request. The expected token is a JWT generated during the initialization of the the order via the Initialize Order endpoint. Once the JWT has expired (after 60 minutes), a new JWT can be regenerated using the Refresh JWT endpoint. |
Request Body schema: application/json
first_name | string First Name. |
last_name | string Last Name. |
address_line_1 | string Street Address. |
address_line_2 | string Additional Street address details(apt #, suite #, etc). |
country required | string Country Name. |
city | string City Name. |
province | string Province name if exists. |
country_code required | string ISO 3166 country code. |
province_code | string ISO 3166 Province code if exists. |
postal_code | string Postal/Zip code. |
business_name | string Business Name. |
phone_number | string Phone Number. |
Responses
Request samples
- Payload
{- "id": "12",
- "first_name": "John",
- "last_name": "Doe",
- "address_line_1": "50 Fultz Blvd",
- "address_line_2": "This place",
- "country": "Canada",
- "city": "Winnipeg",
- "province": "Manitoba",
- "country_code": "CA",
- "province_code": "MB",
- "postal_code": "R3L0L6",
- "business_name": "Bold",
- "phone_number": "8005550101"
}
Response samples
- 200
- 401
- 422
{- "data": {
- "address": {
- "id": "12",
- "first_name": "John",
- "last_name": "Doe",
- "address_line_1": "50 Fultz Blvd",
- "address_line_2": "This place",
- "country": "Canada",
- "city": "Winnipeg",
- "province": "Manitoba",
- "country_code": "CA",
- "province_code": "MB",
- "postal_code": "R3L0L6",
- "business_name": "Bold",
- "phone_number": "8005550101"
}, - "application_state": {
- "customer": {
- "platform_id": "50942578465125",
- "public_id": "pjpTyGh8KzNQ225wPqxgy7LwNuC887h6ecGyp3omwT4XW8SszjVSdHzWHN4NBwqhA",
- "first_name": "John",
- "last_name": "Doe",
- "email_address": "john.doe@mydomain.com",
- "saved_addresses": [
- {
- "id": "123",
- "first_name": "John",
- "last_name": "Doe",
- "address_line_1": "50 Fultz Blvd",
- "address_line_2": "",
- "country": "Canada",
- "city": "Winnipeg",
- "province": "Manitoba",
- "country_code": "CA",
- "province_code": "MB",
- "postal_code": "R3Y0L6",
- "business_name": "Acme Inc.",
- "phone_number": "8005550101"
}
]
}, - "addresses": {
- "billing": {
- "id": "987654321",
- "first_name": "John",
- "last_name": "Doe",
- "address_line_1": "50 Fultz Blvd",
- "address_line_2": "",
- "country": "Canada",
- "city": "Winnipeg",
- "province": "Manitoba",
- "country_code": "CA",
- "province_code": "MB",
- "postal_code": "R3Y0L6",
- "business_name": "Acme Inc.",
- "phone_number": "8005550101"
}, - "shipping": {
- "id": "12",
- "first_name": "John",
- "last_name": "Doe",
- "address_line_1": "50 Fultz Blvd",
- "address_line_2": "This place",
- "country": "Canada",
- "city": "Winnipeg",
- "province": "Manitoba",
- "country_code": "CA",
- "province_code": "MB",
- "postal_code": "R3L0L6",
- "business_name": "Bold",
- "phone_number": "8005550101"
}
}, - "line_items": [
- {
- "product_data": {
- "id": "999",
- "product_title": "Oak Cheese Grater",
- "title": "Variant Title",
- "properties": { },
- "description": "",
- "quantity": 2,
- "price": 2350,
- "total_price": 4700,
- "visible": 1,
- "line_item_key": "oak_cheese_grater_0",
- "barcode": "",
- "compare_at_price": 4700,
- "weight": 1000,
- "weight_unit": "g",
- "product_id": "121",
- "variant_id": "80",
- "requires_shipping": true,
- "sku": "OCG",
- "taxable": true,
- "tags": "",
- "vendor": "",
- "total_weight": 2000
}, - "taxes": [
- {
- "value": 750,
- "name": "GST",
- "is_included": true
}
], - "fees": [
- {
- "value": 500,
- "name": "Miscellaneous Fee"
}
], - "discounts": [
- {
- "code": "DC43KJ81",
- "text": "Miscellaneous Discount",
- "value": "500",
- "valid": true
}
]
}
], - "shipping": {
- "select _shipping_line": {
- "id": "0",
- "desciption": "Custom Weight based rate - tier 2",
- "amount": 450
}, - "available_shipping_lines": [
- {
- "id": "0",
- "desciption": "Custom Weight based rate - tier 2",
- "amount": 450
}, - {
- "id": "1",
- "desciption": "Custom Price based rate - tier 1",
- "amount": 600
}
], - "taxes": [
- {
- "value": 250,
- "name": "GST",
- "is_included": true
}
], - "discounts": [
- {
- "code": "SH12345",
- "text": "Tax Free Shipping Discount",
- "value": "250",
- "valid": true
}
]
}, - "taxes": [
- {
- "value": 1000,
- "name": "GST",
- "is_included": true
}
], - "discounts": [
- {
- "code": "DC43KJ81",
- "text": "Miscellaneous Discount",
- "value": "500",
- "valid": true
}, - {
- "code": "SH12345",
- "text": "Tax Free Shipping Discount",
- "value": "250",
- "valid": true
}
], - "payments": [
- {
- "gateway_public_id": "i7z2xT0sKrDvhGWzex5SLjf5e6ndlQfrRL4AROkfhf3vNBkVT38JKBy5PSjB63qW",
- "amount": 4700,
- "currency": "CAD",
- "type": "spreedly",
- "display_string": "Credit Card Payment",
- "id": "",
- "token": "7uZAMRAf80KiEwibsrrM5IB41yU",
- "retain": false
}
], - "order_meta_data": {
- "cart_parameters": {
- "cp-key1": "A cart param"
}, - "note_attributes": {
- "na-key1": "A note attribute"
}, - "notes": "A special delivery note.",
- "tags": [
- "order-1"
]
}
}
}
}
Delete Shipping Address
Clears the shipping address from the order.
Note: If taxes have already been calculated, changes to the shipping address may affect those calculations. Taxes are not recalculated automatically, so you must call the Generate Taxes endpoint to recalculate taxes for the order.
Authorizations:
path Parameters
shop_identifier required | string The identifier of the shop. Can be retrieved by making a request to the Get Info endpoint. |
public_order_id required | string The public order id generated when the order is initialized by making a request to the Initialize Order endpoint. |
header Parameters
Authorization required | string <Bearer JWT> Example: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdXRoX3R5cGUiOiJWMl9BUEkiLCJwYXlsb2FkIjp7InB1YmxpY19vcmRlcl9pZCI6Inlyb0Y2NDNNeUpTZVZRUUpES2R2c2QxYXdXY3BpRVFJbkhOaTJkWlhmWW9PdVI0dmFGVUhpNHBPRG9pRWFpOVQifSwiZXhwIjoxNjMyMzQxMjg3LCJuYmYiOm51bGwsImlhdCI6bnVsbH0.swmYcVBHyK2i86jN-bIOL3WOCzP5VQVLq9Ev-TfIC_c Authenticates the API request. The expected token is a JWT generated during the initialization of the the order via the Initialize Order endpoint. Once the JWT has expired (after 60 minutes), a new JWT can be regenerated using the Refresh JWT endpoint. |
Responses
Response samples
- 200
- 401
{- "data": {
- "application_state": {
- "customer": {
- "platform_id": "50942578465125",
- "public_id": "pjpTyGh8KzNQ225wPqxgy7LwNuC887h6ecGyp3omwT4XW8SszjVSdHzWHN4NBwqhA",
- "first_name": "John",
- "last_name": "Doe",
- "email_address": "john.doe@mydomain.com",
- "saved_addresses": [
- {
- "id": "123",
- "first_name": "John",
- "last_name": "Doe",
- "address_line_1": "50 Fultz Blvd",
- "address_line_2": "",
- "country": "Canada",
- "city": "Winnipeg",
- "province": "Manitoba",
- "country_code": "CA",
- "province_code": "MB",
- "postal_code": "R3Y0L6",
- "business_name": "Acme Inc.",
- "phone_number": "8005550101"
}
]
}, - "addresses": {
- "billing": {
- "id": "987654321",
- "first_name": "John",
- "last_name": "Doe",
- "address_line_1": "50 Fultz Blvd",
- "address_line_2": "",
- "country": "Canada",
- "city": "Winnipeg",
- "province": "Manitoba",
- "country_code": "CA",
- "province_code": "MB",
- "postal_code": "R3Y0L6",
- "business_name": "Acme Inc.",
- "phone_number": "8005550101"
}, - "shipping": null
}, - "line_items": [
- {
- "product_data": {
- "id": "999",
- "product_title": "Oak Cheese Grater",
- "title": "Variant Title",
- "properties": { },
- "description": "",
- "quantity": 2,
- "price": 2350,
- "total_price": 4700,
- "visible": 1,
- "line_item_key": "oak_cheese_grater_0",
- "barcode": "",
- "compare_at_price": 4700,
- "weight": 1000,
- "weight_unit": "g",
- "product_id": "121",
- "variant_id": "80",
- "requires_shipping": true,
- "sku": "OCG",
- "taxable": true,
- "tags": "",
- "vendor": "",
- "total_weight": 2000
}, - "taxes": [
- {
- "value": 750,
- "name": "GST",
- "is_included": true
}
], - "fees": [
- {
- "value": 500,
- "name": "Miscellaneous Fee"
}
], - "discounts": [
- {
- "code": "DC43KJ81",
- "text": "Miscellaneous Discount",
- "value": "500",
- "valid": true
}
]
}
], - "fees": [
- {
- "id": "123456789",
- "line_text": "Custom Fee - Added by Plugin",
- "fee_type": "fixed",
- "value": 10,
- "source": "PLUGIN",
- "plugin_uuid": "a52589f8-09df-11ed-b30e-f67072e164ee",
- "taxable": true,
- "show_description": true
}
], - "shipping": {
- "select _shipping_line": {
- "id": "0",
- "desciption": "Custom Weight based rate - tier 2",
- "amount": 450
}, - "available_shipping_lines": [
- {
- "id": "0",
- "desciption": "Custom Weight based rate - tier 2",
- "amount": 450
}, - {
- "id": "1",
- "desciption": "Custom Price based rate - tier 1",
- "amount": 600
}
], - "taxes": [
- {
- "value": 250,
- "name": "GST",
- "is_included": true
}
], - "discounts": [
- {
- "code": "SH12345",
- "text": "Tax Free Shipping Discount",
- "value": "250",
- "valid": true
}
]
}, - "taxes": [
- {
- "value": 1000,
- "name": "GST",
- "is_included": true
}
], - "discounts": [
- {
- "code": "DC43KJ81",
- "text": "Miscellaneous Discount",
- "value": "500",
- "valid": true
}, - {
- "code": "SH12345",
- "text": "Tax Free Shipping Discount",
- "value": "250",
- "valid": true
}
], - "payments": [
- {
- "gateway_public_id": "i7z2xT0sKrDvhGWzex5SLjf5e6ndlQfrRL4AROkfhf3vNBkVT38JKBy5PSjB63qW",
- "amount": 4700,
- "currency": "CAD",
- "type": "spreedly",
- "display_string": "Credit Card Payment",
- "id": "",
- "token": "7uZAMRAf80KiEwibsrrM5IB41yU",
- "retain": false
}
], - "order_meta_data": {
- "cart_parameters": {
- "cp-key1": "A cart param"
}, - "note_attributes": {
- "na-key1": "A note attribute"
}, - "notes": "A special delivery note.",
- "tags": [
- "order-1"
]
}
}
}
}
Get Shipping Address
Gets the shipping address on the order.
Authorizations:
path Parameters
shop_identifier required | string The identifier of the shop. Can be retrieved by making a request to the Get Info endpoint. |
public_order_id required | string The public order id generated when the order is initialized by making a request to the Initialize Order endpoint. |
header Parameters
Authorization required | string <Bearer JWT> Example: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdXRoX3R5cGUiOiJWMl9BUEkiLCJwYXlsb2FkIjp7InB1YmxpY19vcmRlcl9pZCI6Inlyb0Y2NDNNeUpTZVZRUUpES2R2c2QxYXdXY3BpRVFJbkhOaTJkWlhmWW9PdVI0dmFGVUhpNHBPRG9pRWFpOVQifSwiZXhwIjoxNjMyMzQxMjg3LCJuYmYiOm51bGwsImlhdCI6bnVsbH0.swmYcVBHyK2i86jN-bIOL3WOCzP5VQVLq9Ev-TfIC_c Authenticates the API request. The expected token is a JWT generated during the initialization of the the order via the Initialize Order endpoint. Once the JWT has expired (after 60 minutes), a new JWT can be regenerated using the Refresh JWT endpoint. |
Responses
Response samples
- 200
- 401
{- "data": {
- "address": {
- "id": "12",
- "first_name": "Peter",
- "last_name": "Parker",
- "address_line_1": "331 2nd Street",
- "address_line_2": "Apt 2",
- "country": "Canada",
- "city": "Winnipeg",
- "province": "Manitoba",
- "country_code": "CA",
- "province_code": "MB",
- "postal_code": "R0A 0Y0",
- "business_name": "Bold",
- "phone_number": "800-555-0103"
}, - "application_state": {
- "customer": {
- "platform_id": "50942578465125",
- "public_id": "pjpTyGh8KzNQ225wPqxgy7LwNuC887h6ecGyp3omwT4XW8SszjVSdHzWHN4NBwqhA",
- "first_name": "John",
- "last_name": "Doe",
- "email_address": "john.doe@mydomain.com",
- "saved_addresses": [
- {
- "id": "123",
- "first_name": "John",
- "last_name": "Doe",
- "address_line_1": "50 Fultz Blvd",
- "address_line_2": "",
- "country": "Canada",
- "city": "Winnipeg",
- "province": "Manitoba",
- "country_code": "CA",
- "province_code": "MB",
- "postal_code": "R3Y0L6",
- "business_name": "Acme Inc.",
- "phone_number": "8005550101"
}
]
}, - "addresses": {
- "billing": {
- "id": "987654321",
- "first_name": "John",
- "last_name": "Doe",
- "address_line_1": "50 Fultz Blvd",
- "address_line_2": "",
- "country": "Canada",
- "city": "Winnipeg",
- "province": "Manitoba",
- "country_code": "CA",
- "province_code": "MB",
- "postal_code": "R3Y0L6",
- "business_name": "Acme Inc.",
- "phone_number": "8005550101"
}, - "shipping": {
- "id": "12",
- "first_name": "Peter",
- "last_name": "Parker",
- "address_line_1": "331 2nd Street",
- "address_line_2": "Apt 2",
- "country": "Canada",
- "city": "Winnipeg",
- "province": "Manitoba",
- "country_code": "CA",
- "province_code": "MB",
- "postal_code": "R0A 0Y0",
- "business_name": "Bold",
- "phone_number": "800-555-0102"
}
}, - "line_items": [
- {
- "product_data": {
- "id": "999",
- "product_title": "Oak Cheese Grater",
- "title": "Variant Title",
- "properties": { },
- "description": "",
- "quantity": 2,
- "price": 2350,
- "total_price": 4700,
- "visible": 1,
- "line_item_key": "oak_cheese_grater_0",
- "barcode": "",
- "compare_at_price": 4700,
- "weight": 1000,
- "weight_unit": "g",
- "product_id": "121",
- "variant_id": "80",
- "requires_shipping": true,
- "sku": "OCG",
- "taxable": true,
- "tags": "",
- "vendor": "",
- "total_weight": 2000
}, - "taxes": [
- {
- "value": 750,
- "name": "GST",
- "is_included": true
}
], - "fees": [
- {
- "value": 500,
- "name": "Miscellaneous Fee"
}
], - "discounts": [
- {
- "code": "DC43KJ81",
- "text": "Miscellaneous Discount",
- "value": "500",
- "valid": true
}
]
}
], - "fees": [
- {
- "id": "123456789",
- "line_text": "Custom Fee - Added by Plugin",
- "fee_type": "fixed",
- "value": 10,
- "source": "PLUGIN",
- "plugin_uuid": "a52589f8-09df-11ed-b30e-f67072e164ee",
- "taxable": true,
- "show_description": true
}
], - "shipping": {
- "select _shipping_line": {
- "id": "0",
- "desciption": "Custom Weight based rate - tier 2",
- "amount": 450
}, - "available_shipping_lines": [
- {
- "id": "0",
- "desciption": "Custom Weight based rate - tier 2",
- "amount": 450
}, - {
- "id": "1",
- "desciption": "Custom Price based rate - tier 1",
- "amount": 600
}
], - "taxes": [
- {
- "value": 250,
- "name": "GST",
- "is_included": true
}
], - "discounts": [
- {
- "code": "SH12345",
- "text": "Tax Free Shipping Discount",
- "value": "250",
- "valid": true
}
]
}, - "taxes": [
- {
- "value": 1000,
- "name": "GST",
- "is_included": true
}
], - "discounts": [
- {
- "code": "DC43KJ81",
- "text": "Miscellaneous Discount",
- "value": "500",
- "valid": true
}, - {
- "code": "SH12345",
- "text": "Tax Free Shipping Discount",
- "value": "250",
- "valid": true
}
], - "payments": [
- {
- "gateway_public_id": "i7z2xT0sKrDvhGWzex5SLjf5e6ndlQfrRL4AROkfhf3vNBkVT38JKBy5PSjB63qW",
- "amount": 4700,
- "currency": "CAD",
- "type": "spreedly",
- "display_string": "Credit Card Payment",
- "id": "",
- "token": "7uZAMRAf80KiEwibsrrM5IB41yU",
- "retain": false
}
], - "order_meta_data": {
- "cart_parameters": {
- "cp-key1": "A cart param"
}, - "note_attributes": {
- "na-key1": "A note attribute"
}, - "notes": "A special delivery note.",
- "tags": [
- "order-1"
]
}
}
}
}
Set Billing Address
Sets the billing address on the order.
Each order can have only one billing address. If you call this endpoint and a billing address already exists, the existing address will be overwritten.
Authorizations:
path Parameters
shop_identifier required | string The identifier of the shop. Can be retrieved by making a request to the Get Info endpoint. |
public_order_id required | string The public order id generated when the order is initialized by making a request to the Initialize Order endpoint. |
header Parameters
Authorization required | string <Bearer JWT> Example: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdXRoX3R5cGUiOiJWMl9BUEkiLCJwYXlsb2FkIjp7InB1YmxpY19vcmRlcl9pZCI6Inlyb0Y2NDNNeUpTZVZRUUpES2R2c2QxYXdXY3BpRVFJbkhOaTJkWlhmWW9PdVI0dmFGVUhpNHBPRG9pRWFpOVQifSwiZXhwIjoxNjMyMzQxMjg3LCJuYmYiOm51bGwsImlhdCI6bnVsbH0.swmYcVBHyK2i86jN-bIOL3WOCzP5VQVLq9Ev-TfIC_c Authenticates the API request. The expected token is a JWT generated during the initialization of the the order via the Initialize Order endpoint. Once the JWT has expired (after 60 minutes), a new JWT can be regenerated using the Refresh JWT endpoint. |
Request Body schema: application/json
first_name | string First Name. |
last_name | string Last Name. |
address_line_1 | string Street Address. |
address_line_2 | string Additional Street address details(apt #, suite #, etc). |
country required | string Country Name. |
city | string City Name. |
province | string Province name if exists. |
country_code required | string ISO 3166 country code. |
province_code | string ISO 3166 Province code if exists. |
postal_code | string Postal/Zip code. |
business_name | string Business Name. |
phone_number | string Phone Number. |
Responses
Request samples
- Payload
{- "first_name": "Dorris",
- "last_name": "Smith",
- "address_line_1": "1000 S 42nd St",
- "address_line_2": "",
- "country": "United States",
- "city": "Grand Forks",
- "province": "North Dakota",
- "country_code": "US",
- "province_code": "ND",
- "postal_code": "58201",
- "business_name": "Blue Company",
- "phone_number": "800-555-0107"
}
Response samples
- 200
- 401
- 422
{- "data": {
- "address": {
- "id": null,
- "first_name": "Dorris",
- "last_name": "Smith",
- "address_line_1": "1000 S 42nd St",
- "address_line_2": "",
- "country": "United States",
- "city": "Grand Forks",
- "province": "North Dakota",
- "country_code": "US",
- "province_code": "ND",
- "postal_code": "58201",
- "business_name": "Blue Company",
- "phone_number": "800-555-0107"
}, - "application_state": {
- "customer": {
- "platform_id": "50942578465125",
- "public_id": "pjpTyGh8KzNQ225wPqxgy7LwNuC887h6ecGyp3omwT4XW8SszjVSdHzWHN4NBwqhA",
- "first_name": "John",
- "last_name": "Doe",
- "email_address": "john.doe@mydomain.com",
- "saved_addresses": [
- {
- "id": "123",
- "first_name": "John",
- "last_name": "Doe",
- "address_line_1": "50 Fultz Blvd",
- "address_line_2": "",
- "country": "Canada",
- "city": "Winnipeg",
- "province": "Manitoba",
- "country_code": "CA",
- "province_code": "MB",
- "postal_code": "R3Y0L6",
- "business_name": "Acme Inc.",
- "phone_number": "8005550101"
}
]
}, - "addresses": {
- "billing": {
- "id": null,
- "first_name": "Dorris",
- "last_name": "Smith",
- "address_line_1": "1000 S 42nd St",
- "address_line_2": "",
- "country": "United States",
- "city": "Grand Forks",
- "province": "North Dakota",
- "country_code": "US",
- "province_code": "ND",
- "postal_code": "58201",
- "business_name": "Blue Company",
- "phone_number": "800-555-0107"
}, - "shipping": {
- "id": "987654321",
- "first_name": "John",
- "last_name": "Doe",
- "address_line_1": "50 Fultz Blvd",
- "address_line_2": "",
- "country": "Canada",
- "city": "Winnipeg",
- "province": "Manitoba",
- "country_code": "CA",
- "province_code": "MB",
- "postal_code": "R3Y0L6",
- "business_name": "Acme Inc.",
- "phone_number": "8005550101"
}
}, - "line_items": [
- {
- "product_data": {
- "id": "999",
- "product_title": "Oak Cheese Grater",
- "title": "Variant Title",
- "properties": { },
- "description": "",
- "quantity": 2,
- "price": 2350,
- "total_price": 4700,
- "visible": 1,
- "line_item_key": "oak_cheese_grater_0",
- "barcode": "",
- "compare_at_price": 4700,
- "weight": 1000,
- "weight_unit": "g",
- "product_id": "121",
- "variant_id": "80",
- "requires_shipping": true,
- "sku": "OCG",
- "taxable": true,
- "tags": "",
- "vendor": "",
- "total_weight": 2000
}, - "taxes": [
- {
- "value": 750,
- "name": "GST",
- "is_included": true
}
], - "fees": [
- {
- "value": 500,
- "name": "Miscellaneous Fee"
}
], - "discounts": [
- {
- "code": "DC43KJ81",
- "text": "Miscellaneous Discount",
- "value": "500",
- "valid": true
}
]
}
], - "fees": [
- {
- "id": "123456789",
- "line_text": "Custom Fee - Added by Plugin",
- "fee_type": "fixed",
- "value": 10,
- "source": "PLUGIN",
- "plugin_uuid": "a52589f8-09df-11ed-b30e-f67072e164ee",
- "taxable": true,
- "show_description": true
}
], - "shipping": {
- "select _shipping_line": {
- "id": "0",
- "desciption": "Custom Weight based rate - tier 2",
- "amount": 450
}, - "available_shipping_lines": [
- {
- "id": "0",
- "desciption": "Custom Weight based rate - tier 2",
- "amount": 450
}, - {
- "id": "1",
- "desciption": "Custom Price based rate - tier 1",
- "amount": 600
}
], - "taxes": [
- {
- "value": 250,
- "name": "GST",
- "is_included": true
}
], - "discounts": [
- {
- "code": "SH12345",
- "text": "Tax Free Shipping Discount",
- "value": "250",
- "valid": true
}
]
}, - "taxes": [
- {
- "value": 1000,
- "name": "GST",
- "is_included": true
}
], - "discounts": [
- {
- "code": "DC43KJ81",
- "text": "Miscellaneous Discount",
- "value": "500",
- "valid": true
}, - {
- "code": "SH12345",
- "text": "Tax Free Shipping Discount",
- "value": "250",
- "valid": true
}
], - "payments": [
- {
- "gateway_public_id": "i7z2xT0sKrDvhGWzex5SLjf5e6ndlQfrRL4AROkfhf3vNBkVT38JKBy5PSjB63qW",
- "amount": 4700,
- "currency": "CAD",
- "type": "spreedly",
- "display_string": "Credit Card Payment",
- "id": "",
- "token": "7uZAMRAf80KiEwibsrrM5IB41yU",
- "retain": false
}
], - "order_meta_data": {
- "cart_parameters": {
- "cp-key1": "A cart param"
}, - "note_attributes": {
- "na-key1": "A note attribute"
}, - "notes": "A special delivery note.",
- "tags": [
- "order-1"
]
}
}
}
}
Update Billing Address
Updates the billing address on the order.
This endpoint updates all fields of the billing address associated with the order, and any value left blank in this request body will be made blank in the updated address. The fields country
, country_code
, province
, and province_code
cannot be left blank.
Authorizations:
path Parameters
shop_identifier required | string The identifier of the shop. Can be retrieved by making a request to the Get Info endpoint. |
public_order_id required | string The public order id generated when the order is initialized by making a request to the Initialize Order endpoint. |
header Parameters
Authorization required | string <Bearer JWT> Example: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdXRoX3R5cGUiOiJWMl9BUEkiLCJwYXlsb2FkIjp7InB1YmxpY19vcmRlcl9pZCI6Inlyb0Y2NDNNeUpTZVZRUUpES2R2c2QxYXdXY3BpRVFJbkhOaTJkWlhmWW9PdVI0dmFGVUhpNHBPRG9pRWFpOVQifSwiZXhwIjoxNjMyMzQxMjg3LCJuYmYiOm51bGwsImlhdCI6bnVsbH0.swmYcVBHyK2i86jN-bIOL3WOCzP5VQVLq9Ev-TfIC_c Authenticates the API request. The expected token is a JWT generated during the initialization of the the order via the Initialize Order endpoint. Once the JWT has expired (after 60 minutes), a new JWT can be regenerated using the Refresh JWT endpoint. |
Request Body schema: application/json
first_name | string First Name. |
last_name | string Last Name. |
address_line_1 | string Street Address. |
address_line_2 | string Additional Street address details(apt #, suite #, etc). |
country required | string Country Name. |
city | string City Name. |
province | string Province name if exists. |
country_code required | string ISO 3166 country code. |
province_code | string ISO 3166 Province code if exists. |
postal_code | string Postal/Zip code. |
business_name | string Business Name. |
phone_number | string Phone Number. |
Responses
Request samples
- Payload
{- "first_name": "Joe",
- "last_name": "Bold",
- "address_line_1": "123 Street",
- "address_line_2": "Apt",
- "country": "Canada",
- "city": "Winnipeg",
- "province": "Manitoba",
- "country_code": "CA",
- "province_code": "MB",
- "postal_code": "R3T 6B1",
- "business_name": "Bold",
- "phone_number": "800-555-0102"
}
Response samples
- 200
- 401
- 422
{- "data": {
- "address": {
- "first_name": "Joe",
- "last_name": "Bold",
- "address_line_1": "123 Street",
- "address_line_2": "Apt",
- "country": "Canada",
- "city": "Winnipeg",
- "province": "Manitoba",
- "country_code": "CA",
- "province_code": "MB",
- "postal_code": "R3T 6B1",
- "business_name": "Bold",
- "phone_number": "800-555-0107"
}, - "application_state": {
- "customer": {
- "platform_id": "50942578465125",
- "public_id": "pjpTyGh8KzNQ225wPqxgy7LwNuC887h6ecGyp3omwT4XW8SszjVSdHzWHN4NBwqhA",
- "first_name": "John",
- "last_name": "Doe",
- "email_address": "john.doe@mydomain.com",
- "saved_addresses": [
- {
- "id": "123",
- "first_name": "John",
- "last_name": "Doe",
- "address_line_1": "50 Fultz Blvd",
- "address_line_2": "",
- "country": "Canada",
- "city": "Winnipeg",
- "province": "Manitoba",
- "country_code": "CA",
- "province_code": "MB",
- "postal_code": "R3Y0L6",
- "business_name": "Acme Inc.",
- "phone_number": "8005550101"
}
]
}, - "addresses": {
- "billing": {
- "first_name": "Joe",
- "last_name": "Bold",
- "address_line_1": "123 Street",
- "address_line_2": "Apt",
- "country": "Canada",
- "city": "Winnipeg",
- "province": "Manitoba",
- "country_code": "CA",
- "province_code": "MB",
- "postal_code": "R3T 6B1",
- "business_name": "Bold",
- "phone_number": "800-555-0105"
}, - "shipping": {
- "id": "987654321",
- "first_name": "John",
- "last_name": "Doe",
- "address_line_1": "50 Fultz Blvd",
- "address_line_2": "",
- "country": "Canada",
- "city": "Winnipeg",
- "province": "Manitoba",
- "country_code": "CA",
- "province_code": "MB",
- "postal_code": "R3Y0L6",
- "business_name": "Acme Inc.",
- "phone_number": "8005550101"
}
}, - "line_items": [
- {
- "product_data": {
- "id": "999",
- "product_title": "Oak Cheese Grater",
- "title": "Variant Title",
- "properties": { },
- "description": "",
- "quantity": 2,
- "price": 2350,
- "total_price": 4700,
- "visible": 1,
- "line_item_key": "oak_cheese_grater_0",
- "barcode": "",
- "compare_at_price": 4700,
- "weight": 1000,
- "weight_unit": "g",
- "product_id": "121",
- "variant_id": "80",
- "requires_shipping": true,
- "sku": "OCG",
- "taxable": true,
- "tags": "",
- "vendor": "",
- "total_weight": 2000
}, - "taxes": [
- {
- "value": 750,
- "name": "GST",
- "is_included": true
}
], - "fees": [
- {
- "value": 500,
- "name": "Miscellaneous Fee"
}
], - "discounts": [
- {
- "code": "DC43KJ81",
- "text": "Miscellaneous Discount",
- "value": "500",
- "valid": true
}
]
}
], - "fees": [
- {
- "id": "123456789",
- "line_text": "Custom Fee - Added by Plugin",
- "fee_type": "fixed",
- "value": 10,
- "source": "PLUGIN",
- "plugin_uuid": "a52589f8-09df-11ed-b30e-f67072e164ee",
- "taxable": true,
- "show_description": true
}
], - "shipping": {
- "select _shipping_line": {
- "id": "0",
- "desciption": "Custom Weight based rate - tier 2",
- "amount": 450
}, - "available_shipping_lines": [
- {
- "id": "0",
- "desciption": "Custom Weight based rate - tier 2",
- "amount": 450
}, - {
- "id": "1",
- "desciption": "Custom Price based rate - tier 1",
- "amount": 600
}
], - "taxes": [
- {
- "value": 250,
- "name": "GST",
- "is_included": true
}
], - "discounts": [
- {
- "code": "SH12345",
- "text": "Tax Free Shipping Discount",
- "value": "250",
- "valid": true
}
]
}, - "taxes": [
- {
- "value": 1000,
- "name": "GST",
- "is_included": true
}
], - "discounts": [
- {
- "code": "DC43KJ81",
- "text": "Miscellaneous Discount",
- "value": "500",
- "valid": true
}, - {
- "code": "SH12345",
- "text": "Tax Free Shipping Discount",
- "value": "250",
- "valid": true
}
], - "payments": [
- {
- "gateway_public_id": "i7z2xT0sKrDvhGWzex5SLjf5e6ndlQfrRL4AROkfhf3vNBkVT38JKBy5PSjB63qW",
- "amount": 4700,
- "currency": "CAD",
- "type": "spreedly",
- "display_string": "Credit Card Payment",
- "id": "",
- "token": "7uZAMRAf80KiEwibsrrM5IB41yU",
- "retain": false
}
], - "order_meta_data": {
- "cart_parameters": {
- "cp-key1": "A cart param"
}, - "note_attributes": {
- "na-key1": "A note attribute"
}, - "notes": "A special delivery note.",
- "tags": [
- "order-1"
]
}
}
}
}
Delete Billing Address
Clears the billing address from the order.
Authorizations:
path Parameters
shop_identifier required | string The identifier of the shop. Can be retrieved by making a request to the Get Info endpoint. |
public_order_id required | string The public order id generated when the order is initialized by making a request to the Initialize Order endpoint. |
header Parameters
Authorization required | string <Bearer JWT> Example: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdXRoX3R5cGUiOiJWMl9BUEkiLCJwYXlsb2FkIjp7InB1YmxpY19vcmRlcl9pZCI6Inlyb0Y2NDNNeUpTZVZRUUpES2R2c2QxYXdXY3BpRVFJbkhOaTJkWlhmWW9PdVI0dmFGVUhpNHBPRG9pRWFpOVQifSwiZXhwIjoxNjMyMzQxMjg3LCJuYmYiOm51bGwsImlhdCI6bnVsbH0.swmYcVBHyK2i86jN-bIOL3WOCzP5VQVLq9Ev-TfIC_c Authenticates the API request. The expected token is a JWT generated during the initialization of the the order via the Initialize Order endpoint. Once the JWT has expired (after 60 minutes), a new JWT can be regenerated using the Refresh JWT endpoint. |
Responses
Response samples
- 200
- 401
{- "data": {
- "application_state": {
- "customer": {
- "platform_id": "50942578465125",
- "public_id": "pjpTyGh8KzNQ225wPqxgy7LwNuC887h6ecGyp3omwT4XW8SszjVSdHzWHN4NBwqhA",
- "first_name": "John",
- "last_name": "Doe",
- "email_address": "john.doe@mydomain.com",
- "saved_addresses": [
- {
- "id": "123",
- "first_name": "John",
- "last_name": "Doe",
- "address_line_1": "50 Fultz Blvd",
- "address_line_2": "",
- "country": "Canada",
- "city": "Winnipeg",
- "province": "Manitoba",
- "country_code": "CA",
- "province_code": "MB",
- "postal_code": "R3Y0L6",
- "business_name": "Acme Inc.",
- "phone_number": "8005550101"
}
]
}, - "addresses": {
- "billing": null,
- "shipping": {
- "id": "987654321",
- "first_name": "John",
- "last_name": "Doe",
- "address_line_1": "50 Fultz Blvd",
- "address_line_2": "",
- "country": "Canada",
- "city": "Winnipeg",
- "province": "Manitoba",
- "country_code": "CA",
- "province_code": "MB",
- "postal_code": "R3Y0L6",
- "business_name": "Acme Inc.",
- "phone_number": "8005550101"
}
}, - "line_items": [
- {
- "product_data": {
- "id": "999",
- "product_title": "Oak Cheese Grater",
- "title": "Variant Title",
- "properties": { },
- "description": "",
- "quantity": 2,
- "price": 2350,
- "total_price": 4700,
- "visible": 1,
- "line_item_key": "oak_cheese_grater_0",
- "barcode": "",
- "compare_at_price": 4700,
- "weight": 1000,
- "weight_unit": "g",
- "product_id": "121",
- "variant_id": "80",
- "requires_shipping": true,
- "sku": "OCG",
- "taxable": true,
- "tags": "",
- "vendor": "",
- "total_weight": 2000
}, - "taxes": [
- {
- "value": 750,
- "name": "GST",
- "is_included": true
}
], - "fees": [
- {
- "value": 500,
- "name": "Miscellaneous Fee"
}
], - "discounts": [
- {
- "code": "DC43KJ81",
- "text": "Miscellaneous Discount",
- "value": "500",
- "valid": true
}
]
}
], - "fees": [
- {
- "id": "123456789",
- "line_text": "Custom Fee - Added by Plugin",
- "fee_type": "fixed",
- "value": 10,
- "source": "PLUGIN",
- "plugin_uuid": "a52589f8-09df-11ed-b30e-f67072e164ee",
- "taxable": true,
- "show_description": true
}
], - "shipping": {
- "select _shipping_line": {
- "id": "0",
- "desciption": "Custom Weight based rate - tier 2",
- "amount": 450
}, - "available_shipping_lines": [
- {
- "id": "0",
- "desciption": "Custom Weight based rate - tier 2",
- "amount": 450
}, - {
- "id": "1",
- "desciption": "Custom Price based rate - tier 1",
- "amount": 600
}
], - "taxes": [
- {
- "value": 250,
- "name": "GST",
- "is_included": true
}
], - "discounts": [
- {
- "code": "SH12345",
- "text": "Tax Free Shipping Discount",
- "value": "250",
- "valid": true
}
]
}, - "taxes": [
- {
- "value": 1000,
- "name": "GST",
- "is_included": true
}
], - "discounts": [
- {
- "code": "DC43KJ81",
- "text": "Miscellaneous Discount",
- "value": "500",
- "valid": true
}, - {
- "code": "SH12345",
- "text": "Tax Free Shipping Discount",
- "value": "250",
- "valid": true
}
], - "payments": [
- {
- "gateway_public_id": "i7z2xT0sKrDvhGWzex5SLjf5e6ndlQfrRL4AROkfhf3vNBkVT38JKBy5PSjB63qW",
- "amount": 4700,
- "currency": "CAD",
- "type": "spreedly",
- "display_string": "Credit Card Payment",
- "id": "",
- "token": "7uZAMRAf80KiEwibsrrM5IB41yU",
- "retain": false
}
], - "order_meta_data": {
- "cart_parameters": {
- "cp-key1": "A cart param"
}, - "note_attributes": {
- "na-key1": "A note attribute"
}, - "notes": "A special delivery note.",
- "tags": [
- "order-1"
]
}
}
}
}
Get Billing Address
Get the billing address that is set on the Order.
Authorizations:
path Parameters
shop_identifier required | string The identifier of the shop. Can be retrieved by making a request to the Get Info endpoint. |
public_order_id required | string The public order id generated when the order is initialized by making a request to the Initialize Order endpoint. |
header Parameters
Authorization required | string <Bearer JWT> Example: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdXRoX3R5cGUiOiJWMl9BUEkiLCJwYXlsb2FkIjp7InB1YmxpY19vcmRlcl9pZCI6Inlyb0Y2NDNNeUpTZVZRUUpES2R2c2QxYXdXY3BpRVFJbkhOaTJkWlhmWW9PdVI0dmFGVUhpNHBPRG9pRWFpOVQifSwiZXhwIjoxNjMyMzQxMjg3LCJuYmYiOm51bGwsImlhdCI6bnVsbH0.swmYcVBHyK2i86jN-bIOL3WOCzP5VQVLq9Ev-TfIC_c Authenticates the API request. The expected token is a JWT generated during the initialization of the the order via the Initialize Order endpoint. Once the JWT has expired (after 60 minutes), a new JWT can be regenerated using the Refresh JWT endpoint. |
Responses
Response samples
- 200
- 401
Validate Address
Validates if the given postal code matches up with postal codes from Canada, US, Ireland, Great Britain, France or Singapore. If the address is in Canada or the US, this endpoint also validates the state/province provided.
Calling this endpoint does not change the application state or apply the address. While not required, it can be helpful to call this endpoint before calling the Set Shipping Address or the Set Billing Address endpoints if you want to implement custom error handling in more complicated address scenarios. Calling the Set Shipping Address and the Set Billing Address endpoints applies the same validations applied by this endpoint.
Authorizations:
path Parameters
shop_identifier required | string The identifier of the shop. Can be retrieved by making a request to the Get Info endpoint. |
public_order_id required | string The public order id generated when the order is initialized by making a request to the Initialize Order endpoint. |
query Parameters
firstName | string Example: firstName=John First name. |
lastName | string Example: lastName=Doe Last name. |
address_line_1 | string Example: address_line_1=50 Fultz Blvd Street address. |
address_line_2 | string Example: address_line_2=Apt 21 Additional street address details (apt #, suite #, etc). |
city | string Example: city=Winnipeg City name. |
province | string Example: province=Manitoba Province/state name, if applicable. Required for certain countries, including the United States and Canada. |
province_code | string Example: province_code=MB Province/state code in ISO 3166 format, if applicable. Required for certain countries, including the United States and Canada. |
postal_code | string >= 2 characters Example: postal_code=R3Y 0L6 Postal/zip code. Required for most countries, including the United States, Canada, and Mexico. Validated on format only when provided. |
country required | string Example: country=Canada Country name. |
country_code required | |
business_name | string Example: business_name=ACME Inc. Business name. Required when marked as such in the shop's general settings. |
phone_number | string Example: phone_number=2041234569 Phone number. Required when marked as such in the shop's general settings. |
header Parameters
Authorization required | string <Bearer JWT> Example: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdXRoX3R5cGUiOiJWMl9BUEkiLCJwYXlsb2FkIjp7InB1YmxpY19vcmRlcl9pZCI6Inlyb0Y2NDNNeUpTZVZRUUpES2R2c2QxYXdXY3BpRVFJbkhOaTJkWlhmWW9PdVI0dmFGVUhpNHBPRG9pRWFpOVQifSwiZXhwIjoxNjMyMzQxMjg3LCJuYmYiOm51bGwsImlhdCI6bnVsbH0.swmYcVBHyK2i86jN-bIOL3WOCzP5VQVLq9Ev-TfIC_c Authenticates the API request. The expected token is a JWT generated during the initialization of the the order via the Initialize Order endpoint. Once the JWT has expired (after 60 minutes), a new JWT can be regenerated using the Refresh JWT endpoint. |
Responses
Response samples
- 200
- 401
- 422
{- "data": [ ]
}
A child of the Order resource. Contains information about guest customers on your store, including name and email. Use these endpoints to add or remove a guest customer to an order.
Delete Customer
Delete the customer from the order.
Authorizations:
path Parameters
shop_identifier required | string The identifier of the shop. Can be retrieved by making a request to the Get Info endpoint. |
public_order_id required | string The public order id generated when the order is initialized by making a request to the Initialize Order endpoint. |
header Parameters
Authorization required | string <Bearer JWT> Example: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdXRoX3R5cGUiOiJWMl9BUEkiLCJwYXlsb2FkIjp7InB1YmxpY19vcmRlcl9pZCI6Inlyb0Y2NDNNeUpTZVZRUUpES2R2c2QxYXdXY3BpRVFJbkhOaTJkWlhmWW9PdVI0dmFGVUhpNHBPRG9pRWFpOVQifSwiZXhwIjoxNjMyMzQxMjg3LCJuYmYiOm51bGwsImlhdCI6bnVsbH0.swmYcVBHyK2i86jN-bIOL3WOCzP5VQVLq9Ev-TfIC_c Authenticates the API request. The expected token is a JWT generated during the initialization of the the order via the Initialize Order endpoint. Once the JWT has expired (after 60 minutes), a new JWT can be regenerated using the Refresh JWT endpoint. |
Responses
Response samples
- 200
- 401
{- "data": {
- "application_state": {
- "customer": {
- "platform_id": "string",
- "public_id": "string",
- "first_name": "string",
- "last_name": "string",
- "email_address": "string",
- "accepts_marketing": true,
- "saved_addresses": [
- {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}
]
}, - "addresses": {
- "billing": {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}, - "shipping": {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}
}, - "line_items": [
- {
- "product_data": {
- "id": "string",
- "product_title": "string",
- "title": "string",
- "image_url": "string",
- "properties": {
- "property1": "string",
- "property2": "string"
}, - "description": "string",
- "quantity": 0,
- "price": 0,
- "total_price": 0,
- "visible": 0,
- "line_item_key": "string",
- "barcode": "string",
- "compare_at_price": 0,
- "weight": 0,
- "weight_unit": "string",
- "product_id": "string",
- "variant_id": "string",
- "requires_shipping": true,
- "sku": "string",
- "taxable": true,
- "tags": "string",
- "vendor": "string"
}, - "taxes": [
- {
- "value": 0,
- "name": "string",
- "is_included": true
}
], - "fees": [
- {
- "amount": 0,
- "name": "string"
}
], - "discounts": [
- {
- "code": "string",
- "text": "string",
- "value": "string"
}
]
}
], - "shipping": {
- "select _shipping_line": {
- "id": "string",
- "description": "string",
- "amount": 0
}, - "available_shipping_lines": [
- {
- "id": "string",
- "line": {
- "id": "string",
- "description": "string",
- "amount": 0
}
}
], - "taxes": [
- {
- "value": 0,
- "name": "string",
- "is_included": true
}
], - "discounts": [
- {
- "code": "string",
- "text": "string",
- "value": "string"
}
]
}, - "taxes": [
- {
- "value": 0,
- "name": "string",
- "is_included": true
}
], - "discounts": [
- {
- "code": "string",
- "text": "string",
- "value": "string"
}
], - "payments": [
- {
- "gateway_public_id": "string",
- "amount": 0,
- "currency": "string",
- "type": "string",
- "display_string": "string",
- "id": "string",
- "token": "string",
- "retain": false
}
], - "order_total": 0,
- "order_id": 0,
- "order_meta_data": {
- "cart_parameters": {
- "key": "string"
}, - "note_attributes": {
- "key": "string"
}, - "notes": "string",
- "tags": [
- "string"
]
}, - "flow_id": "string"
}
}
}
Get Customer
Gets the customer data set on the order.
Authorizations:
path Parameters
shop_identifier required | string The identifier of the shop. Can be retrieved by making a request to the Get Info endpoint. |
public_order_id required | string The public order id generated when the order is initialized by making a request to the Initialize Order endpoint. |
header Parameters
Authorization required | string <Bearer JWT> Example: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdXRoX3R5cGUiOiJWMl9BUEkiLCJwYXlsb2FkIjp7InB1YmxpY19vcmRlcl9pZCI6Inlyb0Y2NDNNeUpTZVZRUUpES2R2c2QxYXdXY3BpRVFJbkhOaTJkWlhmWW9PdVI0dmFGVUhpNHBPRG9pRWFpOVQifSwiZXhwIjoxNjMyMzQxMjg3LCJuYmYiOm51bGwsImlhdCI6bnVsbH0.swmYcVBHyK2i86jN-bIOL3WOCzP5VQVLq9Ev-TfIC_c Authenticates the API request. The expected token is a JWT generated during the initialization of the the order via the Initialize Order endpoint. Once the JWT has expired (after 60 minutes), a new JWT can be regenerated using the Refresh JWT endpoint. |
Responses
Response samples
- 200
- 401
{- "data": {
- "customer": {
- "platform_id": "string",
- "public_id": "string",
- "first_name": "string",
- "last_name": "string",
- "email_address": "string",
- "accepts_marketing": true,
- "saved_addresses": [
- {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}
]
}, - "application_state": {
- "customer": {
- "platform_id": "string",
- "public_id": "string",
- "first_name": "string",
- "last_name": "string",
- "email_address": "string",
- "accepts_marketing": true,
- "saved_addresses": [
- {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}
]
}, - "addresses": {
- "billing": {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}, - "shipping": {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}
}, - "line_items": [
- {
- "product_data": {
- "id": "string",
- "product_title": "string",
- "title": "string",
- "image_url": "string",
- "properties": {
- "property1": "string",
- "property2": "string"
}, - "description": "string",
- "quantity": 0,
- "price": 0,
- "total_price": 0,
- "visible": 0,
- "line_item_key": "string",
- "barcode": "string",
- "compare_at_price": 0,
- "weight": 0,
- "weight_unit": "string",
- "product_id": "string",
- "variant_id": "string",
- "requires_shipping": true,
- "sku": "string",
- "taxable": true,
- "tags": "string",
- "vendor": "string"
}, - "taxes": [
- {
- "value": 0,
- "name": "string",
- "is_included": true
}
], - "fees": [
- {
- "amount": 0,
- "name": "string"
}
], - "discounts": [
- {
- "code": "string",
- "text": "string",
- "value": "string"
}
]
}
], - "shipping": {
- "select _shipping_line": {
- "id": "string",
- "description": "string",
- "amount": 0
}, - "available_shipping_lines": [
- {
- "id": "string",
- "line": {
- "id": "string",
- "description": "string",
- "amount": 0
}
}
], - "taxes": [
- {
- "value": 0,
- "name": "string",
- "is_included": true
}
], - "discounts": [
- {
- "code": "string",
- "text": "string",
- "value": "string"
}
]
}, - "taxes": [
- {
- "value": 0,
- "name": "string",
- "is_included": true
}
], - "discounts": [
- {
- "code": "string",
- "text": "string",
- "value": "string"
}
], - "payments": [
- {
- "gateway_public_id": "string",
- "amount": 0,
- "currency": "string",
- "type": "string",
- "display_string": "string",
- "id": "string",
- "token": "string",
- "retain": false
}
], - "order_total": 0,
- "order_id": 0,
- "order_meta_data": {
- "cart_parameters": {
- "key": "string"
}, - "note_attributes": {
- "key": "string"
}, - "notes": "string",
- "tags": [
- "string"
]
}, - "flow_id": "string"
}
}
}
Update Customer
Updates the customer on the order provided from the Initialize Order, the Create Authenticated Customer and the Create Guest Customer endpoints.
Authorizations:
path Parameters
shop_identifier required | string The identifier of the shop. Can be retrieved by making a request to the Get Info endpoint. |
public_order_id required | string The public order id generated when the order is initialized by making a request to the Initialize Order endpoint. |
header Parameters
Authorization required | string <Bearer JWT> Example: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdXRoX3R5cGUiOiJWMl9BUEkiLCJwYXlsb2FkIjp7InB1YmxpY19vcmRlcl9pZCI6Inlyb0Y2NDNNeUpTZVZRUUpES2R2c2QxYXdXY3BpRVFJbkhOaTJkWlhmWW9PdVI0dmFGVUhpNHBPRG9pRWFpOVQifSwiZXhwIjoxNjMyMzQxMjg3LCJuYmYiOm51bGwsImlhdCI6bnVsbH0.swmYcVBHyK2i86jN-bIOL3WOCzP5VQVLq9Ev-TfIC_c Authenticates the API request. The expected token is a JWT generated during the initialization of the the order via the Initialize Order endpoint. Once the JWT has expired (after 60 minutes), a new JWT can be regenerated using the Refresh JWT endpoint. |
Request Body schema: application/json
first_name required | string The customer's first name. |
last_name required | string The customer's last name. |
email_address required | string The customer's email address. |
accepts_marketing | boolean Default: false If the customer would like to receive any sort of marketing emails. |
Responses
Request samples
- Payload
{- "first_name": "string",
- "last_name": "string",
- "email_address": "string",
- "accepts_marketing": false
}
Response samples
- 200
- 401
- 422
{- "data": {
- "customer": {
- "platform_id": "string",
- "public_id": "string",
- "first_name": "string",
- "last_name": "string",
- "email_address": "string",
- "accepts_marketing": true,
- "saved_addresses": [
- {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}
]
}, - "application_state": {
- "customer": {
- "platform_id": "string",
- "public_id": "string",
- "first_name": "string",
- "last_name": "string",
- "email_address": "string",
- "accepts_marketing": true,
- "saved_addresses": [
- {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}
]
}, - "addresses": {
- "billing": {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}, - "shipping": {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}
}, - "line_items": [
- {
- "product_data": {
- "id": "string",
- "product_title": "string",
- "title": "string",
- "image_url": "string",
- "properties": {
- "property1": "string",
- "property2": "string"
}, - "description": "string",
- "quantity": 0,
- "price": 0,
- "total_price": 0,
- "visible": 0,
- "line_item_key": "string",
- "barcode": "string",
- "compare_at_price": 0,
- "weight": 0,
- "weight_unit": "string",
- "product_id": "string",
- "variant_id": "string",
- "requires_shipping": true,
- "sku": "string",
- "taxable": true,
- "tags": "string",
- "vendor": "string"
}, - "taxes": [
- {
- "value": 0,
- "name": "string",
- "is_included": true
}
], - "fees": [
- {
- "amount": 0,
- "name": "string"
}
], - "discounts": [
- {
- "code": "string",
- "text": "string",
- "value": "string"
}
]
}
], - "shipping": {
- "select _shipping_line": {
- "id": "string",
- "description": "string",
- "amount": 0
}, - "available_shipping_lines": [
- {
- "id": "string",
- "line": {
- "id": "string",
- "description": "string",
- "amount": 0
}
}
], - "taxes": [
- {
- "value": 0,
- "name": "string",
- "is_included": true
}
], - "discounts": [
- {
- "code": "string",
- "text": "string",
- "value": "string"
}
]
}, - "taxes": [
- {
- "value": 0,
- "name": "string",
- "is_included": true
}
], - "discounts": [
- {
- "code": "string",
- "text": "string",
- "value": "string"
}
], - "payments": [
- {
- "gateway_public_id": "string",
- "amount": 0,
- "currency": "string",
- "type": "string",
- "display_string": "string",
- "id": "string",
- "token": "string",
- "retain": false
}
], - "order_total": 0,
- "order_id": 0,
- "order_meta_data": {
- "cart_parameters": {
- "key": "string"
}, - "note_attributes": {
- "key": "string"
}, - "notes": "string",
- "tags": [
- "string"
]
}, - "flow_id": "string"
}
}
}
Create Guest Customer
Creates a new guest customer.
Cannot create a customer when a customer was already provided by the Initialize Order endpoint or the Create Authenticated Customer endpoint.
If you wish to add a new guest customer to an order or add an authenticated customer you must first delete the existing customer using the Delete Customer endpoint.
Authorizations:
path Parameters
shop_identifier required | string The identifier of the shop. Can be retrieved by making a request to the Get Info endpoint. |
public_order_id required | string The public order id generated when the order is initialized by making a request to the Initialize Order endpoint. |
header Parameters
Authorization required | string <Bearer JWT> Example: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdXRoX3R5cGUiOiJWMl9BUEkiLCJwYXlsb2FkIjp7InB1YmxpY19vcmRlcl9pZCI6Inlyb0Y2NDNNeUpTZVZRUUpES2R2c2QxYXdXY3BpRVFJbkhOaTJkWlhmWW9PdVI0dmFGVUhpNHBPRG9pRWFpOVQifSwiZXhwIjoxNjMyMzQxMjg3LCJuYmYiOm51bGwsImlhdCI6bnVsbH0.swmYcVBHyK2i86jN-bIOL3WOCzP5VQVLq9Ev-TfIC_c Authenticates the API request. The expected token is a JWT generated during the initialization of the the order via the Initialize Order endpoint. Once the JWT has expired (after 60 minutes), a new JWT can be regenerated using the Refresh JWT endpoint. |
Request Body schema: application/json
first_name required | string The customer's first name. |
last_name required | string The customer's last name. |
email_address required | string The customer's email address. |
accepts_marketing | boolean Default: false If the customer would like to receive any sort of marketing emails. |
Responses
Request samples
- Payload
{- "first_name": "string",
- "last_name": "string",
- "email_address": "string",
- "accepts_marketing": false
}
Response samples
- 200
- 401
- 422
{- "data": {
- "customer": {
- "platform_id": "string",
- "public_id": "string",
- "first_name": "string",
- "last_name": "string",
- "email_address": "string",
- "accepts_marketing": true,
- "saved_addresses": [
- {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}
]
}, - "application_state": {
- "customer": {
- "platform_id": "string",
- "public_id": "string",
- "first_name": "string",
- "last_name": "string",
- "email_address": "string",
- "accepts_marketing": true,
- "saved_addresses": [
- {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}
]
}, - "addresses": {
- "billing": {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}, - "shipping": {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}
}, - "line_items": [
- {
- "product_data": {
- "id": "string",
- "product_title": "string",
- "title": "string",
- "image_url": "string",
- "properties": {
- "property1": "string",
- "property2": "string"
}, - "description": "string",
- "quantity": 0,
- "price": 0,
- "total_price": 0,
- "visible": 0,
- "line_item_key": "string",
- "barcode": "string",
- "compare_at_price": 0,
- "weight": 0,
- "weight_unit": "string",
- "product_id": "string",
- "variant_id": "string",
- "requires_shipping": true,
- "sku": "string",
- "taxable": true,
- "tags": "string",
- "vendor": "string"
}, - "taxes": [
- {
- "value": 0,
- "name": "string",
- "is_included": true
}
], - "fees": [
- {
- "amount": 0,
- "name": "string"
}
], - "discounts": [
- {
- "code": "string",
- "text": "string",
- "value": "string"
}
]
}
], - "shipping": {
- "select _shipping_line": {
- "id": "string",
- "description": "string",
- "amount": 0
}, - "available_shipping_lines": [
- {
- "id": "string",
- "line": {
- "id": "string",
- "description": "string",
- "amount": 0
}
}
], - "taxes": [
- {
- "value": 0,
- "name": "string",
- "is_included": true
}
], - "discounts": [
- {
- "code": "string",
- "text": "string",
- "value": "string"
}
]
}, - "taxes": [
- {
- "value": 0,
- "name": "string",
- "is_included": true
}
], - "discounts": [
- {
- "code": "string",
- "text": "string",
- "value": "string"
}
], - "payments": [
- {
- "gateway_public_id": "string",
- "amount": 0,
- "currency": "string",
- "type": "string",
- "display_string": "string",
- "id": "string",
- "token": "string",
- "retain": false
}
], - "order_total": 0,
- "order_id": 0,
- "order_meta_data": {
- "cart_parameters": {
- "key": "string"
}, - "note_attributes": {
- "key": "string"
}, - "notes": "string",
- "tags": [
- "string"
]
}, - "flow_id": "string"
}
}
}
Update Guest Customer Deprecated
Updates the guest customer on the order.
Cannot update customer data that was provided from the Initialize Order endpoint.
Authorizations:
path Parameters
shop_identifier required | string The identifier of the shop. Can be retrieved by making a request to the Get Info endpoint. |
public_order_id required | string The public order id generated when the order is initialized by making a request to the Initialize Order endpoint. |
header Parameters
Authorization required | string <Bearer JWT> Example: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdXRoX3R5cGUiOiJWMl9BUEkiLCJwYXlsb2FkIjp7InB1YmxpY19vcmRlcl9pZCI6Inlyb0Y2NDNNeUpTZVZRUUpES2R2c2QxYXdXY3BpRVFJbkhOaTJkWlhmWW9PdVI0dmFGVUhpNHBPRG9pRWFpOVQifSwiZXhwIjoxNjMyMzQxMjg3LCJuYmYiOm51bGwsImlhdCI6bnVsbH0.swmYcVBHyK2i86jN-bIOL3WOCzP5VQVLq9Ev-TfIC_c Authenticates the API request. The expected token is a JWT generated during the initialization of the the order via the Initialize Order endpoint. Once the JWT has expired (after 60 minutes), a new JWT can be regenerated using the Refresh JWT endpoint. |
Request Body schema: application/json
first_name required | string The customer's first name. |
last_name required | string The customer's last name. |
email_address required | string The customer's email address. |
accepts_marketing | boolean Default: false If the customer would like to receive any sort of marketing emails. |
Responses
Request samples
- Payload
{- "first_name": "string",
- "last_name": "string",
- "email_address": "string",
- "accepts_marketing": false
}
Response samples
- 200
- 401
- 422
{- "data": {
- "customer": {
- "platform_id": "string",
- "public_id": "string",
- "first_name": "string",
- "last_name": "string",
- "email_address": "string",
- "accepts_marketing": true,
- "saved_addresses": [
- {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}
]
}, - "application_state": {
- "customer": {
- "platform_id": "string",
- "public_id": "string",
- "first_name": "string",
- "last_name": "string",
- "email_address": "string",
- "accepts_marketing": true,
- "saved_addresses": [
- {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}
]
}, - "addresses": {
- "billing": {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}, - "shipping": {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}
}, - "line_items": [
- {
- "product_data": {
- "id": "string",
- "product_title": "string",
- "title": "string",
- "image_url": "string",
- "properties": {
- "property1": "string",
- "property2": "string"
}, - "description": "string",
- "quantity": 0,
- "price": 0,
- "total_price": 0,
- "visible": 0,
- "line_item_key": "string",
- "barcode": "string",
- "compare_at_price": 0,
- "weight": 0,
- "weight_unit": "string",
- "product_id": "string",
- "variant_id": "string",
- "requires_shipping": true,
- "sku": "string",
- "taxable": true,
- "tags": "string",
- "vendor": "string"
}, - "taxes": [
- {
- "value": 0,
- "name": "string",
- "is_included": true
}
], - "fees": [
- {
- "amount": 0,
- "name": "string"
}
], - "discounts": [
- {
- "code": "string",
- "text": "string",
- "value": "string"
}
]
}
], - "shipping": {
- "select _shipping_line": {
- "id": "string",
- "description": "string",
- "amount": 0
}, - "available_shipping_lines": [
- {
- "id": "string",
- "line": {
- "id": "string",
- "description": "string",
- "amount": 0
}
}
], - "taxes": [
- {
- "value": 0,
- "name": "string",
- "is_included": true
}
], - "discounts": [
- {
- "code": "string",
- "text": "string",
- "value": "string"
}
]
}, - "taxes": [
- {
- "value": 0,
- "name": "string",
- "is_included": true
}
], - "discounts": [
- {
- "code": "string",
- "text": "string",
- "value": "string"
}
], - "payments": [
- {
- "gateway_public_id": "string",
- "amount": 0,
- "currency": "string",
- "type": "string",
- "display_string": "string",
- "id": "string",
- "token": "string",
- "retain": false
}
], - "order_total": 0,
- "order_id": 0,
- "order_meta_data": {
- "cart_parameters": {
- "key": "string"
}, - "note_attributes": {
- "key": "string"
}, - "notes": "string",
- "tags": [
- "string"
]
}, - "flow_id": "string"
}
}
}
Validate Email Address
Validates the email address and performs an MX check to make sure the domain can accept email. Does not validate the the email address exists on the domain.
Authorizations:
path Parameters
shop_identifier required | string The identifier of the shop. Can be retrieved by making a request to the Get Info endpoint. |
public_order_id required | string The public order id generated when the order is initialized by making a request to the Initialize Order endpoint. |
query Parameters
email_address required | string Example: email_address=john.smith@gmail.com The email address to be validated. |
header Parameters
Authorization required | string <Bearer JWT> Example: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdXRoX3R5cGUiOiJWMl9BUEkiLCJwYXlsb2FkIjp7InB1YmxpY19vcmRlcl9pZCI6Inlyb0Y2NDNNeUpTZVZRUUpES2R2c2QxYXdXY3BpRVFJbkhOaTJkWlhmWW9PdVI0dmFGVUhpNHBPRG9pRWFpOVQifSwiZXhwIjoxNjMyMzQxMjg3LCJuYmYiOm51bGwsImlhdCI6bnVsbH0.swmYcVBHyK2i86jN-bIOL3WOCzP5VQVLq9Ev-TfIC_c Authenticates the API request. The expected token is a JWT generated during the initialization of the the order via the Initialize Order endpoint. Once the JWT has expired (after 60 minutes), a new JWT can be regenerated using the Refresh JWT endpoint. |
Responses
Response samples
- 200
- 401
- 422
{- "data": [ ]
}
Contains information about discount codes that have been applied to an order. Use these endpoints to manipulate discount codes on an order.
Validate Discount Code
Validates the given discount code against the current order state and shop settings. This will not change the application state or apply the discount. It is not required to call this endpoint before calling the Add Discount Code endpoint, but it can be helpful if you want to implement custom error handling in more complicated discount code scenarios.
For more information about discount validation, refer to Validate Discount Codes.
Authorizations:
path Parameters
shop_identifier required | string The identifier of the shop. Can be retrieved by making a request to the Get Info endpoint. |
public_order_id required | string The public order id generated when the order is initialized by making a request to the Initialize Order endpoint. |
query Parameters
discount_code required | string Example: discount_code=TESTCODE The discount code to be validated. |
header Parameters
Authorization required | string <Bearer JWT> Example: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdXRoX3R5cGUiOiJWMl9BUEkiLCJwYXlsb2FkIjp7InB1YmxpY19vcmRlcl9pZCI6Inlyb0Y2NDNNeUpTZVZRUUpES2R2c2QxYXdXY3BpRVFJbkhOaTJkWlhmWW9PdVI0dmFGVUhpNHBPRG9pRWFpOVQifSwiZXhwIjoxNjMyMzQxMjg3LCJuYmYiOm51bGwsImlhdCI6bnVsbH0.swmYcVBHyK2i86jN-bIOL3WOCzP5VQVLq9Ev-TfIC_c Authenticates the API request. The expected token is a JWT generated during the initialization of the the order via the Initialize Order endpoint. Once the JWT has expired (after 60 minutes), a new JWT can be regenerated using the Refresh JWT endpoint. |
Responses
Response samples
- 200
- 401
- 422
{- "data": { }
}
List Discounts
Get all the discount codes applied to the order.
Authorizations:
path Parameters
shop_identifier required | string The identifier of the shop. Can be retrieved by making a request to the Get Info endpoint. |
public_order_id required | string The public order id generated when the order is initialized by making a request to the Initialize Order endpoint. |
header Parameters
Authorization required | string <Bearer JWT> Example: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdXRoX3R5cGUiOiJWMl9BUEkiLCJwYXlsb2FkIjp7InB1YmxpY19vcmRlcl9pZCI6Inlyb0Y2NDNNeUpTZVZRUUpES2R2c2QxYXdXY3BpRVFJbkhOaTJkWlhmWW9PdVI0dmFGVUhpNHBPRG9pRWFpOVQifSwiZXhwIjoxNjMyMzQxMjg3LCJuYmYiOm51bGwsImlhdCI6bnVsbH0.swmYcVBHyK2i86jN-bIOL3WOCzP5VQVLq9Ev-TfIC_c Authenticates the API request. The expected token is a JWT generated during the initialization of the the order via the Initialize Order endpoint. Once the JWT has expired (after 60 minutes), a new JWT can be regenerated using the Refresh JWT endpoint. |
Responses
Response samples
- 200
- 401
{- "data": {
- "discounts": [
- {
- "code": "string",
- "text": "string",
- "value": "string"
}
], - "application_state": {
- "customer": {
- "platform_id": "string",
- "public_id": "string",
- "first_name": "string",
- "last_name": "string",
- "email_address": "string",
- "accepts_marketing": true,
- "saved_addresses": [
- {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}
]
}, - "addresses": {
- "billing": {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}, - "shipping": {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}
}, - "line_items": [
- {
- "product_data": {
- "id": "string",
- "product_title": "string",
- "title": "string",
- "image_url": "string",
- "properties": {
- "property1": "string",
- "property2": "string"
}, - "description": "string",
- "quantity": 0,
- "price": 0,
- "total_price": 0,
- "visible": 0,
- "line_item_key": "string",
- "barcode": "string",
- "compare_at_price": 0,
- "weight": 0,
- "weight_unit": "string",
- "product_id": "string",
- "variant_id": "string",
- "requires_shipping": true,
- "sku": "string",
- "taxable": true,
- "tags": "string",
- "vendor": "string"
}, - "taxes": [
- {
- "value": 0,
- "name": "string",
- "is_included": true
}
], - "fees": [
- {
- "amount": 0,
- "name": "string"
}
], - "discounts": [
- {
- "code": "string",
- "text": "string",
- "value": "string"
}
]
}
], - "shipping": {
- "select _shipping_line": {
- "id": "string",
- "description": "string",
- "amount": 0
}, - "available_shipping_lines": [
- {
- "id": "string",
- "line": {
- "id": "string",
- "description": "string",
- "amount": 0
}
}
], - "taxes": [
- {
- "value": 0,
- "name": "string",
- "is_included": true
}
], - "discounts": [
- {
- "code": "string",
- "text": "string",
- "value": "string"
}
]
}, - "taxes": [
- {
- "value": 0,
- "name": "string",
- "is_included": true
}
], - "discounts": [
- {
- "code": "string",
- "text": "string",
- "value": "string"
}
], - "payments": [
- {
- "gateway_public_id": "string",
- "amount": 0,
- "currency": "string",
- "type": "string",
- "display_string": "string",
- "id": "string",
- "token": "string",
- "retain": false
}
], - "order_total": 0,
- "order_id": 0,
- "order_meta_data": {
- "cart_parameters": {
- "key": "string"
}, - "note_attributes": {
- "key": "string"
}, - "notes": "string",
- "tags": [
- "string"
]
}, - "flow_id": "string"
}
}
}
Add Discount Code
Applies a discount code to the current order. If the discount code is valid, the order and application state will be updated to reflect the applied discount. It is not required to call the Validate Discount Code endpoint before calling this endpoint.
For more information about discount validation, refer to Validate Discount Codes.
Authorizations:
path Parameters
shop_identifier required | string The identifier of the shop. Can be retrieved by making a request to the Get Info endpoint. |
public_order_id required | string The public order id generated when the order is initialized by making a request to the Initialize Order endpoint. |
header Parameters
Authorization required | string <Bearer JWT> Example: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdXRoX3R5cGUiOiJWMl9BUEkiLCJwYXlsb2FkIjp7InB1YmxpY19vcmRlcl9pZCI6Inlyb0Y2NDNNeUpTZVZRUUpES2R2c2QxYXdXY3BpRVFJbkhOaTJkWlhmWW9PdVI0dmFGVUhpNHBPRG9pRWFpOVQifSwiZXhwIjoxNjMyMzQxMjg3LCJuYmYiOm51bGwsImlhdCI6bnVsbH0.swmYcVBHyK2i86jN-bIOL3WOCzP5VQVLq9Ev-TfIC_c Authenticates the API request. The expected token is a JWT generated during the initialization of the the order via the Initialize Order endpoint. Once the JWT has expired (after 60 minutes), a new JWT can be regenerated using the Refresh JWT endpoint. |
Request Body schema: application/json
code required | string The discount code. |
Responses
Request samples
- Payload
{- "code": "string"
}
Response samples
- 200
- 401
- 422
{- "data": {
- "discount": {
- "code": "string",
- "text": "string",
- "value": "string"
}, - "application_state": {
- "customer": {
- "platform_id": "string",
- "public_id": "string",
- "first_name": "string",
- "last_name": "string",
- "email_address": "string",
- "accepts_marketing": true,
- "saved_addresses": [
- {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}
]
}, - "addresses": {
- "billing": {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}, - "shipping": {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}
}, - "line_items": [
- {
- "product_data": {
- "id": "string",
- "product_title": "string",
- "title": "string",
- "image_url": "string",
- "properties": {
- "property1": "string",
- "property2": "string"
}, - "description": "string",
- "quantity": 0,
- "price": 0,
- "total_price": 0,
- "visible": 0,
- "line_item_key": "string",
- "barcode": "string",
- "compare_at_price": 0,
- "weight": 0,
- "weight_unit": "string",
- "product_id": "string",
- "variant_id": "string",
- "requires_shipping": true,
- "sku": "string",
- "taxable": true,
- "tags": "string",
- "vendor": "string"
}, - "taxes": [
- {
- "value": 0,
- "name": "string",
- "is_included": true
}
], - "fees": [
- {
- "amount": 0,
- "name": "string"
}
], - "discounts": [
- {
- "code": "string",
- "text": "string",
- "value": "string"
}
]
}
], - "shipping": {
- "select _shipping_line": {
- "id": "string",
- "description": "string",
- "amount": 0
}, - "available_shipping_lines": [
- {
- "id": "string",
- "line": {
- "id": "string",
- "description": "string",
- "amount": 0
}
}
], - "taxes": [
- {
- "value": 0,
- "name": "string",
- "is_included": true
}
], - "discounts": [
- {
- "code": "string",
- "text": "string",
- "value": "string"
}
]
}, - "taxes": [
- {
- "value": 0,
- "name": "string",
- "is_included": true
}
], - "discounts": [
- {
- "code": "string",
- "text": "string",
- "value": "string"
}
], - "payments": [
- {
- "gateway_public_id": "string",
- "amount": 0,
- "currency": "string",
- "type": "string",
- "display_string": "string",
- "id": "string",
- "token": "string",
- "retain": false
}
], - "order_total": 0,
- "order_id": 0,
- "order_meta_data": {
- "cart_parameters": {
- "key": "string"
}, - "note_attributes": {
- "key": "string"
}, - "notes": "string",
- "tags": [
- "string"
]
}, - "flow_id": "string"
}
}
}
Delete Discount Code
Removes the discount code and its discounts from the order.
Authorizations:
path Parameters
shop_identifier required | string The identifier of the shop. Can be retrieved by making a request to the Get Info endpoint. |
public_order_id required | string The public order id generated when the order is initialized by making a request to the Initialize Order endpoint. |
header Parameters
Authorization required | string <Bearer JWT> Example: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdXRoX3R5cGUiOiJWMl9BUEkiLCJwYXlsb2FkIjp7InB1YmxpY19vcmRlcl9pZCI6Inlyb0Y2NDNNeUpTZVZRUUpES2R2c2QxYXdXY3BpRVFJbkhOaTJkWlhmWW9PdVI0dmFGVUhpNHBPRG9pRWFpOVQifSwiZXhwIjoxNjMyMzQxMjg3LCJuYmYiOm51bGwsImlhdCI6bnVsbH0.swmYcVBHyK2i86jN-bIOL3WOCzP5VQVLq9Ev-TfIC_c Authenticates the API request. The expected token is a JWT generated during the initialization of the the order via the Initialize Order endpoint. Once the JWT has expired (after 60 minutes), a new JWT can be regenerated using the Refresh JWT endpoint. |
Request Body schema: application/json
code required | string The discount code. |
Responses
Request samples
- Payload
{- "code": "string"
}
Response samples
- 200
- 401
- 422
{- "data": {
- "application_state": {
- "customer": {
- "platform_id": "string",
- "public_id": "string",
- "first_name": "string",
- "last_name": "string",
- "email_address": "string",
- "accepts_marketing": true,
- "saved_addresses": [
- {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}
]
}, - "addresses": {
- "billing": {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}, - "shipping": {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}
}, - "line_items": [
- {
- "product_data": {
- "id": "string",
- "product_title": "string",
- "title": "string",
- "image_url": "string",
- "properties": {
- "property1": "string",
- "property2": "string"
}, - "description": "string",
- "quantity": 0,
- "price": 0,
- "total_price": 0,
- "visible": 0,
- "line_item_key": "string",
- "barcode": "string",
- "compare_at_price": 0,
- "weight": 0,
- "weight_unit": "string",
- "product_id": "string",
- "variant_id": "string",
- "requires_shipping": true,
- "sku": "string",
- "taxable": true,
- "tags": "string",
- "vendor": "string"
}, - "taxes": [
- {
- "value": 0,
- "name": "string",
- "is_included": true
}
], - "fees": [
- {
- "amount": 0,
- "name": "string"
}
], - "discounts": [
- {
- "code": "string",
- "text": "string",
- "value": "string"
}
]
}
], - "shipping": {
- "select _shipping_line": {
- "id": "string",
- "description": "string",
- "amount": 0
}, - "available_shipping_lines": [
- {
- "id": "string",
- "line": {
- "id": "string",
- "description": "string",
- "amount": 0
}
}
], - "taxes": [
- {
- "value": 0,
- "name": "string",
- "is_included": true
}
], - "discounts": [
- {
- "code": "string",
- "text": "string",
- "value": "string"
}
]
}, - "taxes": [
- {
- "value": 0,
- "name": "string",
- "is_included": true
}
], - "discounts": [
- {
- "code": "string",
- "text": "string",
- "value": "string"
}
], - "payments": [
- {
- "gateway_public_id": "string",
- "amount": 0,
- "currency": "string",
- "type": "string",
- "display_string": "string",
- "id": "string",
- "token": "string",
- "retain": false
}
], - "order_total": 0,
- "order_id": 0,
- "order_meta_data": {
- "cart_parameters": {
- "key": "string"
}, - "note_attributes": {
- "key": "string"
}, - "notes": "string",
- "tags": [
- "string"
]
}, - "flow_id": "string"
}
}
}
A child of the Order resource. Contains information about the product and the taxes, fees, and discounts associated with it. Use these endpoints to manipulate line items on an order.
Add Line Item
Adds a new item to the order. Only products that have already been sync'd to Checkout can be added from the frontend. One of either the SKU or the product ID is required.
Authorizations:
path Parameters
shop_identifier required | string The identifier of the shop. Can be retrieved by making a request to the Get Info endpoint. |
public_order_id required | string The public order id generated when the order is initialized by making a request to the Initialize Order endpoint. |
header Parameters
Authorization required | string <Bearer JWT> Example: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdXRoX3R5cGUiOiJWMl9BUEkiLCJwYXlsb2FkIjp7InB1YmxpY19vcmRlcl9pZCI6Inlyb0Y2NDNNeUpTZVZRUUpES2R2c2QxYXdXY3BpRVFJbkhOaTJkWlhmWW9PdVI0dmFGVUhpNHBPRG9pRWFpOVQifSwiZXhwIjoxNjMyMzQxMjg3LCJuYmYiOm51bGwsImlhdCI6bnVsbH0.swmYcVBHyK2i86jN-bIOL3WOCzP5VQVLq9Ev-TfIC_c Authenticates the API request. The expected token is a JWT generated during the initialization of the the order via the Initialize Order endpoint. Once the JWT has expired (after 60 minutes), a new JWT can be regenerated using the Refresh JWT endpoint. |
Request Body schema: application/json
platorm_id | string Id of the product on the platform |
sku | string |
quantity required | integer |
line_item_key required | string Key used to refer to the line |
Responses
Request samples
- Payload
{- "platform_id": "71",
- "sku": "CLC",
- "quantity": 1,
- "line_item_key": "key1"
}
Response samples
- 200
- 401
- 422
{- "data": {
- "line_item": {
- "id": "999",
- "product_title": "Oak Cheese Grater",
- "title": "Variant Title",
- "properties": { },
- "description": "",
- "quantity": 2,
- "price": 2350,
- "total_price": 4700,
- "visible": 1,
- "line_item_key": "oak_cheese_grater_0",
- "barcode": "",
- "compare_at_price": 4700,
- "weight": 1000,
- "weight_unit": "g",
- "product_id": "121",
- "variant_id": "80",
- "requires_shipping": true,
- "sku": "OCG",
- "taxable": true,
- "tags": "",
- "vendor": "",
- "total_weight": 2000
}, - "application_state": {
- "customer": {
- "platform_id": "50942578465125",
- "public_id": "pjpTyGh8KzNQ225wPqxgy7LwNuC887h6ecGyp3omwT4XW8SszjVSdHzWHN4NBwqhA",
- "first_name": "John",
- "last_name": "Doe",
- "email_address": "john.doe@mydomain.com",
- "saved_addresses": [
- {
- "id": "123",
- "first_name": "John",
- "last_name": "Doe",
- "address_line_1": "50 Fultz Blvd",
- "address_line_2": "",
- "country": "Canada",
- "city": "Winnipeg",
- "province": "Manitoba",
- "country_code": "CA",
- "province_code": "MB",
- "postal_code": "R3Y0L6",
- "business_name": "Acme Inc.",
- "phone_number": "8005550101"
}
]
}, - "addresses": {
- "billing": {
- "id": "987654321",
- "first_name": "John",
- "last_name": "Doe",
- "address_line_1": "50 Fultz Blvd",
- "address_line_2": "",
- "country": "Canada",
- "city": "Winnipeg",
- "province": "Manitoba",
- "country_code": "CA",
- "province_code": "MB",
- "postal_code": "R3Y0L6",
- "business_name": "Acme Inc.",
- "phone_number": "8005550101"
}, - "shipping": {
- "id": "987654321",
- "first_name": "John",
- "last_name": "Doe",
- "address_line_1": "50 Fultz Blvd",
- "address_line_2": "",
- "country": "Canada",
- "city": "Winnipeg",
- "province": "Manitoba",
- "country_code": "CA",
- "province_code": "MB",
- "postal_code": "R3Y0L6",
- "business_name": "Acme Inc.",
- "phone_number": "8005550101"
}
}, - "line_items": [
- {
- "product_data": {
- "id": "999",
- "product_title": "Oak Cheese Grater",
- "title": "Variant Title",
- "properties": { },
- "description": "",
- "quantity": 2,
- "price": 2350,
- "total_price": 4700,
- "visible": 1,
- "line_item_key": "oak_cheese_grater_0",
- "barcode": "",
- "compare_at_price": 4700,
- "weight": 1000,
- "weight_unit": "g",
- "product_id": "121",
- "variant_id": "80",
- "requires_shipping": true,
- "sku": "OCG",
- "taxable": true,
- "tags": "",
- "vendor": "",
- "total_weight": 2000
}, - "taxes": [
- {
- "value": 750,
- "name": "GST",
- "is_included": true
}
], - "fees": [
- {
- "value": 500,
- "name": "Miscellaneous Fee"
}
], - "discounts": [
- {
- "code": "DC43KJ81",
- "text": "Miscellaneous Discount",
- "value": "500",
- "valid": true
}
]
}
], - "fees": [
- {
- "id": "123456789",
- "line_text": "Custom Fee - Added by Plugin",
- "fee_type": "fixed",
- "value": 10,
- "source": "PLUGIN",
- "plugin_uuid": "a52589f8-09df-11ed-b30e-f67072e164ee",
- "taxable": true,
- "show_description": true
}
], - "shipping": {
- "select _shipping_line": {
- "id": "0",
- "desciption": "Custom Weight based rate - tier 2",
- "amount": 450
}, - "available_shipping_lines": [
- {
- "id": "0",
- "desciption": "Custom Weight based rate - tier 2",
- "amount": 450
}, - {
- "id": "1",
- "desciption": "Custom Price based rate - tier 1",
- "amount": 600
}
], - "taxes": [
- {
- "value": 250,
- "name": "GST",
- "is_included": true
}
], - "discounts": [
- {
- "code": "SH12345",
- "text": "Tax Free Shipping Discount",
- "value": "250",
- "valid": true
}
]
}, - "taxes": [
- {
- "value": 1000,
- "name": "GST",
- "is_included": true
}
], - "discounts": [
- {
- "code": "DC43KJ81",
- "text": "Miscellaneous Discount",
- "value": "500",
- "valid": true
}, - {
- "code": "SH12345",
- "text": "Tax Free Shipping Discount",
- "value": "250",
- "valid": true
}
], - "payments": [
- {
- "gateway_public_id": "i7z2xT0sKrDvhGWzex5SLjf5e6ndlQfrRL4AROkfhf3vNBkVT38JKBy5PSjB63qW",
- "amount": 4700,
- "currency": "CAD",
- "type": "spreedly",
- "display_string": "Credit Card Payment",
- "id": "",
- "token": "7uZAMRAf80KiEwibsrrM5IB41yU",
- "retain": false
}
], - "order_meta_data": {
- "cart_parameters": {
- "cp-key1": "A cart param"
}, - "note_attributes": {
- "na-key1": "A note attribute"
}, - "notes": "A special delivery note.",
- "tags": [
- "order-1"
]
}
}
}
}
List Line Items
Get a list of all the items on the order. This is a duplication of the line_items provided by the application_state.
Authorizations:
path Parameters
shop_identifier required | string The identifier of the shop. Can be retrieved by making a request to the Get Info endpoint. |
public_order_id required | string The public order id generated when the order is initialized by making a request to the Initialize Order endpoint. |
header Parameters
Authorization required | string <Bearer JWT> Example: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdXRoX3R5cGUiOiJWMl9BUEkiLCJwYXlsb2FkIjp7InB1YmxpY19vcmRlcl9pZCI6Inlyb0Y2NDNNeUpTZVZRUUpES2R2c2QxYXdXY3BpRVFJbkhOaTJkWlhmWW9PdVI0dmFGVUhpNHBPRG9pRWFpOVQifSwiZXhwIjoxNjMyMzQxMjg3LCJuYmYiOm51bGwsImlhdCI6bnVsbH0.swmYcVBHyK2i86jN-bIOL3WOCzP5VQVLq9Ev-TfIC_c Authenticates the API request. The expected token is a JWT generated during the initialization of the the order via the Initialize Order endpoint. Once the JWT has expired (after 60 minutes), a new JWT can be regenerated using the Refresh JWT endpoint. |
Responses
Response samples
- 200
- 401
{- "data": {
- "line_items": [
- {
- "id": "999",
- "product_title": "Oak Cheese Grater",
- "title": "Variant Title",
- "properties": { },
- "description": "",
- "quantity": 2,
- "price": 2350,
- "total_price": 4700,
- "visible": 1,
- "line_item_key": "oak_cheese_grater_0",
- "barcode": "",
- "compare_at_price": 4700,
- "weight": 1000,
- "weight_unit": "g",
- "product_id": "121",
- "variant_id": "80",
- "requires_shipping": true,
- "sku": "OCG",
- "taxable": true,
- "tags": "",
- "vendor": "",
- "total_weight": 2000
}
], - "application_state": {
- "customer": {
- "platform_id": "50942578465125",
- "public_id": "pjpTyGh8KzNQ225wPqxgy7LwNuC887h6ecGyp3omwT4XW8SszjVSdHzWHN4NBwqhA",
- "first_name": "John",
- "last_name": "Doe",
- "email_address": "john.doe@mydomain.com",
- "saved_addresses": [
- {
- "id": "123",
- "first_name": "John",
- "last_name": "Doe",
- "address_line_1": "50 Fultz Blvd",
- "address_line_2": "",
- "country": "Canada",
- "city": "Winnipeg",
- "province": "Manitoba",
- "country_code": "CA",
- "province_code": "MB",
- "postal_code": "R3Y0L6",
- "business_name": "Acme Inc.",
- "phone_number": "8005550101"
}
]
}, - "addresses": {
- "billing": {
- "id": "987654321",
- "first_name": "John",
- "last_name": "Doe",
- "address_line_1": "50 Fultz Blvd",
- "address_line_2": "",
- "country": "Canada",
- "city": "Winnipeg",
- "province": "Manitoba",
- "country_code": "CA",
- "province_code": "MB",
- "postal_code": "R3Y0L6",
- "business_name": "Acme Inc.",
- "phone_number": "8005550101"
}, - "shipping": {
- "id": "987654321",
- "first_name": "John",
- "last_name": "Doe",
- "address_line_1": "50 Fultz Blvd",
- "address_line_2": "",
- "country": "Canada",
- "city": "Winnipeg",
- "province": "Manitoba",
- "country_code": "CA",
- "province_code": "MB",
- "postal_code": "R3Y0L6",
- "business_name": "Acme Inc.",
- "phone_number": "8005550101"
}
}, - "line_items": [
- {
- "product_data": {
- "id": "999",
- "product_title": "Oak Cheese Grater",
- "title": "Variant Title",
- "properties": { },
- "description": "",
- "quantity": 2,
- "price": 2350,
- "total_price": 4700,
- "visible": 1,
- "line_item_key": "oak_cheese_grater_0",
- "barcode": "",
- "compare_at_price": 4700,
- "weight": 1000,
- "weight_unit": "g",
- "product_id": "121",
- "variant_id": "80",
- "requires_shipping": true,
- "sku": "OCG",
- "taxable": true,
- "tags": "",
- "vendor": "",
- "total_weight": 2000
}, - "taxes": [
- {
- "value": 750,
- "name": "GST",
- "is_included": true
}
], - "fees": [
- {
- "value": 500,
- "name": "Miscellaneous Fee"
}
], - "discounts": [
- {
- "code": "DC43KJ81",
- "text": "Miscellaneous Discount",
- "value": "500",
- "valid": true
}
]
}
], - "fees": [
- {
- "id": "123456789",
- "line_text": "Custom Fee - Added by Plugin",
- "fee_type": "fixed",
- "value": 10,
- "source": "PLUGIN",
- "plugin_uuid": "a52589f8-09df-11ed-b30e-f67072e164ee",
- "taxable": true,
- "show_description": true
}
], - "shipping": {
- "select _shipping_line": {
- "id": "0",
- "desciption": "Custom Weight based rate - tier 2",
- "amount": 450
}, - "available_shipping_lines": [
- {
- "id": "0",
- "desciption": "Custom Weight based rate - tier 2",
- "amount": 450
}, - {
- "id": "1",
- "desciption": "Custom Price based rate - tier 1",
- "amount": 600
}
], - "taxes": [
- {
- "value": 250,
- "name": "GST",
- "is_included": true
}
], - "discounts": [
- {
- "code": "SH12345",
- "text": "Tax Free Shipping Discount",
- "value": "250",
- "valid": true
}
]
}, - "taxes": [
- {
- "value": 1000,
- "name": "GST",
- "is_included": true
}
], - "discounts": [
- {
- "code": "DC43KJ81",
- "text": "Miscellaneous Discount",
- "value": "500",
- "valid": true
}, - {
- "code": "SH12345",
- "text": "Tax Free Shipping Discount",
- "value": "250",
- "valid": true
}
], - "payments": [
- {
- "gateway_public_id": "i7z2xT0sKrDvhGWzex5SLjf5e6ndlQfrRL4AROkfhf3vNBkVT38JKBy5PSjB63qW",
- "amount": 4700,
- "currency": "CAD",
- "type": "spreedly",
- "display_string": "Credit Card Payment",
- "id": "",
- "token": "7uZAMRAf80KiEwibsrrM5IB41yU",
- "retain": false
}
], - "order_meta_data": {
- "cart_parameters": {
- "cp-key1": "A cart param"
}, - "note_attributes": {
- "na-key1": "A note attribute"
}, - "notes": "A special delivery note.",
- "tags": [
- "order-1"
]
}
}
}
}
Update Line Item Quantity
Only the quantity of the product can be adjusted from the frontend. Refer to the line to be updated by line_item_key.
Authorizations:
path Parameters
shop_identifier required | string The identifier of the shop. Can be retrieved by making a request to the Get Info endpoint. |
public_order_id required | string The public order id generated when the order is initialized by making a request to the Initialize Order endpoint. |
header Parameters
Authorization required | string <Bearer JWT> Example: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdXRoX3R5cGUiOiJWMl9BUEkiLCJwYXlsb2FkIjp7InB1YmxpY19vcmRlcl9pZCI6Inlyb0Y2NDNNeUpTZVZRUUpES2R2c2QxYXdXY3BpRVFJbkhOaTJkWlhmWW9PdVI0dmFGVUhpNHBPRG9pRWFpOVQifSwiZXhwIjoxNjMyMzQxMjg3LCJuYmYiOm51bGwsImlhdCI6bnVsbH0.swmYcVBHyK2i86jN-bIOL3WOCzP5VQVLq9Ev-TfIC_c Authenticates the API request. The expected token is a JWT generated during the initialization of the the order via the Initialize Order endpoint. Once the JWT has expired (after 60 minutes), a new JWT can be regenerated using the Refresh JWT endpoint. |
Request Body schema: application/json
platorm_id | string Id of the product on the platform |
sku | string |
quantity required | integer |
line_item_key required | string Key used to refer to the line |
Responses
Request samples
- Payload
{- "quantity": 1,
- "line_item_key": "key1"
}
Response samples
- 200
- 401
- 422
{- "data": {
- "line_item": {
- "id": "999",
- "product_title": "Oak Cheese Grater",
- "title": "Variant Title",
- "properties": { },
- "description": "",
- "quantity": 1,
- "price": 2350,
- "total_price": 2350,
- "visible": 1,
- "line_item_key": "oak_cheese_grater_0",
- "barcode": "",
- "compare_at_price": 2350,
- "weight": 1000,
- "weight_unit": "g",
- "product_id": "121",
- "variant_id": "80",
- "requires_shipping": true,
- "sku": "OCG",
- "taxable": true,
- "tags": "",
- "vendor": "",
- "total_weight": 1000
}, - "application_state": {
- "customer": {
- "platform_id": "50942578465125",
- "public_id": "pjpTyGh8KzNQ225wPqxgy7LwNuC887h6ecGyp3omwT4XW8SszjVSdHzWHN4NBwqhA",
- "first_name": "John",
- "last_name": "Doe",
- "email_address": "john.doe@mydomain.com",
- "saved_addresses": [
- {
- "id": "123",
- "first_name": "John",
- "last_name": "Doe",
- "address_line_1": "50 Fultz Blvd",
- "address_line_2": "",
- "country": "Canada",
- "city": "Winnipeg",
- "province": "Manitoba",
- "country_code": "CA",
- "province_code": "MB",
- "postal_code": "R3Y0L6",
- "business_name": "Acme Inc.",
- "phone_number": "8005550101"
}
]
}, - "addresses": {
- "billing": {
- "id": "987654321",
- "first_name": "John",
- "last_name": "Doe",
- "address_line_1": "50 Fultz Blvd",
- "address_line_2": "",
- "country": "Canada",
- "city": "Winnipeg",
- "province": "Manitoba",
- "country_code": "CA",
- "province_code": "MB",
- "postal_code": "R3Y0L6",
- "business_name": "Acme Inc.",
- "phone_number": "8005550101"
}, - "shipping": {
- "id": "987654321",
- "first_name": "John",
- "last_name": "Doe",
- "address_line_1": "50 Fultz Blvd",
- "address_line_2": "",
- "country": "Canada",
- "city": "Winnipeg",
- "province": "Manitoba",
- "country_code": "CA",
- "province_code": "MB",
- "postal_code": "R3Y0L6",
- "business_name": "Acme Inc.",
- "phone_number": "8005550101"
}
}, - "line_items": [
- {
- "product_data": {
- "id": "999",
- "product_title": "Oak Cheese Grater",
- "title": "Variant Title",
- "properties": { },
- "description": "",
- "quantity": 1,
- "price": 2350,
- "total_price": 2350,
- "visible": 1,
- "line_item_key": "oak_cheese_grater_0",
- "barcode": "",
- "compare_at_price": 2350,
- "weight": 1000,
- "weight_unit": "g",
- "product_id": "121",
- "variant_id": "80",
- "requires_shipping": true,
- "sku": "OCG",
- "taxable": true,
- "tags": "",
- "vendor": "",
- "total_weight": 1000
}, - "taxes": [
- {
- "value": 750,
- "name": "GST",
- "is_included": true
}
], - "fees": [
- {
- "value": 500,
- "name": "Miscellaneous Fee"
}
], - "discounts": [
- {
- "code": "DC43KJ81",
- "text": "Miscellaneous Discount",
- "value": "500",
- "valid": true
}
]
}
], - "fees": [
- {
- "id": "123456789",
- "line_text": "Custom Fee - Added by Plugin",
- "fee_type": "fixed",
- "value": 10,
- "source": "PLUGIN",
- "plugin_uuid": "a52589f8-09df-11ed-b30e-f67072e164ee",
- "taxable": true,
- "show_description": true
}
], - "shipping": {
- "select _shipping_line": {
- "id": "0",
- "desciption": "Custom Weight based rate - tier 2",
- "amount": 450
}, - "available_shipping_lines": [
- {
- "id": "0",
- "desciption": "Custom Weight based rate - tier 2",
- "amount": 450
}, - {
- "id": "1",
- "desciption": "Custom Price based rate - tier 1",
- "amount": 600
}
], - "taxes": [
- {
- "value": 250,
- "name": "GST",
- "is_included": true
}
], - "discounts": [
- {
- "code": "SH12345",
- "text": "Tax Free Shipping Discount",
- "value": "250",
- "valid": true
}
]
}, - "taxes": [
- {
- "value": 1000,
- "name": "GST",
- "is_included": true
}
], - "discounts": [
- {
- "code": "DC43KJ81",
- "text": "Miscellaneous Discount",
- "value": "500",
- "valid": true
}, - {
- "code": "SH12345",
- "text": "Tax Free Shipping Discount",
- "value": "250",
- "valid": true
}
], - "payments": [
- {
- "gateway_public_id": "i7z2xT0sKrDvhGWzex5SLjf5e6ndlQfrRL4AROkfhf3vNBkVT38JKBy5PSjB63qW",
- "amount": 4700,
- "currency": "CAD",
- "type": "spreedly",
- "display_string": "Credit Card Payment",
- "id": "",
- "token": "7uZAMRAf80KiEwibsrrM5IB41yU",
- "retain": false
}
], - "order_meta_data": {
- "cart_parameters": {
- "cp-key1": "A cart param"
}, - "note_attributes": {
- "na-key1": "A note attribute"
}, - "notes": "A special delivery note.",
- "tags": [
- "order-1"
]
}
}
}
}
Delete Line Item
Removes a line item. Refer to the line to remove by line_item_key.
Authorizations:
path Parameters
shop_identifier required | string The identifier of the shop. Can be retrieved by making a request to the Get Info endpoint. |
public_order_id required | string The public order id generated when the order is initialized by making a request to the Initialize Order endpoint. |
header Parameters
Authorization required | string <Bearer JWT> Example: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdXRoX3R5cGUiOiJWMl9BUEkiLCJwYXlsb2FkIjp7InB1YmxpY19vcmRlcl9pZCI6Inlyb0Y2NDNNeUpTZVZRUUpES2R2c2QxYXdXY3BpRVFJbkhOaTJkWlhmWW9PdVI0dmFGVUhpNHBPRG9pRWFpOVQifSwiZXhwIjoxNjMyMzQxMjg3LCJuYmYiOm51bGwsImlhdCI6bnVsbH0.swmYcVBHyK2i86jN-bIOL3WOCzP5VQVLq9Ev-TfIC_c Authenticates the API request. The expected token is a JWT generated during the initialization of the the order via the Initialize Order endpoint. Once the JWT has expired (after 60 minutes), a new JWT can be regenerated using the Refresh JWT endpoint. |
Request Body schema: application/json
platorm_id | string Id of the product on the platform |
sku | string |
quantity required | integer |
line_item_key required | string Key used to refer to the line |
Responses
Request samples
- Payload
{- "platform_id": "121",
- "sku": "OCG",
- "quantity": 1,
- "line_item_key": "oak_cheese_grater_0"
}
Response samples
- 200
- 401
- 422
{- "data": {
- "line_items": [ ],
- "application_state": {
- "customer": {
- "platform_id": "50942578465125",
- "public_id": "pjpTyGh8KzNQ225wPqxgy7LwNuC887h6ecGyp3omwT4XW8SszjVSdHzWHN4NBwqhA",
- "first_name": "John",
- "last_name": "Doe",
- "email_address": "john.doe@mydomain.com",
- "saved_addresses": [
- {
- "id": "123",
- "first_name": "John",
- "last_name": "Doe",
- "address_line_1": "50 Fultz Blvd",
- "address_line_2": "",
- "country": "Canada",
- "city": "Winnipeg",
- "province": "Manitoba",
- "country_code": "CA",
- "province_code": "MB",
- "postal_code": "R3Y0L6",
- "business_name": "Acme Inc.",
- "phone_number": "8005550101"
}
]
}, - "addresses": {
- "billing": {
- "id": "987654321",
- "first_name": "John",
- "last_name": "Doe",
- "address_line_1": "50 Fultz Blvd",
- "address_line_2": "",
- "country": "Canada",
- "city": "Winnipeg",
- "province": "Manitoba",
- "country_code": "CA",
- "province_code": "MB",
- "postal_code": "R3Y0L6",
- "business_name": "Acme Inc.",
- "phone_number": "8005550101"
}, - "shipping": {
- "id": "987654321",
- "first_name": "John",
- "last_name": "Doe",
- "address_line_1": "50 Fultz Blvd",
- "address_line_2": "",
- "country": "Canada",
- "city": "Winnipeg",
- "province": "Manitoba",
- "country_code": "CA",
- "province_code": "MB",
- "postal_code": "R3Y0L6",
- "business_name": "Acme Inc.",
- "phone_number": "8005550101"
}
}, - "line_items": [ ],
- "fees": [
- {
- "id": "123456789",
- "line_text": "Custom Fee - Added by Plugin",
- "fee_type": "fixed",
- "value": 10,
- "source": "PLUGIN",
- "plugin_uuid": "a52589f8-09df-11ed-b30e-f67072e164ee",
- "taxable": true,
- "show_description": true
}
], - "shipping": {
- "select _shipping_line": {
- "id": "0",
- "desciption": "Custom Weight based rate - tier 2",
- "amount": 450
}, - "available_shipping_lines": [
- {
- "id": "0",
- "desciption": "Custom Weight based rate - tier 2",
- "amount": 450
}, - {
- "id": "1",
- "desciption": "Custom Price based rate - tier 1",
- "amount": 600
}
], - "taxes": [
- {
- "value": 250,
- "name": "GST",
- "is_included": true
}
], - "discounts": [
- {
- "code": "SH12345",
- "text": "Tax Free Shipping Discount",
- "value": "250",
- "valid": true
}
]
}, - "taxes": [
- {
- "value": 1000,
- "name": "GST",
- "is_included": true
}
], - "discounts": [
- {
- "code": "DC43KJ81",
- "text": "Miscellaneous Discount",
- "value": "500",
- "valid": true
}, - {
- "code": "SH12345",
- "text": "Tax Free Shipping Discount",
- "value": "250",
- "valid": true
}
], - "payments": [
- {
- "gateway_public_id": "i7z2xT0sKrDvhGWzex5SLjf5e6ndlQfrRL4AROkfhf3vNBkVT38JKBy5PSjB63qW",
- "amount": 4700,
- "currency": "CAD",
- "type": "spreedly",
- "display_string": "Credit Card Payment",
- "id": "",
- "token": "7uZAMRAf80KiEwibsrrM5IB41yU",
- "retain": false
}
], - "order_meta_data": {
- "cart_parameters": {
- "cp-key1": "A cart param"
}, - "note_attributes": {
- "na-key1": "A note attribute"
}, - "notes": "A special delivery note.",
- "tags": [
- "order-1"
]
}
}
}
}
A child of the Order resource. Contains metadata about the order, including cart parameters, note attributes, nots, and tags. Use these endpoints to manipulate the metadata on an order.
Append Order Metadata
Append to any of the metadata attached to an order.
Authorizations:
path Parameters
shop_identifier required | string The identifier of the shop. Can be retrieved by making a request to the Get Info endpoint. |
public_order_id required | string The public order id generated when the order is initialized by making a request to the Initialize Order endpoint. |
header Parameters
Authorization required | string <Bearer JWT> Example: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdXRoX3R5cGUiOiJWMl9BUEkiLCJwYXlsb2FkIjp7InB1YmxpY19vcmRlcl9pZCI6Inlyb0Y2NDNNeUpTZVZRUUpES2R2c2QxYXdXY3BpRVFJbkhOaTJkWlhmWW9PdVI0dmFGVUhpNHBPRG9pRWFpOVQifSwiZXhwIjoxNjMyMzQxMjg3LCJuYmYiOm51bGwsImlhdCI6bnVsbH0.swmYcVBHyK2i86jN-bIOL3WOCzP5VQVLq9Ev-TfIC_c Authenticates the API request. The expected token is a JWT generated during the initialization of the the order via the Initialize Order endpoint. Once the JWT has expired (after 60 minutes), a new JWT can be regenerated using the Refresh JWT endpoint. |
Request Body schema: application/json
Cart parameters (object) or No cart parameters (array) Extra information about an order that Checkout can act upon. | |
Note attributes (object) or No note attributes (array) Extra information added to the order and pushed to the platform. | |
notes | string Notes that can be attached to the order. |
tags | Array of strings Tags attached to the order. |
Responses
Request samples
- Payload
{- "cart_parameters": {
- "cp-key2": "Another cart param"
}, - "note_attributes": {
- "na-key2": "Another note attribute"
}, - "notes": "A different delivery instruction.",
- "tags": [
- "order-1-other"
]
}
Response samples
- 200
- 401
{- "order_meta_data": {
- "cart_parameters": {
- "cp-key1": "A cart param",
- "cp-key2": "Another cart param"
}, - "note_attributes": {
- "na-key1": "A note attribute",
- "na-key2": "Another note attribute"
}, - "notes": "A different delivery instruction.",
- "tags": [
- "order-1",
- "order-1-other",
- "order-1-alone"
]
}, - "application_state": {
- "customer": {
- "platform_id": null,
- "public_id": null,
- "first_name": "",
- "last_name": "",
- "email_address": "",
- "saved_addresses": [ ]
}, - "addresses": {
- "shipping": null,
- "billing": null
}, - "line_items": [ ],
- "fees": [ ],
- "taxes": [ ],
- "discounts": [ ],
- "payments": [ ],
- "shipping": {
- "selected_shipping": null,
- "available_shipping_lines": [ ],
- "taxes": 0,
- "discounts": 0
}, - "order_meta_data": {
- "cart_parameters": {
- "cp-key1": "A cart param",
- "cp-key2": "Another cart param"
}, - "note_attributes": {
- "na-key1": "A note attribute",
- "na-key2": "Another note attribute"
}, - "tags": [
- "order-1",
- "order-1-other",
- "order-1-alone"
]
}
}
}
Clear Order Metadata
Clears the order of all the metadata.
Authorizations:
path Parameters
shop_identifier required | string The identifier of the shop. Can be retrieved by making a request to the Get Info endpoint. |
public_order_id required | string The public order id generated when the order is initialized by making a request to the Initialize Order endpoint. |
header Parameters
Authorization required | string <Bearer JWT> Example: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdXRoX3R5cGUiOiJWMl9BUEkiLCJwYXlsb2FkIjp7InB1YmxpY19vcmRlcl9pZCI6Inlyb0Y2NDNNeUpTZVZRUUpES2R2c2QxYXdXY3BpRVFJbkhOaTJkWlhmWW9PdVI0dmFGVUhpNHBPRG9pRWFpOVQifSwiZXhwIjoxNjMyMzQxMjg3LCJuYmYiOm51bGwsImlhdCI6bnVsbH0.swmYcVBHyK2i86jN-bIOL3WOCzP5VQVLq9Ev-TfIC_c Authenticates the API request. The expected token is a JWT generated during the initialization of the the order via the Initialize Order endpoint. Once the JWT has expired (after 60 minutes), a new JWT can be regenerated using the Refresh JWT endpoint. |
Responses
Response samples
- 200
- 401
{- "application_state": {
- "customer": {
- "platform_id": "50942578465125",
- "public_id": "pjpTyGh8KzNQ225wPqxgy7LwNuC887h6ecGyp3omwT4XW8SszjVSdHzWHN4NBwqhA",
- "first_name": "John",
- "last_name": "Doe",
- "email_address": "john.doe@mydomain.com",
- "saved_addresses": [
- {
- "id": "123",
- "first_name": "John",
- "last_name": "Doe",
- "address_line_1": "50 Fultz Blvd",
- "address_line_2": "",
- "country": "Canada",
- "city": "Winnipeg",
- "province": "Manitoba",
- "country_code": "CA",
- "province_code": "MB",
- "postal_code": "R3Y0L6",
- "business_name": "Acme Inc.",
- "phone_number": "8005550101"
}
]
}, - "addresses": {
- "billing": {
- "id": "987654321",
- "first_name": "John",
- "last_name": "Doe",
- "address_line_1": "50 Fultz Blvd",
- "address_line_2": "",
- "country": "Canada",
- "city": "Winnipeg",
- "province": "Manitoba",
- "country_code": "CA",
- "province_code": "MB",
- "postal_code": "R3Y0L6",
- "business_name": "Acme Inc.",
- "phone_number": "8005550101"
}, - "shipping": {
- "id": "987654321",
- "first_name": "John",
- "last_name": "Doe",
- "address_line_1": "50 Fultz Blvd",
- "address_line_2": "",
- "country": "Canada",
- "city": "Winnipeg",
- "province": "Manitoba",
- "country_code": "CA",
- "province_code": "MB",
- "postal_code": "R3Y0L6",
- "business_name": "Acme Inc.",
- "phone_number": "8005550101"
}
}, - "line_items": [
- {
- "product_data": {
- "id": "999",
- "product_title": "Oak Cheese Grater",
- "title": "Variant Title",
- "properties": { },
- "description": "",
- "quantity": 2,
- "price": 2350,
- "total_price": 4700,
- "visible": 1,
- "line_item_key": "oak_cheese_grater_0",
- "barcode": "",
- "compare_at_price": 4700,
- "weight": 1000,
- "weight_unit": "g",
- "product_id": "121",
- "variant_id": "80",
- "requires_shipping": true,
- "sku": "OCG",
- "taxable": true,
- "tags": "",
- "vendor": "",
- "total_weight": 2000
}, - "taxes": [
- {
- "value": 750,
- "name": "GST",
- "is_included": true
}
], - "fees": [
- {
- "value": 500,
- "name": "Miscellaneous Fee"
}
], - "discounts": [
- {
- "code": "DC43KJ81",
- "text": "Miscellaneous Discount",
- "value": "500",
- "valid": true
}
]
}
], - "fees": [
- {
- "id": "123456789",
- "line_text": "Custom Fee - Added by Plugin",
- "fee_type": "fixed",
- "value": 10,
- "source": "PLUGIN",
- "plugin_uuid": "a52589f8-09df-11ed-b30e-f67072e164ee",
- "taxable": true,
- "show_description": true
}
], - "shipping": {
- "select _shipping_line": {
- "id": "0",
- "desciption": "Custom Weight based rate - tier 2",
- "amount": 450
}, - "available_shipping_lines": [
- {
- "id": "0",
- "desciption": "Custom Weight based rate - tier 2",
- "amount": 450
}, - {
- "id": "1",
- "desciption": "Custom Price based rate - tier 1",
- "amount": 600
}
], - "taxes": [
- {
- "value": 250,
- "name": "GST",
- "is_included": true
}
], - "discounts": [
- {
- "code": "SH12345",
- "text": "Tax Free Shipping Discount",
- "value": "250",
- "valid": true
}
]
}, - "taxes": [
- {
- "value": 1000,
- "name": "GST",
- "is_included": true
}
], - "discounts": [
- {
- "code": "DC43KJ81",
- "text": "Miscellaneous Discount",
- "value": "500",
- "valid": true
}, - {
- "code": "SH12345",
- "text": "Tax Free Shipping Discount",
- "value": "250",
- "valid": true
}
], - "payments": [
- {
- "gateway_public_id": "i7z2xT0sKrDvhGWzex5SLjf5e6ndlQfrRL4AROkfhf3vNBkVT38JKBy5PSjB63qW",
- "amount": 4700,
- "currency": "CAD",
- "type": "spreedly",
- "display_string": "Credit Card Payment",
- "id": "",
- "token": "7uZAMRAf80KiEwibsrrM5IB41yU",
- "retain": false
}
], - "order_meta_data": {
- "cart_parameters": [ ],
- "note_attributes": [ ],
- "notes": "",
- "tags": [ ]
}
}
}
List Order Metadata
List All the Metadata Attached to an Order.
Authorizations:
path Parameters
shop_identifier required | string The identifier of the shop. Can be retrieved by making a request to the Get Info endpoint. |
public_order_id required | string The public order id generated when the order is initialized by making a request to the Initialize Order endpoint. |
header Parameters
Authorization required | string <Bearer JWT> Example: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdXRoX3R5cGUiOiJWMl9BUEkiLCJwYXlsb2FkIjp7InB1YmxpY19vcmRlcl9pZCI6Inlyb0Y2NDNNeUpTZVZRUUpES2R2c2QxYXdXY3BpRVFJbkhOaTJkWlhmWW9PdVI0dmFGVUhpNHBPRG9pRWFpOVQifSwiZXhwIjoxNjMyMzQxMjg3LCJuYmYiOm51bGwsImlhdCI6bnVsbH0.swmYcVBHyK2i86jN-bIOL3WOCzP5VQVLq9Ev-TfIC_c Authenticates the API request. The expected token is a JWT generated during the initialization of the the order via the Initialize Order endpoint. Once the JWT has expired (after 60 minutes), a new JWT can be regenerated using the Refresh JWT endpoint. |
Responses
Response samples
- 200
- 401
{- "order_meta_data": {
- "cart_parameters": {
- "cp-key1": "A cart param"
}, - "note_attributes": {
- "na-key1": "A note attribute"
}, - "notes": "Special delivery instruction.",
- "tags": [
- "order-1"
]
}, - "application_state": {
- "customer": {
- "platform_id": null,
- "public_id": null,
- "first_name": "",
- "last_name": "",
- "email_address": "",
- "accepts_marketing": false,
- "saved_addresses": [ ]
}, - "addresses": {
- "shipping": [ ],
- "billing": [ ]
}, - "line_items": [ ],
- "fees": [ ],
- "taxes": [ ],
- "discounts": [ ],
- "payments": [ ],
- "shipping": {
- "selected_shipping": null,
- "available_shipping_lines": [ ],
- "taxes": 0,
- "discounts": 0
}, - "order_meta_data": {
- "cart_parameters": {
- "cp-key1": "A cart param"
}, - "note_attributes": {
- "na-key1": "A note attribute"
}, - "tags": [
- "order-1"
]
}
}
}
Overwrite Order Metadata
Add Metadata to an Order.
Authorizations:
path Parameters
shop_identifier required | string The identifier of the shop. Can be retrieved by making a request to the Get Info endpoint. |
public_order_id required | string The public order id generated when the order is initialized by making a request to the Initialize Order endpoint. |
header Parameters
Authorization required | string <Bearer JWT> Example: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdXRoX3R5cGUiOiJWMl9BUEkiLCJwYXlsb2FkIjp7InB1YmxpY19vcmRlcl9pZCI6Inlyb0Y2NDNNeUpTZVZRUUpES2R2c2QxYXdXY3BpRVFJbkhOaTJkWlhmWW9PdVI0dmFGVUhpNHBPRG9pRWFpOVQifSwiZXhwIjoxNjMyMzQxMjg3LCJuYmYiOm51bGwsImlhdCI6bnVsbH0.swmYcVBHyK2i86jN-bIOL3WOCzP5VQVLq9Ev-TfIC_c Authenticates the API request. The expected token is a JWT generated during the initialization of the the order via the Initialize Order endpoint. Once the JWT has expired (after 60 minutes), a new JWT can be regenerated using the Refresh JWT endpoint. |
Request Body schema: application/json
Any existing metadata will be overwritten by the values provided in this request.
Cart parameters (object) or No cart parameters (array) Extra information about an order that Checkout can act upon. | |
Note attributes (object) or No note attributes (array) Extra information added to the order and pushed to the platform. | |
notes | string Notes that can be attached to the order. |
tags | Array of strings Tags attached to the order. |
Responses
Request samples
- Payload
{- "cart_parameters": {
- "cp-key1": "A cart param"
}, - "note_attributes": {
- "na-key1": "A note attribute"
}, - "notes": "Special delivery instruction.",
- "tags": [
- "order-1"
]
}
Response samples
- 200
- 401
- 422
{- "order_meta_data": {
- "cart_parameters": {
- "cp-key1": "A cart param"
}, - "note_attributes": {
- "na-key1": "A note attribute"
}, - "notes": "Special delivery instruction.",
- "tags": [
- "order-1"
]
}, - "application_state": {
- "customer": {
- "platform_id": "50942578465125",
- "public_id": "pjpTyGh8KzNQ225wPqxgy7LwNuC887h6ecGyp3omwT4XW8SszjVSdHzWHN4NBwqhA",
- "first_name": "John",
- "last_name": "Doe",
- "email_address": "john.doe@mydomain.com",
- "saved_addresses": [
- {
- "id": "123",
- "first_name": "John",
- "last_name": "Doe",
- "address_line_1": "50 Fultz Blvd",
- "address_line_2": "",
- "country": "Canada",
- "city": "Winnipeg",
- "province": "Manitoba",
- "country_code": "CA",
- "province_code": "MB",
- "postal_code": "R3Y0L6",
- "business_name": "Acme Inc.",
- "phone_number": "8005550101"
}
]
}, - "addresses": {
- "billing": {
- "id": "987654321",
- "first_name": "John",
- "last_name": "Doe",
- "address_line_1": "50 Fultz Blvd",
- "address_line_2": "",
- "country": "Canada",
- "city": "Winnipeg",
- "province": "Manitoba",
- "country_code": "CA",
- "province_code": "MB",
- "postal_code": "R3Y0L6",
- "business_name": "Acme Inc.",
- "phone_number": "8005550101"
}, - "shipping": {
- "id": "987654321",
- "first_name": "John",
- "last_name": "Doe",
- "address_line_1": "50 Fultz Blvd",
- "address_line_2": "",
- "country": "Canada",
- "city": "Winnipeg",
- "province": "Manitoba",
- "country_code": "CA",
- "province_code": "MB",
- "postal_code": "R3Y0L6",
- "business_name": "Acme Inc.",
- "phone_number": "8005550101"
}
}, - "line_items": [
- {
- "product_data": {
- "id": "999",
- "product_title": "Oak Cheese Grater",
- "title": "Variant Title",
- "properties": { },
- "description": "",
- "quantity": 2,
- "price": 2350,
- "total_price": 4700,
- "visible": 1,
- "line_item_key": "oak_cheese_grater_0",
- "barcode": "",
- "compare_at_price": 4700,
- "weight": 1000,
- "weight_unit": "g",
- "product_id": "121",
- "variant_id": "80",
- "requires_shipping": true,
- "sku": "OCG",
- "taxable": true,
- "tags": "",
- "vendor": "",
- "total_weight": 2000
}, - "taxes": [
- {
- "value": 750,
- "name": "GST",
- "is_included": true
}
], - "fees": [
- {
- "value": 500,
- "name": "Miscellaneous Fee"
}
], - "discounts": [
- {
- "code": "DC43KJ81",
- "text": "Miscellaneous Discount",
- "value": "500",
- "valid": true
}
]
}
], - "fees": [
- {
- "id": "123456789",
- "line_text": "Custom Fee - Added by Plugin",
- "fee_type": "fixed",
- "value": 10,
- "source": "PLUGIN",
- "plugin_uuid": "a52589f8-09df-11ed-b30e-f67072e164ee",
- "taxable": true,
- "show_description": true
}
], - "shipping": {
- "select _shipping_line": {
- "id": "0",
- "desciption": "Custom Weight based rate - tier 2",
- "amount": 450
}, - "available_shipping_lines": [
- {
- "id": "0",
- "desciption": "Custom Weight based rate - tier 2",
- "amount": 450
}, - {
- "id": "1",
- "desciption": "Custom Price based rate - tier 1",
- "amount": 600
}
], - "taxes": [
- {
- "value": 250,
- "name": "GST",
- "is_included": true
}
], - "discounts": [
- {
- "code": "SH12345",
- "text": "Tax Free Shipping Discount",
- "value": "250",
- "valid": true
}
]
}, - "taxes": [
- {
- "value": 1000,
- "name": "GST",
- "is_included": true
}
], - "discounts": [
- {
- "code": "DC43KJ81",
- "text": "Miscellaneous Discount",
- "value": "500",
- "valid": true
}, - {
- "code": "SH12345",
- "text": "Tax Free Shipping Discount",
- "value": "250",
- "valid": true
}
], - "payments": [
- {
- "gateway_public_id": "i7z2xT0sKrDvhGWzex5SLjf5e6ndlQfrRL4AROkfhf3vNBkVT38JKBy5PSjB63qW",
- "amount": 4700,
- "currency": "CAD",
- "type": "spreedly",
- "display_string": "Credit Card Payment",
- "id": "",
- "token": "7uZAMRAf80KiEwibsrrM5IB41yU",
- "retain": false
}
], - "order_meta_data": {
- "cart_parameters": {
- "cp-key1": "A cart param"
}, - "note_attributes": {
- "na-key1": "A note attribute"
}, - "notes": "Special delivery instruction.",
- "tags": [
- "order-1"
]
}
}
}
Contains information about a single order, including the full application state of the order. Use these endpoints to retrieve the application state, manipulate order metadata, process the order, and complete other order-related functions.
Process Order
Triggers the backend processing of the order.
Before processing the order, Bold completes a series of pre-processing checks to ensure taxes are calculated and the order contains payments that equal the order total.
During processing, Bold completes the following steps:
- Verify that inventory is adequate to fulfill the order (optional, based on platform settings).
- Pre-authorize any pending payments.
- Finalize and apply discounts.
If these steps complete successfully, this endpoint returns a success message.
Once order processing is complete, Bold asynchronously pushes each order to the platform and charges authorized payments.
Authorizations:
path Parameters
shop_identifier required | string The identifier of the shop. Can be retrieved by making a request to the Get Info endpoint. |
public_order_id required | string The public order id generated when the order is initialized by making a request to the Initialize Order endpoint. |
header Parameters
Authorization required | string <Bearer JWT> Example: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdXRoX3R5cGUiOiJWMl9BUEkiLCJwYXlsb2FkIjp7InB1YmxpY19vcmRlcl9pZCI6Inlyb0Y2NDNNeUpTZVZRUUpES2R2c2QxYXdXY3BpRVFJbkhOaTJkWlhmWW9PdVI0dmFGVUhpNHBPRG9pRWFpOVQifSwiZXhwIjoxNjMyMzQxMjg3LCJuYmYiOm51bGwsImlhdCI6bnVsbH0.swmYcVBHyK2i86jN-bIOL3WOCzP5VQVLq9Ev-TfIC_c Authenticates the API request. The expected token is a JWT generated during the initialization of the the order via the Initialize Order endpoint. Once the JWT has expired (after 60 minutes), a new JWT can be regenerated using the Refresh JWT endpoint. |
Responses
Response samples
- 200
- 202
- 401
- 422
{- "application_state": {
- "customer": {
- "platform_id": "string",
- "public_id": "string",
- "first_name": "string",
- "last_name": "string",
- "email_address": "string",
- "accepts_marketing": true,
- "saved_addresses": [
- {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}
]
}, - "addresses": {
- "billing": {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}, - "shipping": {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}
}, - "line_items": [
- {
- "product_data": {
- "id": "string",
- "product_title": "string",
- "title": "string",
- "image_url": "string",
- "properties": {
- "property1": "string",
- "property2": "string"
}, - "description": "string",
- "quantity": 0,
- "price": 0,
- "total_price": 0,
- "visible": 0,
- "line_item_key": "string",
- "barcode": "string",
- "compare_at_price": 0,
- "weight": 0,
- "weight_unit": "string",
- "product_id": "string",
- "variant_id": "string",
- "requires_shipping": true,
- "sku": "string",
- "taxable": true,
- "tags": "string",
- "vendor": "string"
}, - "taxes": [
- {
- "value": 0,
- "name": "string",
- "is_included": true
}
], - "fees": [
- {
- "amount": 0,
- "name": "string"
}
], - "discounts": [
- {
- "code": "string",
- "text": "string",
- "value": "string"
}
]
}
], - "shipping": {
- "select _shipping_line": {
- "id": "string",
- "description": "string",
- "amount": 0
}, - "available_shipping_lines": [
- {
- "id": "string",
- "line": {
- "id": "string",
- "description": "string",
- "amount": 0
}
}
], - "taxes": [
- {
- "value": 0,
- "name": "string",
- "is_included": true
}
], - "discounts": [
- {
- "code": "string",
- "text": "string",
- "value": "string"
}
]
}, - "taxes": [
- {
- "value": 0,
- "name": "string",
- "is_included": true
}
], - "discounts": [
- {
- "code": "string",
- "text": "string",
- "value": "string"
}
], - "payments": [
- {
- "gateway_public_id": "string",
- "amount": 0,
- "currency": "string",
- "type": "string",
- "display_string": "string",
- "id": "string",
- "token": "string",
- "retain": false
}
], - "order_total": 0,
- "order_id": 0,
- "order_meta_data": {
- "cart_parameters": {
- "key": "string"
}, - "note_attributes": {
- "key": "string"
}, - "notes": "string",
- "tags": [
- "string"
]
}, - "flow_id": "string"
}
}
Pre-Process Order
Prompts Bold Checkout to execute all the checks required before processing an order. These steps include an inventory check, order validation and payment authorization.
Authorizations:
path Parameters
shop_identifier required | string The identifier of the shop. Can be retrieved by making a request to the Get Info endpoint. |
public_order_id required | string The public order id generated when the order is initialized by making a request to the Initialize Order endpoint. |
header Parameters
Authorization required | string <Bearer JWT> Example: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdXRoX3R5cGUiOiJWMl9BUEkiLCJwYXlsb2FkIjp7InB1YmxpY19vcmRlcl9pZCI6Inlyb0Y2NDNNeUpTZVZRUUpES2R2c2QxYXdXY3BpRVFJbkhOaTJkWlhmWW9PdVI0dmFGVUhpNHBPRG9pRWFpOVQifSwiZXhwIjoxNjMyMzQxMjg3LCJuYmYiOm51bGwsImlhdCI6bnVsbH0.swmYcVBHyK2i86jN-bIOL3WOCzP5VQVLq9Ev-TfIC_c Authenticates the API request. The expected token is a JWT generated during the initialization of the the order via the Initialize Order endpoint. Once the JWT has expired (after 60 minutes), a new JWT can be regenerated using the Refresh JWT endpoint. |
Responses
Response samples
- 200
- 202
- 401
- 422
{- "application_state": {
- "customer": {
- "platform_id": "string",
- "public_id": "string",
- "first_name": "string",
- "last_name": "string",
- "email_address": "string",
- "accepts_marketing": true,
- "saved_addresses": [
- {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}
]
}, - "addresses": {
- "billing": {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}, - "shipping": {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}
}, - "line_items": [
- {
- "product_data": {
- "id": "string",
- "product_title": "string",
- "title": "string",
- "image_url": "string",
- "properties": {
- "property1": "string",
- "property2": "string"
}, - "description": "string",
- "quantity": 0,
- "price": 0,
- "total_price": 0,
- "visible": 0,
- "line_item_key": "string",
- "barcode": "string",
- "compare_at_price": 0,
- "weight": 0,
- "weight_unit": "string",
- "product_id": "string",
- "variant_id": "string",
- "requires_shipping": true,
- "sku": "string",
- "taxable": true,
- "tags": "string",
- "vendor": "string"
}, - "taxes": [
- {
- "value": 0,
- "name": "string",
- "is_included": true
}
], - "fees": [
- {
- "amount": 0,
- "name": "string"
}
], - "discounts": [
- {
- "code": "string",
- "text": "string",
- "value": "string"
}
]
}
], - "shipping": {
- "select _shipping_line": {
- "id": "string",
- "description": "string",
- "amount": 0
}, - "available_shipping_lines": [
- {
- "id": "string",
- "line": {
- "id": "string",
- "description": "string",
- "amount": 0
}
}
], - "taxes": [
- {
- "value": 0,
- "name": "string",
- "is_included": true
}
], - "discounts": [
- {
- "code": "string",
- "text": "string",
- "value": "string"
}
]
}, - "taxes": [
- {
- "value": 0,
- "name": "string",
- "is_included": true
}
], - "discounts": [
- {
- "code": "string",
- "text": "string",
- "value": "string"
}
], - "payments": [
- {
- "gateway_public_id": "string",
- "amount": 0,
- "currency": "string",
- "type": "string",
- "display_string": "string",
- "id": "string",
- "token": "string",
- "retain": false
}
], - "order_total": 0,
- "order_id": 0,
- "order_meta_data": {
- "cart_parameters": {
- "key": "string"
}, - "note_attributes": {
- "key": "string"
}, - "notes": "string",
- "tags": [
- "string"
]
}, - "flow_id": "string"
}
}
Get Application State
Gets a refreshed copy of the application state. Useful if there are other plugins or applications that might be interacting with the order.
Authorizations:
path Parameters
shop_identifier required | string The identifier of the shop. Can be retrieved by making a request to the Get Info endpoint. |
public_order_id required | string The public order id generated when the order is initialized by making a request to the Initialize Order endpoint. |
header Parameters
Authorization required | string <Bearer JWT> Example: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdXRoX3R5cGUiOiJWMl9BUEkiLCJwYXlsb2FkIjp7InB1YmxpY19vcmRlcl9pZCI6Inlyb0Y2NDNNeUpTZVZRUUpES2R2c2QxYXdXY3BpRVFJbkhOaTJkWlhmWW9PdVI0dmFGVUhpNHBPRG9pRWFpOVQifSwiZXhwIjoxNjMyMzQxMjg3LCJuYmYiOm51bGwsImlhdCI6bnVsbH0.swmYcVBHyK2i86jN-bIOL3WOCzP5VQVLq9Ev-TfIC_c Authenticates the API request. The expected token is a JWT generated during the initialization of the the order via the Initialize Order endpoint. Once the JWT has expired (after 60 minutes), a new JWT can be regenerated using the Refresh JWT endpoint. |
Responses
Response samples
- 200
- 401
{- "data": {
- "application_state": {
- "customer": {
- "platform_id": "string",
- "public_id": "string",
- "first_name": "string",
- "last_name": "string",
- "email_address": "string",
- "accepts_marketing": true,
- "saved_addresses": [
- {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}
]
}, - "addresses": {
- "billing": {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}, - "shipping": {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}
}, - "line_items": [
- {
- "product_data": {
- "id": "string",
- "product_title": "string",
- "title": "string",
- "image_url": "string",
- "properties": {
- "property1": "string",
- "property2": "string"
}, - "description": "string",
- "quantity": 0,
- "price": 0,
- "total_price": 0,
- "visible": 0,
- "line_item_key": "string",
- "barcode": "string",
- "compare_at_price": 0,
- "weight": 0,
- "weight_unit": "string",
- "product_id": "string",
- "variant_id": "string",
- "requires_shipping": true,
- "sku": "string",
- "taxable": true,
- "tags": "string",
- "vendor": "string"
}, - "taxes": [
- {
- "value": 0,
- "name": "string",
- "is_included": true
}
], - "fees": [
- {
- "amount": 0,
- "name": "string"
}
], - "discounts": [
- {
- "code": "string",
- "text": "string",
- "value": "string"
}
]
}
], - "shipping": {
- "select _shipping_line": {
- "id": "string",
- "description": "string",
- "amount": 0
}, - "available_shipping_lines": [
- {
- "id": "string",
- "line": {
- "id": "string",
- "description": "string",
- "amount": 0
}
}
], - "taxes": [
- {
- "value": 0,
- "name": "string",
- "is_included": true
}
], - "discounts": [
- {
- "code": "string",
- "text": "string",
- "value": "string"
}
]
}, - "taxes": [
- {
- "value": 0,
- "name": "string",
- "is_included": true
}
], - "discounts": [
- {
- "code": "string",
- "text": "string",
- "value": "string"
}
], - "payments": [
- {
- "gateway_public_id": "string",
- "amount": 0,
- "currency": "string",
- "type": "string",
- "display_string": "string",
- "id": "string",
- "token": "string",
- "retain": false
}
], - "order_total": 0,
- "order_id": 0,
- "order_meta_data": {
- "cart_parameters": {
- "key": "string"
}, - "note_attributes": {
- "key": "string"
}, - "notes": "string",
- "tags": [
- "string"
]
}, - "flow_id": "string"
}
}
}
Dispatch App Hook Event
Dispatches the app_hook
plugin event to the plugin with the matching client ID provided in the request (given this plugin is registered for the app_hook
event). For more information about the app_hook
event, refer to Create Custom Events with App Hooks.
The plugin processes the request, and returns a response that indicates the actions to be executed by Checkout. Checkout completes these actions, and this endpoint then returns an up-to-date version of the application_state
.
Authorizations:
path Parameters
shop_identifier required | string The identifier of the shop. Can be retrieved by making a request to the Get Info endpoint. |
public_order_id required | string The public order id generated when the order is initialized by making a request to the Initialize Order endpoint. |
header Parameters
Authorization required | string <Bearer JWT> Example: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdXRoX3R5cGUiOiJWMl9BUEkiLCJwYXlsb2FkIjp7InB1YmxpY19vcmRlcl9pZCI6Inlyb0Y2NDNNeUpTZVZRUUpES2R2c2QxYXdXY3BpRVFJbkhOaTJkWlhmWW9PdVI0dmFGVUhpNHBPRG9pRWFpOVQifSwiZXhwIjoxNjMyMzQxMjg3LCJuYmYiOm51bGwsImlhdCI6bnVsbH0.swmYcVBHyK2i86jN-bIOL3WOCzP5VQVLq9Ev-TfIC_c Authenticates the API request. The expected token is a JWT generated during the initialization of the the order via the Initialize Order endpoint. Once the JWT has expired (after 60 minutes), a new JWT can be regenerated using the Refresh JWT endpoint. |
Request Body schema: application/json
uuid required | string The unique identifier of the plugin that is expected to receive the |
hook required | string The name of the |
app_hook_data | object Data that will be provided as part of the |
Responses
Request samples
- Payload
{- "uuid": "93225ea4-d701-41f9-a30a-bfe66f5d0479",
- "hook": "age_verified",
- "app_hook_data": {
- "order": {
- "tag_name": "over_legal_minimum",
- "tag_value": true
}
}
}
Response samples
- 200
- 422
{- "application_state": {
- "customer": {
- "platform_id": "string",
- "public_id": "string",
- "first_name": "string",
- "last_name": "string",
- "email_address": "string",
- "accepts_marketing": true,
- "saved_addresses": [
- {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}
]
}, - "addresses": {
- "billing": {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}, - "shipping": {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}
}, - "line_items": [
- {
- "product_data": {
- "id": "string",
- "product_title": "string",
- "title": "string",
- "image_url": "string",
- "properties": {
- "property1": "string",
- "property2": "string"
}, - "description": "string",
- "quantity": 0,
- "price": 0,
- "total_price": 0,
- "visible": 0,
- "line_item_key": "string",
- "barcode": "string",
- "compare_at_price": 0,
- "weight": 0,
- "weight_unit": "string",
- "product_id": "string",
- "variant_id": "string",
- "requires_shipping": true,
- "sku": "string",
- "taxable": true,
- "tags": "string",
- "vendor": "string"
}, - "taxes": [
- {
- "value": 0,
- "name": "string",
- "is_included": true
}
], - "fees": [
- {
- "amount": 0,
- "name": "string"
}
], - "discounts": [
- {
- "code": "string",
- "text": "string",
- "value": "string"
}
]
}
], - "shipping": {
- "select _shipping_line": {
- "id": "string",
- "description": "string",
- "amount": 0
}, - "available_shipping_lines": [
- {
- "id": "string",
- "line": {
- "id": "string",
- "description": "string",
- "amount": 0
}
}
], - "taxes": [
- {
- "value": 0,
- "name": "string",
- "is_included": true
}
], - "discounts": [
- {
- "code": "string",
- "text": "string",
- "value": "string"
}
]
}, - "taxes": [
- {
- "value": 0,
- "name": "string",
- "is_included": true
}
], - "discounts": [
- {
- "code": "string",
- "text": "string",
- "value": "string"
}
], - "payments": [
- {
- "gateway_public_id": "string",
- "amount": 0,
- "currency": "string",
- "type": "string",
- "display_string": "string",
- "id": "string",
- "token": "string",
- "retain": false
}
], - "order_total": 0,
- "order_id": 0,
- "order_meta_data": {
- "cart_parameters": {
- "key": "string"
}, - "note_attributes": {
- "key": "string"
}, - "notes": "string",
- "tags": [
- "string"
]
}, - "flow_id": "string"
}
}
Check Order Inventory
Triggers an inventory check on the items in the cart. The check can only be performed if the store enabled inventory checks; otherwise, this endpoint returns a not_enabled
response. Functionally, this means that Checkout may proceed as if the check had passed.
If the inventory check is enabled, Checkout looks for an inventory override present on the order. If one is present, Checkout calls the override endpoint and returns the results yielded by that endpoint. If no override is present, Checkout uses the inventory policy on the store platform to determine whether the items on the order are in stock. For more information about inventory overrides, refer to the Plugin Actions Reference.
If Checkout is able to complete the inventory check, it returns a result of either pass
or fail
depending on the result of the check. If the result is fail
, Checkout also returns a list of the items that failed the check, along with their available quantities.
If Checkout is unable to complete the inventory check for some external reason (for example, due to a network failure), Checkout returns an error response indicating that the check could not be completed.
Authorizations:
path Parameters
shop_identifier required | string The identifier of the shop. Can be retrieved by making a request to the Get Info endpoint. |
public_order_id required | string The public order id generated when the order is initialized by making a request to the Initialize Order endpoint. |
query Parameters
stage | string Default: "initial" Enum: "initial" "final" The context in which the inventory check is to be performed. Specify this value only when using an inventory override. The override provider must interpret this value, as it has no impact on Bold Checkout functionality. Allowable values are |
header Parameters
Authorization required | string <Bearer JWT> Example: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdXRoX3R5cGUiOiJWMl9BUEkiLCJwYXlsb2FkIjp7InB1YmxpY19vcmRlcl9pZCI6Inlyb0Y2NDNNeUpTZVZRUUpES2R2c2QxYXdXY3BpRVFJbkhOaTJkWlhmWW9PdVI0dmFGVUhpNHBPRG9pRWFpOVQifSwiZXhwIjoxNjMyMzQxMjg3LCJuYmYiOm51bGwsImlhdCI6bnVsbH0.swmYcVBHyK2i86jN-bIOL3WOCzP5VQVLq9Ev-TfIC_c Authenticates the API request. The expected token is a JWT generated during the initialization of the the order via the Initialize Order endpoint. Once the JWT has expired (after 60 minutes), a new JWT can be regenerated using the Refresh JWT endpoint. |
Responses
Response samples
- 200
- 422
{- "inventory_check": {
- "result": "pass",
- "failed_items": [
- {
- "platform_variant_id": "77",
- "available_quantity": 0
}
], - "message": "Insufficient inventory for requested items."
}, - "application_state": {
- "customer": {
- "platform_id": "string",
- "public_id": "string",
- "first_name": "string",
- "last_name": "string",
- "email_address": "string",
- "accepts_marketing": true,
- "saved_addresses": [
- {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}
]
}, - "addresses": {
- "billing": {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}, - "shipping": {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}
}, - "line_items": [
- {
- "product_data": {
- "id": "string",
- "product_title": "string",
- "title": "string",
- "image_url": "string",
- "properties": {
- "property1": "string",
- "property2": "string"
}, - "description": "string",
- "quantity": 0,
- "price": 0,
- "total_price": 0,
- "visible": 0,
- "line_item_key": "string",
- "barcode": "string",
- "compare_at_price": 0,
- "weight": 0,
- "weight_unit": "string",
- "product_id": "string",
- "variant_id": "string",
- "requires_shipping": true,
- "sku": "string",
- "taxable": true,
- "tags": "string",
- "vendor": "string"
}, - "taxes": [
- {
- "value": 0,
- "name": "string",
- "is_included": true
}
], - "fees": [
- {
- "amount": 0,
- "name": "string"
}
], - "discounts": [
- {
- "code": "string",
- "text": "string",
- "value": "string"
}
]
}
], - "shipping": {
- "select _shipping_line": {
- "id": "string",
- "description": "string",
- "amount": 0
}, - "available_shipping_lines": [
- {
- "id": "string",
- "line": {
- "id": "string",
- "description": "string",
- "amount": 0
}
}
], - "taxes": [
- {
- "value": 0,
- "name": "string",
- "is_included": true
}
], - "discounts": [
- {
- "code": "string",
- "text": "string",
- "value": "string"
}
]
}, - "taxes": [
- {
- "value": 0,
- "name": "string",
- "is_included": true
}
], - "discounts": [
- {
- "code": "string",
- "text": "string",
- "value": "string"
}
], - "payments": [
- {
- "gateway_public_id": "string",
- "amount": 0,
- "currency": "string",
- "type": "string",
- "display_string": "string",
- "id": "string",
- "token": "string",
- "retain": false
}
], - "order_total": 0,
- "order_id": 0,
- "order_meta_data": {
- "cart_parameters": {
- "key": "string"
}, - "note_attributes": {
- "key": "string"
}, - "notes": "string",
- "tags": [
- "string"
]
}, - "flow_id": "string"
}
}
A child of the Order resource. Contains information about the payments on an order. Use these endpoints to manipulate the payments on an order.
List Payments
Lists the payments that have been applied to the order.
Authorizations:
path Parameters
shop_identifier required | string The identifier of the shop. Can be retrieved by making a request to the Get Info endpoint. |
public_order_id required | string The public order id generated when the order is initialized by making a request to the Initialize Order endpoint. |
header Parameters
Authorization required | string <Bearer JWT> Example: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdXRoX3R5cGUiOiJWMl9BUEkiLCJwYXlsb2FkIjp7InB1YmxpY19vcmRlcl9pZCI6Inlyb0Y2NDNNeUpTZVZRUUpES2R2c2QxYXdXY3BpRVFJbkhOaTJkWlhmWW9PdVI0dmFGVUhpNHBPRG9pRWFpOVQifSwiZXhwIjoxNjMyMzQxMjg3LCJuYmYiOm51bGwsImlhdCI6bnVsbH0.swmYcVBHyK2i86jN-bIOL3WOCzP5VQVLq9Ev-TfIC_c Authenticates the API request. The expected token is a JWT generated during the initialization of the the order via the Initialize Order endpoint. Once the JWT has expired (after 60 minutes), a new JWT can be regenerated using the Refresh JWT endpoint. |
Responses
Response samples
- 200
- 401
{- "data": {
- "payments": [
- {
- "gateway_public_id": "string",
- "amount": 0,
- "currency": "string",
- "type": "string",
- "display_string": "string",
- "id": "string",
- "token": "string",
- "retain": false
}
], - "application_state": {
- "customer": {
- "platform_id": "string",
- "public_id": "string",
- "first_name": "string",
- "last_name": "string",
- "email_address": "string",
- "accepts_marketing": true,
- "saved_addresses": [
- {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}
]
}, - "addresses": {
- "billing": {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}, - "shipping": {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}
}, - "line_items": [
- {
- "product_data": {
- "id": "string",
- "product_title": "string",
- "title": "string",
- "image_url": "string",
- "properties": {
- "property1": "string",
- "property2": "string"
}, - "description": "string",
- "quantity": 0,
- "price": 0,
- "total_price": 0,
- "visible": 0,
- "line_item_key": "string",
- "barcode": "string",
- "compare_at_price": 0,
- "weight": 0,
- "weight_unit": "string",
- "product_id": "string",
- "variant_id": "string",
- "requires_shipping": true,
- "sku": "string",
- "taxable": true,
- "tags": "string",
- "vendor": "string"
}, - "taxes": [
- {
- "value": 0,
- "name": "string",
- "is_included": true
}
], - "fees": [
- {
- "amount": 0,
- "name": "string"
}
], - "discounts": [
- {
- "code": "string",
- "text": "string",
- "value": "string"
}
]
}
], - "shipping": {
- "select _shipping_line": {
- "id": "string",
- "description": "string",
- "amount": 0
}, - "available_shipping_lines": [
- {
- "id": "string",
- "line": {
- "id": "string",
- "description": "string",
- "amount": 0
}
}
], - "taxes": [
- {
- "value": 0,
- "name": "string",
- "is_included": true
}
], - "discounts": [
- {
- "code": "string",
- "text": "string",
- "value": "string"
}
]
}, - "taxes": [
- {
- "value": 0,
- "name": "string",
- "is_included": true
}
], - "discounts": [
- {
- "code": "string",
- "text": "string",
- "value": "string"
}
], - "payments": [
- {
- "gateway_public_id": "string",
- "amount": 0,
- "currency": "string",
- "type": "string",
- "display_string": "string",
- "id": "string",
- "token": "string",
- "retain": false
}
], - "order_total": 0,
- "order_id": 0,
- "order_meta_data": {
- "cart_parameters": {
- "key": "string"
}, - "note_attributes": {
- "key": "string"
}, - "notes": "string",
- "tags": [
- "string"
]
}, - "flow_id": "string"
}
}
}
Create Payment
Adds a new payment to the order.
The payment gateway_public_id
tells Bold Checkout which payment gateway to use and is therefore required. The token
key is also required.
The amount
is optional. If this value is left empty, Bold Checkout sets the payment amount to the order total or to the maximum value that the payment method supports (e.g., for a gift card payment).
Authorizations:
path Parameters
shop_identifier required | string The identifier of the shop. Can be retrieved by making a request to the Get Info endpoint. |
public_order_id required | string The public order id generated when the order is initialized by making a request to the Initialize Order endpoint. |
header Parameters
Authorization required | string <Bearer JWT> Example: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdXRoX3R5cGUiOiJWMl9BUEkiLCJwYXlsb2FkIjp7InB1YmxpY19vcmRlcl9pZCI6Inlyb0Y2NDNNeUpTZVZRUUpES2R2c2QxYXdXY3BpRVFJbkhOaTJkWlhmWW9PdVI0dmFGVUhpNHBPRG9pRWFpOVQifSwiZXhwIjoxNjMyMzQxMjg3LCJuYmYiOm51bGwsImlhdCI6bnVsbH0.swmYcVBHyK2i86jN-bIOL3WOCzP5VQVLq9Ev-TfIC_c Authenticates the API request. The expected token is a JWT generated during the initialization of the the order via the Initialize Order endpoint. Once the JWT has expired (after 60 minutes), a new JWT can be regenerated using the Refresh JWT endpoint. |
Request Body schema: application/json
gateway_public_id required | string Public identifier of the payment gateway used with the payment. |
amount | number The payment amount represented in cents/base currency units using ISO-4217 standards. |
currency | string |
type | string |
display_string | string String to visually display the payment to the customer. |
token required | string Token generated by the payment gateway to identify the payment. |
retain | boolean Default: false Whether the payment method will be saved for future orders. Checkout only stores a tokenized version of the payment method. |
Responses
Request samples
- Payload
{- "gateway_public_id": "string",
- "amount": 0,
- "currency": "string",
- "type": "string",
- "display_string": "string",
- "token": "string",
- "retain": false
}
Response samples
- 200
- 401
- 422
{- "data": {
- "payment": {
- "gateway_public_id": "string",
- "amount": 0,
- "currency": "string",
- "type": "string",
- "display_string": "string",
- "id": "string",
- "token": "string",
- "retain": false
}, - "application_state": {
- "customer": {
- "platform_id": "string",
- "public_id": "string",
- "first_name": "string",
- "last_name": "string",
- "email_address": "string",
- "accepts_marketing": true,
- "saved_addresses": [
- {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}
]
}, - "addresses": {
- "billing": {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}, - "shipping": {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}
}, - "line_items": [
- {
- "product_data": {
- "id": "string",
- "product_title": "string",
- "title": "string",
- "image_url": "string",
- "properties": {
- "property1": "string",
- "property2": "string"
}, - "description": "string",
- "quantity": 0,
- "price": 0,
- "total_price": 0,
- "visible": 0,
- "line_item_key": "string",
- "barcode": "string",
- "compare_at_price": 0,
- "weight": 0,
- "weight_unit": "string",
- "product_id": "string",
- "variant_id": "string",
- "requires_shipping": true,
- "sku": "string",
- "taxable": true,
- "tags": "string",
- "vendor": "string"
}, - "taxes": [
- {
- "value": 0,
- "name": "string",
- "is_included": true
}
], - "fees": [
- {
- "amount": 0,
- "name": "string"
}
], - "discounts": [
- {
- "code": "string",
- "text": "string",
- "value": "string"
}
]
}
], - "shipping": {
- "select _shipping_line": {
- "id": "string",
- "description": "string",
- "amount": 0
}, - "available_shipping_lines": [
- {
- "id": "string",
- "line": {
- "id": "string",
- "description": "string",
- "amount": 0
}
}
], - "taxes": [
- {
- "value": 0,
- "name": "string",
- "is_included": true
}
], - "discounts": [
- {
- "code": "string",
- "text": "string",
- "value": "string"
}
]
}, - "taxes": [
- {
- "value": 0,
- "name": "string",
- "is_included": true
}
], - "discounts": [
- {
- "code": "string",
- "text": "string",
- "value": "string"
}
], - "payments": [
- {
- "gateway_public_id": "string",
- "amount": 0,
- "currency": "string",
- "type": "string",
- "display_string": "string",
- "id": "string",
- "token": "string",
- "retain": false
}
], - "order_total": 0,
- "order_id": 0,
- "order_meta_data": {
- "cart_parameters": {
- "key": "string"
}, - "note_attributes": {
- "key": "string"
}, - "notes": "string",
- "tags": [
- "string"
]
}, - "flow_id": "string"
}
}
}
Update Payment
Updates the value of the payment. Only the amount of payment can be changed.
Authorizations:
path Parameters
shop_identifier required | string The identifier of the shop. Can be retrieved by making a request to the Get Info endpoint. |
public_order_id required | string The public order id generated when the order is initialized by making a request to the Initialize Order endpoint. |
header Parameters
Authorization required | string <Bearer JWT> Example: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdXRoX3R5cGUiOiJWMl9BUEkiLCJwYXlsb2FkIjp7InB1YmxpY19vcmRlcl9pZCI6Inlyb0Y2NDNNeUpTZVZRUUpES2R2c2QxYXdXY3BpRVFJbkhOaTJkWlhmWW9PdVI0dmFGVUhpNHBPRG9pRWFpOVQifSwiZXhwIjoxNjMyMzQxMjg3LCJuYmYiOm51bGwsImlhdCI6bnVsbH0.swmYcVBHyK2i86jN-bIOL3WOCzP5VQVLq9Ev-TfIC_c Authenticates the API request. The expected token is a JWT generated during the initialization of the the order via the Initialize Order endpoint. Once the JWT has expired (after 60 minutes), a new JWT can be regenerated using the Refresh JWT endpoint. |
Request Body schema: application/json
gateway_public_id required | string Public identifier of the payment gateway used with the payment. |
amount | number The payment amount represented in cents/base currency units using ISO-4217 standards. |
currency | string |
type | string |
display_string | string String to visually display the payment to the customer. |
token required | string Token generated by the payment gateway to identify the payment. |
retain | boolean Default: false Whether the payment method will be saved for future orders. Checkout only stores a tokenized version of the payment method. |
Responses
Request samples
- Payload
{- "gateway_public_id": "string",
- "amount": 0,
- "currency": "string",
- "type": "string",
- "display_string": "string",
- "token": "string",
- "retain": false
}
Response samples
- 200
- 401
- 422
{- "data": {
- "payment": {
- "gateway_public_id": "string",
- "amount": 0,
- "currency": "string",
- "type": "string",
- "display_string": "string",
- "id": "string",
- "token": "string",
- "retain": false
}, - "application_state": {
- "customer": {
- "platform_id": "string",
- "public_id": "string",
- "first_name": "string",
- "last_name": "string",
- "email_address": "string",
- "accepts_marketing": true,
- "saved_addresses": [
- {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}
]
}, - "addresses": {
- "billing": {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}, - "shipping": {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}
}, - "line_items": [
- {
- "product_data": {
- "id": "string",
- "product_title": "string",
- "title": "string",
- "image_url": "string",
- "properties": {
- "property1": "string",
- "property2": "string"
}, - "description": "string",
- "quantity": 0,
- "price": 0,
- "total_price": 0,
- "visible": 0,
- "line_item_key": "string",
- "barcode": "string",
- "compare_at_price": 0,
- "weight": 0,
- "weight_unit": "string",
- "product_id": "string",
- "variant_id": "string",
- "requires_shipping": true,
- "sku": "string",
- "taxable": true,
- "tags": "string",
- "vendor": "string"
}, - "taxes": [
- {
- "value": 0,
- "name": "string",
- "is_included": true
}
], - "fees": [
- {
- "amount": 0,
- "name": "string"
}
], - "discounts": [
- {
- "code": "string",
- "text": "string",
- "value": "string"
}
]
}
], - "shipping": {
- "select _shipping_line": {
- "id": "string",
- "description": "string",
- "amount": 0
}, - "available_shipping_lines": [
- {
- "id": "string",
- "line": {
- "id": "string",
- "description": "string",
- "amount": 0
}
}
], - "taxes": [
- {
- "value": 0,
- "name": "string",
- "is_included": true
}
], - "discounts": [
- {
- "code": "string",
- "text": "string",
- "value": "string"
}
]
}, - "taxes": [
- {
- "value": 0,
- "name": "string",
- "is_included": true
}
], - "discounts": [
- {
- "code": "string",
- "text": "string",
- "value": "string"
}
], - "payments": [
- {
- "gateway_public_id": "string",
- "amount": 0,
- "currency": "string",
- "type": "string",
- "display_string": "string",
- "id": "string",
- "token": "string",
- "retain": false
}
], - "order_total": 0,
- "order_id": 0,
- "order_meta_data": {
- "cart_parameters": {
- "key": "string"
}, - "note_attributes": {
- "key": "string"
}, - "notes": "string",
- "tags": [
- "string"
]
}, - "flow_id": "string"
}
}
}
Remove Payment
Removes the payment by token.
Authorizations:
path Parameters
shop_identifier required | string The identifier of the shop. Can be retrieved by making a request to the Get Info endpoint. |
public_order_id required | string The public order id generated when the order is initialized by making a request to the Initialize Order endpoint. |
header Parameters
Authorization required | string <Bearer JWT> Example: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdXRoX3R5cGUiOiJWMl9BUEkiLCJwYXlsb2FkIjp7InB1YmxpY19vcmRlcl9pZCI6Inlyb0Y2NDNNeUpTZVZRUUpES2R2c2QxYXdXY3BpRVFJbkhOaTJkWlhmWW9PdVI0dmFGVUhpNHBPRG9pRWFpOVQifSwiZXhwIjoxNjMyMzQxMjg3LCJuYmYiOm51bGwsImlhdCI6bnVsbH0.swmYcVBHyK2i86jN-bIOL3WOCzP5VQVLq9Ev-TfIC_c Authenticates the API request. The expected token is a JWT generated during the initialization of the the order via the Initialize Order endpoint. Once the JWT has expired (after 60 minutes), a new JWT can be regenerated using the Refresh JWT endpoint. |
Request Body schema: application/json
gateway_public_id required | string Public identifier of the payment gateway used with the payment. |
amount | number The payment amount represented in cents/base currency units using ISO-4217 standards. |
currency | string |
type | string |
display_string | string String to visually display the payment to the customer. |
token required | string Token generated by the payment gateway to identify the payment. |
retain | boolean Default: false Whether the payment method will be saved for future orders. Checkout only stores a tokenized version of the payment method. |
Responses
Request samples
- Payload
{- "gateway_public_id": "string",
- "amount": 0,
- "currency": "string",
- "type": "string",
- "display_string": "string",
- "token": "string",
- "retain": false
}
Response samples
- 200
- 401
- 422
{- "data": {
- "application_state": {
- "customer": {
- "platform_id": "string",
- "public_id": "string",
- "first_name": "string",
- "last_name": "string",
- "email_address": "string",
- "accepts_marketing": true,
- "saved_addresses": [
- {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}
]
}, - "addresses": {
- "billing": {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}, - "shipping": {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}
}, - "line_items": [
- {
- "product_data": {
- "id": "string",
- "product_title": "string",
- "title": "string",
- "image_url": "string",
- "properties": {
- "property1": "string",
- "property2": "string"
}, - "description": "string",
- "quantity": 0,
- "price": 0,
- "total_price": 0,
- "visible": 0,
- "line_item_key": "string",
- "barcode": "string",
- "compare_at_price": 0,
- "weight": 0,
- "weight_unit": "string",
- "product_id": "string",
- "variant_id": "string",
- "requires_shipping": true,
- "sku": "string",
- "taxable": true,
- "tags": "string",
- "vendor": "string"
}, - "taxes": [
- {
- "value": 0,
- "name": "string",
- "is_included": true
}
], - "fees": [
- {
- "amount": 0,
- "name": "string"
}
], - "discounts": [
- {
- "code": "string",
- "text": "string",
- "value": "string"
}
]
}
], - "shipping": {
- "select _shipping_line": {
- "id": "string",
- "description": "string",
- "amount": 0
}, - "available_shipping_lines": [
- {
- "id": "string",
- "line": {
- "id": "string",
- "description": "string",
- "amount": 0
}
}
], - "taxes": [
- {
- "value": 0,
- "name": "string",
- "is_included": true
}
], - "discounts": [
- {
- "code": "string",
- "text": "string",
- "value": "string"
}
]
}, - "taxes": [
- {
- "value": 0,
- "name": "string",
- "is_included": true
}
], - "discounts": [
- {
- "code": "string",
- "text": "string",
- "value": "string"
}
], - "payments": [
- {
- "gateway_public_id": "string",
- "amount": 0,
- "currency": "string",
- "type": "string",
- "display_string": "string",
- "id": "string",
- "token": "string",
- "retain": false
}
], - "order_total": 0,
- "order_id": 0,
- "order_meta_data": {
- "cart_parameters": {
- "key": "string"
}, - "note_attributes": {
- "key": "string"
}, - "notes": "string",
- "tags": [
- "string"
]
}, - "flow_id": "string"
}
}
}
Remove Gift Card Payment
Removes a gift card payment by ID.
Authorizations:
path Parameters
shop_identifier required | string The identifier of the shop. Can be retrieved by making a request to the Get Info endpoint. |
public_order_id required | string The public order id generated when the order is initialized by making a request to the Initialize Order endpoint. |
header Parameters
Authorization required | string <Bearer JWT> Example: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdXRoX3R5cGUiOiJWMl9BUEkiLCJwYXlsb2FkIjp7InB1YmxpY19vcmRlcl9pZCI6Inlyb0Y2NDNNeUpTZVZRUUpES2R2c2QxYXdXY3BpRVFJbkhOaTJkWlhmWW9PdVI0dmFGVUhpNHBPRG9pRWFpOVQifSwiZXhwIjoxNjMyMzQxMjg3LCJuYmYiOm51bGwsImlhdCI6bnVsbH0.swmYcVBHyK2i86jN-bIOL3WOCzP5VQVLq9Ev-TfIC_c Authenticates the API request. The expected token is a JWT generated during the initialization of the the order via the Initialize Order endpoint. Once the JWT has expired (after 60 minutes), a new JWT can be regenerated using the Refresh JWT endpoint. |
Request Body schema: application/json
id | string The ID of the gift card payment. Find the ID by reading the application state |
Responses
Request samples
- Payload
{- "id": "2"
}
Response samples
- 200
- 401
- 404
- 422
{- "data": {
- "application_state": {
- "customer": {
- "platform_id": "string",
- "public_id": "string",
- "first_name": "string",
- "last_name": "string",
- "email_address": "string",
- "accepts_marketing": true,
- "saved_addresses": [
- {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}
]
}, - "addresses": {
- "billing": {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}, - "shipping": {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}
}, - "line_items": [
- {
- "product_data": {
- "id": "string",
- "product_title": "string",
- "title": "string",
- "image_url": "string",
- "properties": {
- "property1": "string",
- "property2": "string"
}, - "description": "string",
- "quantity": 0,
- "price": 0,
- "total_price": 0,
- "visible": 0,
- "line_item_key": "string",
- "barcode": "string",
- "compare_at_price": 0,
- "weight": 0,
- "weight_unit": "string",
- "product_id": "string",
- "variant_id": "string",
- "requires_shipping": true,
- "sku": "string",
- "taxable": true,
- "tags": "string",
- "vendor": "string"
}, - "taxes": [
- {
- "value": 0,
- "name": "string",
- "is_included": true
}
], - "fees": [
- {
- "amount": 0,
- "name": "string"
}
], - "discounts": [
- {
- "code": "string",
- "text": "string",
- "value": "string"
}
]
}
], - "shipping": {
- "select _shipping_line": {
- "id": "string",
- "description": "string",
- "amount": 0
}, - "available_shipping_lines": [
- {
- "id": "string",
- "line": {
- "id": "string",
- "description": "string",
- "amount": 0
}
}
], - "taxes": [
- {
- "value": 0,
- "name": "string",
- "is_included": true
}
], - "discounts": [
- {
- "code": "string",
- "text": "string",
- "value": "string"
}
]
}, - "taxes": [
- {
- "value": 0,
- "name": "string",
- "is_included": true
}
], - "discounts": [
- {
- "code": "string",
- "text": "string",
- "value": "string"
}
], - "payments": [
- {
- "gateway_public_id": "string",
- "amount": 0,
- "currency": "string",
- "type": "string",
- "display_string": "string",
- "id": "string",
- "token": "string",
- "retain": false
}
], - "order_total": 0,
- "order_id": 0,
- "order_meta_data": {
- "cart_parameters": {
- "key": "string"
}, - "note_attributes": {
- "key": "string"
}, - "notes": "string",
- "tags": [
- "string"
]
}, - "flow_id": "string"
}
}
}
Contains information about the Payment Isolation Gateway Interface (PIGI). Use these endpoints to manipulate the PIGI iFrame.
Create CSS Styling for PIGI
Use this endpoint to style the PIGI using CSS and media queries.
Authorizations:
path Parameters
shop_identifier required | string The identifier of the shop. Can be retrieved by making a request to the Get Info endpoint. |
public_order_id required | string The public order id generated when the order is initialized by making a request to the Initialize Order endpoint. |
header Parameters
Authorization required | string <Bearer JWT> Example: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdXRoX3R5cGUiOiJWMl9BUEkiLCJwYXlsb2FkIjp7InB1YmxpY19vcmRlcl9pZCI6Inlyb0Y2NDNNeUpTZVZRUUpES2R2c2QxYXdXY3BpRVFJbkhOaTJkWlhmWW9PdVI0dmFGVUhpNHBPRG9pRWFpOVQifSwiZXhwIjoxNjMyMzQxMjg3LCJuYmYiOm51bGwsImlhdCI6bnVsbH0.swmYcVBHyK2i86jN-bIOL3WOCzP5VQVLq9Ev-TfIC_c Authenticates the API request. The expected token is a JWT generated during the initialization of the the order via the Initialize Order endpoint. Once the JWT has expired (after 60 minutes), a new JWT can be regenerated using the Refresh JWT endpoint. |
Request Body schema: application/json
Array of objects[ items ] A set of CSS rules to be applied. | |
Array of objects[ items ] A set of media queries to be applied to the PIGI iframe. |
Responses
Request samples
- Payload
{- "css_rules": [
- {
- "cssText": ".ToggleField { color:red; }"
}
], - "media_rules": [
- {
- "conditionText": "screen and (max-height: 600px)",
- "cssRules": [
- {
- "cssText": ".ToggleField__Text { color:blue; }"
}
]
}
]
}
Response samples
- 200
- 401
{- "css_rules": [
- {
- "cssText": ".ToggleField { color:red; }"
}
], - "media_rules": [
- {
- "conditionText": "screen and (max-height: 600px)",
- "cssRules": [
- {
- "cssText": ".ToggleField__Text { color:blue; }"
}
]
}
]
}
A child of the Order resource. Contains information about the order's shipping line, which is created via the Bold Checkout admin. Use these endpoints to manipulate the shipping lines set on an order.
Set Shipping Line
Sets the shipping line to one of the available shipping lines on the order. Shipping lines can only be set by index and cannot be set directly.
Authorizations:
path Parameters
shop_identifier required | string The identifier of the shop. Can be retrieved by making a request to the Get Info endpoint. |
public_order_id required | string The public order id generated when the order is initialized by making a request to the Initialize Order endpoint. |
header Parameters
Authorization required | string <Bearer JWT> Example: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdXRoX3R5cGUiOiJWMl9BUEkiLCJwYXlsb2FkIjp7InB1YmxpY19vcmRlcl9pZCI6Inlyb0Y2NDNNeUpTZVZRUUpES2R2c2QxYXdXY3BpRVFJbkhOaTJkWlhmWW9PdVI0dmFGVUhpNHBPRG9pRWFpOVQifSwiZXhwIjoxNjMyMzQxMjg3LCJuYmYiOm51bGwsImlhdCI6bnVsbH0.swmYcVBHyK2i86jN-bIOL3WOCzP5VQVLq9Ev-TfIC_c Authenticates the API request. The expected token is a JWT generated during the initialization of the the order via the Initialize Order endpoint. Once the JWT has expired (after 60 minutes), a new JWT can be regenerated using the Refresh JWT endpoint. |
Request Body schema: application/json
index | string The index of a shipping line that was previously retrieved using the List Shipping Lines endpoint. |
Responses
Request samples
- Payload
{- "index": "0"
}
Response samples
- 200
- 401
- 422
{- "data": {
- "selected_shipping": {
- "id": "string",
- "description": "string",
- "amount": 0
}, - "application_state": {
- "customer": {
- "platform_id": "string",
- "public_id": "string",
- "first_name": "string",
- "last_name": "string",
- "email_address": "string",
- "accepts_marketing": true,
- "saved_addresses": [
- {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}
]
}, - "addresses": {
- "billing": {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}, - "shipping": {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}
}, - "line_items": [
- {
- "product_data": {
- "id": "string",
- "product_title": "string",
- "title": "string",
- "image_url": "string",
- "properties": {
- "property1": "string",
- "property2": "string"
}, - "description": "string",
- "quantity": 0,
- "price": 0,
- "total_price": 0,
- "visible": 0,
- "line_item_key": "string",
- "barcode": "string",
- "compare_at_price": 0,
- "weight": 0,
- "weight_unit": "string",
- "product_id": "string",
- "variant_id": "string",
- "requires_shipping": true,
- "sku": "string",
- "taxable": true,
- "tags": "string",
- "vendor": "string"
}, - "taxes": [
- {
- "value": 0,
- "name": "string",
- "is_included": true
}
], - "fees": [
- {
- "amount": 0,
- "name": "string"
}
], - "discounts": [
- {
- "code": "string",
- "text": "string",
- "value": "string"
}
]
}
], - "shipping": {
- "select _shipping_line": {
- "id": "string",
- "description": "string",
- "amount": 0
}, - "available_shipping_lines": [
- {
- "id": "string",
- "line": {
- "id": "string",
- "description": "string",
- "amount": 0
}
}
], - "taxes": [
- {
- "value": 0,
- "name": "string",
- "is_included": true
}
], - "discounts": [
- {
- "code": "string",
- "text": "string",
- "value": "string"
}
]
}, - "taxes": [
- {
- "value": 0,
- "name": "string",
- "is_included": true
}
], - "discounts": [
- {
- "code": "string",
- "text": "string",
- "value": "string"
}
], - "payments": [
- {
- "gateway_public_id": "string",
- "amount": 0,
- "currency": "string",
- "type": "string",
- "display_string": "string",
- "id": "string",
- "token": "string",
- "retain": false
}
], - "order_total": 0,
- "order_id": 0,
- "order_meta_data": {
- "cart_parameters": {
- "key": "string"
}, - "note_attributes": {
- "key": "string"
}, - "notes": "string",
- "tags": [
- "string"
]
}, - "flow_id": "string"
}
}
}
List Shipping Lines
Retrieves the shipping lines that are configured in Checkout.
Authorizations:
path Parameters
shop_identifier required | string The identifier of the shop. Can be retrieved by making a request to the Get Info endpoint. |
public_order_id required | string The public order id generated when the order is initialized by making a request to the Initialize Order endpoint. |
header Parameters
Authorization required | string <Bearer JWT> Example: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdXRoX3R5cGUiOiJWMl9BUEkiLCJwYXlsb2FkIjp7InB1YmxpY19vcmRlcl9pZCI6Inlyb0Y2NDNNeUpTZVZRUUpES2R2c2QxYXdXY3BpRVFJbkhOaTJkWlhmWW9PdVI0dmFGVUhpNHBPRG9pRWFpOVQifSwiZXhwIjoxNjMyMzQxMjg3LCJuYmYiOm51bGwsImlhdCI6bnVsbH0.swmYcVBHyK2i86jN-bIOL3WOCzP5VQVLq9Ev-TfIC_c Authenticates the API request. The expected token is a JWT generated during the initialization of the the order via the Initialize Order endpoint. Once the JWT has expired (after 60 minutes), a new JWT can be regenerated using the Refresh JWT endpoint. |
Responses
Response samples
- 200
- 401
- 422
A child of the Order resource. Contains information about order-level taxes. Use these endpoints to generate order-level taxes.
Generate Taxes
Calculates and applies taxes to the order. Taxes are not automatically recalculated, so you must call this endpoint after you make any changes to the shipping address.
Before calling this endpoint, configure your store's tax settings in the Bold Checkout admin, including tax zones, the tax provider, and whether the price of shipping should be taxed.
Taxes are calculated for each line item, for the shipping (if applicable), and for the whole order — the returned application_state
reflects all of these calculations.
Bold recommends calling this endpoint after calling the Set Shipping Line endpoint. In addition, calculated taxes must be present in the application_state
before you call the Process Order endpoint. Otherwise, the API returns an error and does not process the order.
Authorizations:
path Parameters
shop_identifier required | string The identifier of the shop. Can be retrieved by making a request to the Get Info endpoint. |
public_order_id required | string The public order id generated when the order is initialized by making a request to the Initialize Order endpoint. |
header Parameters
Authorization required | string <Bearer JWT> Example: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdXRoX3R5cGUiOiJWMl9BUEkiLCJwYXlsb2FkIjp7InB1YmxpY19vcmRlcl9pZCI6Inlyb0Y2NDNNeUpTZVZRUUpES2R2c2QxYXdXY3BpRVFJbkhOaTJkWlhmWW9PdVI0dmFGVUhpNHBPRG9pRWFpOVQifSwiZXhwIjoxNjMyMzQxMjg3LCJuYmYiOm51bGwsImlhdCI6bnVsbH0.swmYcVBHyK2i86jN-bIOL3WOCzP5VQVLq9Ev-TfIC_c Authenticates the API request. The expected token is a JWT generated during the initialization of the the order via the Initialize Order endpoint. Once the JWT has expired (after 60 minutes), a new JWT can be regenerated using the Refresh JWT endpoint. |
Responses
Response samples
- 200
- 401
- 422
{- "data": {
- "taxes": [
- {
- "value": 0,
- "name": "string",
- "is_included": true
}
], - "application_state": {
- "customer": {
- "platform_id": "string",
- "public_id": "string",
- "first_name": "string",
- "last_name": "string",
- "email_address": "string",
- "accepts_marketing": true,
- "saved_addresses": [
- {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}
]
}, - "addresses": {
- "billing": {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}, - "shipping": {
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "country": "string",
- "city": "string",
- "province": "string",
- "country_code": "string",
- "province_code": "string",
- "postal_code": "string",
- "business_name": "string",
- "phone_number": "string"
}
}, - "line_items": [
- {
- "product_data": {
- "id": "string",
- "product_title": "string",
- "title": "string",
- "image_url": "string",
- "properties": {
- "property1": "string",
- "property2": "string"
}, - "description": "string",
- "quantity": 0,
- "price": 0,
- "total_price": 0,
- "visible": 0,
- "line_item_key": "string",
- "barcode": "string",
- "compare_at_price": 0,
- "weight": 0,
- "weight_unit": "string",
- "product_id": "string",
- "variant_id": "string",
- "requires_shipping": true,
- "sku": "string",
- "taxable": true,
- "tags": "string",
- "vendor": "string"
}, - "taxes": [
- {
- "value": 0,
- "name": "string",
- "is_included": true
}
], - "fees": [
- {
- "amount": 0,
- "name": "string"
}
], - "discounts": [
- {
- "code": "string",
- "text": "string",
- "value": "string"
}
]
}
], - "shipping": {
- "select _shipping_line": {
- "id": "string",
- "description": "string",
- "amount": 0
}, - "available_shipping_lines": [
- {
- "id": "string",
- "line": {
- "id": "string",
- "description": "string",
- "amount": 0
}
}
], - "taxes": [
- {
- "value": 0,
- "name": "string",
- "is_included": true
}
], - "discounts": [
- {
- "code": "string",
- "text": "string",
- "value": "string"
}
]
}, - "taxes": [
- {
- "value": 0,
- "name": "string",
- "is_included": true
}
], - "discounts": [
- {
- "code": "string",
- "text": "string",
- "value": "string"
}
], - "payments": [
- {
- "gateway_public_id": "string",
- "amount": 0,
- "currency": "string",
- "type": "string",
- "display_string": "string",
- "id": "string",
- "token": "string",
- "retain": false
}
], - "order_total": 0,
- "order_id": 0,
- "order_meta_data": {
- "cart_parameters": {
- "key": "string"
}, - "note_attributes": {
- "key": "string"
}, - "notes": "string",
- "tags": [
- "string"
]
}, - "flow_id": "string"
}
}
}