Skip to content

Create Order Token

POST
/v1/merchant/orders

Make a request to this endpoint to create a Bolt order, generate a Bolt order token, and initiate the checkout process. A Bolt order token is required for Bolt orders; see Non-Bolt orders for alternative use cases.

Authorization

X-API-Key
X-API-Key<token>

Admins and Developers can obtain their Bolt API key from the Bolt Merchant Dashboard.

In: header

Request Body

application/json

Generate Order Token

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/merchant/orders" \  -H "Content-Type: application/json" \  -d '{    "cart": {      "total_amount": 900,      "currency": "USD",      "order_reference": "order_100"    },    "channel": "browser"  }'
{  "cart": {    "billing_address": {      "company": "Bolt",      "country": "United States",      "country_code": "US",      "door_code": "123456",      "email_address": "alan.watts@example.com",      "first_name": "Alan",      "id": "string",      "last_name": "Watts",      "locality": "Brooklyn",      "name": "Alan Watts",      "phone_number": "+12125550199",      "postal_code": "10044",      "priority": "primary",      "region": "NY",      "region_code": "NY",      "street_address1": "888 main street",      "street_address2": "apt 3021",      "street_address3": "c/o Alicia Watts",      "street_address4": "Bridge Street Apartment Building B"    },    "cart_url": "https://boltswagstore.com/orders/123456765432",    "currency": {      "currency": "USD",      "currency_symbol": "$"    },    "discount_amount": {      "amount": 754,      "currency": "USD",      "currency_symbol": "$"    },    "discounts": [      {        "amount": {          "amount": 754,          "currency": "USD",          "currency_symbol": "$"        },        "code": "SUMMER10",        "description": "10% off our summer collection",        "details_url": "https://boltswagstore.com/SUMMERSALE",        "discount_category": "coupon",        "free_shipping": {          "is_free_shipping": true,          "maximum_cost_allowed": 0        },        "reference": "DISC-1234"      }    ],    "display_id": "displayid_100",    "fee_amount": {      "amount": 754,      "currency": "USD",      "currency_symbol": "$"    },    "fees": [      {        "reference": "ItemFee",        "name": "Item Fee",        "description": "Item Fee",        "unit_price": {          "amount": 754,          "currency": "USD",          "currency_symbol": "$"        },        "unit_tax_amount": {          "amount": 754,          "currency": "USD",          "currency_symbol": "$"        },        "quantity": 0      }    ],    "items": [      {        "bolt_product_id": "string",        "brand": "string",        "category": "bags",        "collections": [          "summer"        ],        "color": "Bolt Blue",        "customizations": [          {            "attributes": {              "key1": "value1",              "key2": "value2"            },            "name": "string",            "price": 754          }        ],        "description": "string",        "details_url": "https://boltswagstore.com/products/123456",        "gift_option": {          "hide_gift_message": false,          "hide_gift_wrap": false        },        "hide": true,        "image_url": "https://boltswagstore.com/products/123456/images/1.png",        "isbn": 9780091347314,        "item_group": "string",        "manufacturer": "Bolt Textiles USA",        "merchant_product_id": "string",        "merchant_variant_id": "string",        "msrp": {          "amount": 754,          "currency": "USD",          "currency_symbol": "$"        },        "name": "string",        "options": "string",        "properties": [          {            "color": "string",            "display": true,            "name": "string",            "value": "string"          }        ],        "quantity": 1,        "reference": "string",        "shipment_id": "string",        "shipment_type": "unknown",        "shopify_line_item_reference": 0,        "shopify_product_reference": 0,        "shopify_product_variant_reference": 0,        "size": "Large",        "sku": "BOLT-SKU_100",        "subscription": {          "frequency": {            "unit": "month",            "value": 2          }        },        "tags": "tote, blue, linen, eco-friendly",        "tax_amount": {          "amount": 754,          "currency": "USD",          "currency_symbol": "$"        },        "taxable": true,        "total_amount": {          "amount": 754,          "currency": "USD",          "currency_symbol": "$"        },        "type": "unknown",        "unit_price": {          "amount": 754,          "currency": "USD",          "currency_symbol": "$"        },        "uom": "inches",        "upc": "0825764603119",        "weight": {          "unit": "string",          "weight": 0        }      }    ],    "merchant_order_url": "string",    "order_description": "Order #1234567890",    "order_reference": "order_100",    "shipments": [      {        "carrier": "USPS",        "cost": {          "amount": 754,          "currency": "USD",          "currency_symbol": "$"        },        "default": true,        "description": [          {            "content": "string",            "is_html": true          }        ],        "description_tooltips": [          {            "html_content": "string",            "target": 0          }        ],        "estimated_delivery_date": "2022-04-10 16:12:38.386000+00:00",        "expedited": true,        "gift_options": {          "hide_gift_message": false,          "hide_gift_wrap": false        },        "id": "string",        "package_dimension": {          "depth": 0,          "height": 0,          "unit": "string",          "width": 0        },        "package_type": "string",        "package_weight": {          "unit": "string",          "weight": 0        },        "reference": "string",        "service": "string",        "shipping_address": {          "company": "Bolt",          "country": "United States",          "country_code": "US",          "door_code": "123456",          "email_address": "alan.watts@example.com",          "first_name": "Alan",          "id": "string",          "last_name": "Watts",          "locality": "Brooklyn",          "name": "Alan Watts",          "phone_number": "+12125550199",          "postal_code": "10044",          "priority": "primary",          "region": "NY",          "region_code": "NY",          "street_address1": "888 main street",          "street_address2": "apt 3021",          "street_address3": "c/o Alicia Watts",          "street_address4": "Bridge Street Apartment Building B"        },        "shipping_method": "string",        "signature": "string",        "tax_amount": {          "amount": 754,          "currency": "USD",          "currency_symbol": "$"        },        "total_weight": {          "unit": "string",          "weight": 0        },        "type": "string"      }    ],    "shipping_amount": {      "amount": 754,      "currency": "USD",      "currency_symbol": "$"    },    "subtotal_amount": {      "amount": 754,      "currency": "USD",      "currency_symbol": "$"    },    "tax_amount": {      "amount": 754,      "currency": "USD",      "currency_symbol": "$"    },    "total_amount": {      "amount": 754,      "currency": "USD",      "currency_symbol": "$"    },    "transaction_reference": "6CEA-ZME1-DACE"  },  "dynamic_content": {    "custom_fields": [      {        "checkout_step": "SHIPPING_STEP",        "dynamic": true,        "context": "CHECKOUT",        "external_id": "string",        "field_setup": "string",        "helper_text": "string",        "label": "string",        "position": 0,        "public_id": "string",        "required": true,        "subscribeToNewsletter": true      }    ],    "eligible_payment_methods": [      {        "eligible": true,        "transaction_processor_type": "affirm"      }    ],    "gift_option_view": {      "hide_gift_message": true,      "hide_gift_wrap": true    },    "hide_apm": [      "PAYPAL"    ],    "order_notice": "string",    "payment_notice": "string",    "shipping_info_notice": "string",    "shipping_notice": "string"  },  "external_data": {    "steam_id": "string"  },  "token": "string",  "user_note": "string"}