Create Order

Merchants can use this feature to create orders on behalf of their customers.

📘

Some order attribute values passed in the interface are not allowed to be modified in the subsequent checkout process after the order is successfully created.

🔒

Requires write_order access scope. More access scope

Creates a new order in the store with the specified products, shipping details, and payment information.

This API is especially useful for:

  1. Creating manual orders in the admin panel
  2. Processing orders from external sales channels
  3. Implementing custom checkout flows
  4. Migrating orders from other platforms

Request Parameters

Public Request Parameters

📘

Body Parameters

ParameterTypeRequiredDescriptionExample
orderobjectYesContains all order details-
order.line_itemsarray of objectsYesProducts included in the order-
order.line_items. product_idstringYesUnique product identifier"prod_12345"
order.line_items. variant_idstringYesUnique variant identifier"var_67890"
order.line_items. quantityint32YesProduct quantity2
order.shipping_addressobjectYesDelivery address details-
order.shipping_address. first_namestringNoRecipient's first name"John"
order.shipping_address. last_namestringYesRecipient's last name"Doe"
order.shipping_address. emailstringYesRecipient's email"[email protected]"
order.shipping_address. phone_area_codestringNoPhone area code"1"
order.shipping_address. phonestringNoPhone number"5551234567"
order.shipping_address. countrystringYesDelivery country"United States"
order.shipping_address. country_codestringYesISO country code"US"
order.shipping_address. provincestringYesState/province"California"
order.shipping_address. province_codestringYesISO province code"CA"
order.shipping_address.areastringNoAddress region"Silicon Valley"
order.shipping_address.citystringYesDelivery city"San Francisco"
order.shipping_address.addressstringYesPrimary street address"123 Main St"
order.shipping_address.address1stringYesSecondary address"Apt 4B"
order.shipping_address.companystringNoCompany name"Acme Inc"
order.shipping_address.zipstringYesPostal code"94105"
order.shipping_lineobjectYesShipping method details-
order.shipping_line. shipping_namestringYesShipping method name"Express Delivery"
order.shipping_line. shipping_descstringNoShipping description"2-3 business days"
order.shipping_line. shipping_pricestringYesShipping cost"15.99"
order.tax_totalstringYesTotal tax amount"7.50"
order.currency_codestringYesCurrency code"USD"
order.tagsarray of stringsNoOrder tags["wholesale", "priority"]
order.discountstringYesDiscount applied"10%"
order.notestringNoOrder notes"Gift wrapping requested"
order.payment_linestringNoPayment method"COD"

Response Explanation

Public Response Parameters

📘

Successful Response

ParameterTypeExampleDescription
codestring"success"Status code of the API response
messagestring"Order retrieved successfully"Descriptive message about the response
data.orderobject-Complete order object containing all details

Order Object

ParameterTypeExampleDescription
idstring"ord_123"Order ID
created_atstring"2023-01-01T00:00:00Z"Creation time
updated_atstring"2023-01-01T00:00:00Z"Update time
notestring"Gift note"Merchant note
numberstring"#1001"Order number
total_pricestring"100.00"Total price
sub_totalstring"90.00"Subtotal
currencystring"USD"Currency
financial_statusstring"paid"Payment status
statusstring"fulfilled"Order status
cancelled_atstringCancel time
cancel_reasonstringCancel reason
payment_methodstringPayment method
fulfillment_statusstring"fulfilled"Fulfillment status
customer_deleted_atstringCustomer deletion time
deleted_atstringOrder deletion time
placed_atstring"2023-01-01T00:00:00Z"Payment time
tagsstring"vip"Order tags
buyer_accepts_marketingbooleantrueMarketing consent
code_discount_totalstring"10.00"Code discounts
customer_notestring"Handle with care"Customer note
total_discountstring"10.00"Total discounts
total_taxstring"5.00"Product taxes
total_shippingstring"5.00"Shipping cost
line_itemsarray[object]-Line items
payment_lineobject-Payment line
shipping_lineobject-Shipping line
billing_addressobject-Billing address
shipping_addressobject-Shipping address
fulfillmentsarray[object]-Fulfillments
customerobject-Customer info
refer_infostring"google"Referral info
sales_platformstring"web"Sales platform
total_refund_pricestring"0.00"Refunded amount
primary_market_priceobject-Market pricing
total_tip_receivedstring"5.00"Tips received
discount_applicationsstring"promo10"Discount details
refund_statusstring"none"Refund status
email_statusstring"sent"Email status
recovery_statusstring"success"Recovery status
total_paidstring"100.00"Total paid amount
payment_linesarray[object]-Payment lines
gift_card_totalstring"0.00"Gift card amount
logistics_codestring"DHL123"Logistics code
shipping_tax_totalstring"1.00"Shipping tax
location_lineobject-Location info
additional_totalstring"0.00"Additional fees
additional_pricesarray[object]-Fee details
configobject-Configuration
checkout_urlstring"https://..."Checkout URL
duty_totalstring"0.00"Duty fees

Fulfillment Object

ParameterTypeExampleDescription
idstring"ful_12345"Fulfillment/shipment ID
order_idstring"ord_123"Associated order ID
statusstring"shipped"Current fulfillment status
created_atstring"2023-01-01T00:00:00Z"Creation timestamp
updated_atstring"2023-01-02T00:00:00Z"Last update timestamp
tracking_companystring"UPS"Shipping carrier name
tracking_numberstring"1Z12345E"Package tracking number
tracking_company_codestring"ups"Carrier system code
line_itemsarray[object]-Shipped items
tracking_urlstring"https://ups.com/track"Tracking page URL
phone_numberstring"+1234567890"Contact phone for shipment

Line Items Object

ParameterTypeExampleDescription
idstring"li_12345"Unique line item identifier
product_idstring"prod_123"Associated product ID
product_titlestring"Premium T-Shirt"Name of purchased product
variant_idstring"var_456"Product variant ID
variant_titlestring"Blue / Medium"Variant description
quantityuint322Quantity purchased
notestring"Gift wrapping requested"Product-specific note
imageobject-Product image details
pricestring"29.99"Unit price
compare_at_pricestring"39.99"Original/compare price
total_pricestring"59.98"Total price (price × quantity)
fulfillment_statusstring"fulfilled"Fulfillment status
skustring"TSHIRT-BL-M"Inventory tracking code
weightstring"0.5"Product weight
weight_unitstring"kg"Weight measurement unit
vendorstring"Fashion Co"Product supplier
product_urlstring"https://..."Product page URL
created_atstring"2023-01-01T00:00:00Z"Creation time
updated_atstring"2023-01-01T00:00:00Z"Update time
optionsarray[object]-Variant options
product_slugstring"premium-t-shirt"Product URL slug
taxablebooleantrueWhether item is taxable
requires_shippingbooleantrueWhether requires shipping
spustring"SPU123"Standard Product Unit
product_tagsstring"summer,sale"Product tags
refund_quantity_totaluint320Total refunded quantity
ship_quantityuint322Shipped quantity
custombooleanfalseCustom product flag
trunk_pricestring"0.00"Trunk price
discount_applicationsstring"promo10"Applied discounts
tax_pricestring"2.99"Tax amount
duty_pricestring"0.00"Duty cost
Image Object
ParameterTypeExampleDescription
srcstring"https://..."Image URL
widthint32800Image width
heightint32600Image height
altstring"Blue T-Shirt"Alt text
Options Object
ParameterTypeExampleDescription
namestring"Color"Option name
valuestring"Blue"Selected value

Payment Line Object

ParameterTypeExampleDescription
payment_namestring"VISA-1234"Display name of payment method
payment_channelstring"stripe"Payment service provider
payment_methodstringSpecific payment type
credit_card_numberstring""Masked card digits
trans_channelstring`Transaction channel
trans_methodstringTransaction method
transaction_nostring"txn_789012"Unique transaction ID

Shipping Line Object

ParameterTypeExampleDescription
idstring"ship_12345"Unique identifier for the shipping method
namestring"Express Delivery"Display name of the shipping method
descstring"2-3 business days"Description of shipping terms

Billing Address/ Shipping Address Object

ParameterTypeExampleDescription
first_namestring"John"First name of the billing contact
last_namestring"Doe"Last name of the billing contact
addressstring"1 Rue des Carrieres"Primary street address
address1string"Suite 1234"Additional address line
phonestring"+861231231234"Contact phone number
citystring"SAN JOSE"City name
zipstring"87036"Postal/ZIP code
provincestring"New Mexico"State/Province name
countrystring"United States"Country name
companystring"ABC Limited"Company name
latitudestring"22.54"Geographic latitude
longitudestring"114.06"Geographic longitude
namestring"John Doe"Full name of billing contact
country_codestring"US"2-letter country code
province_codestring"NM"State/Province code
phone_area_codestring"+86"Phone country code
emailstring"[email protected]"Email address
areastring"Bay area"Regional area designation

Primary Market Price Object

ParameterTypeExampleDescription
compare_at_pricestring"129.99"Original/list price in primary currency
pricestring"99.99"Current selling price in primary currency
total_pricestring"199.98"Extended price (price × quantity)
actual_ratestring"1.12"Currency conversion rate applied

Customer Object

ParameterTypeExampleDescription
idstring"cust_12345"Unique customer identifier
emailstring"[email protected]"Customer's email address
first_namestring"John"Customer's first name
last_namestring"Doe"Customer's last name
phonestring"+1234567890"Customer's phone number
created_atstring"2023-01-01T00:00:00Z"Customer account creation date
updated_atstring"2023-06-01T00:00:00Z"Last customer profile update
order_countint325Total orders placed by customer
total_spentstring"499.95"Lifetime spending amount

Location Line Object

ParameterTypeExampleDescription
idstring"1234567890"Unique identifier for the location line.
location_idstring"Doe"Identifier for the associated location.
location_namestring"123 Main St"Name of the location, such as a store or warehouse.

Config Object

ParameterTypeExampleDescription
product_tax_includedbooleantrueTax inclusion flag
requires_shippingbooleantrueShipping requirement
checkout_urlstring"https://store.com/checkout"Order checkout URL

Additional Charge Object

ParameterTypeExampleDescription
namestring"Gift Wrapping"System identifier for charge type
pricestring"5.99"Charge amount in order currency
biz_idstring"gift_wrap_1"Business logic identifier
fee_titlestring"Special Packaging"Customer-facing charge description

Market Setting Object

ParameterTypeExampleDescription
primary_market_langstring"en"Primary market language code
market_langstring"en-US"Localized market language
market_idstringUnique market identifier
market_currencystring"USD"Market currency code
market_currency_symbolobject-Currency symbol details
market_base_idstring"base_us"Base market ID
market_base_currencystring"USD"Base market currency
market_base_currency_symbolobject-Base currency symbol
primary_market_idstring"primary_us"Primary market ID
primary_market_currencystring"USD"Primary currency code
primary_market_currency_symbolobject-Primary currency symbol
market_price_settingobject-Price calculation settings
market_countrystring"US"2-letter country code

Currency Symbol Objects

ParameterTypeExampleDescription
codestring"USD"ISO currency code
valstring"$"Currency symbol
leftstring"$"Left-side display
rightstring""Right-side display

Market Price Setting Object

ParameterTypeExampleDescription
local_currency_enabledbooleantrueLocal currency active
custom_rate_enabledbooleanfalseCustom exchange rate
custom_ratefloat1.0Manual exchange rate
ratefloat1.12Current exchange rate
back_ratefloat0.89Reverse exchange rate
actual_ratefloat1.1198Precise exchange rate
base_to_ratefloat1.0Base to local rate
local_to_ratefloat1.0Local to base rate
adjustint320Price adjustment %
price_round_enabledbooleantruePrice rounding active

Error Response

FieldTypeExampleDescription
codestringInvalidParameterError http message
messagestring``Error message
Language
Credentials
Header
URL
Click Try It! to start a request and see the response here!