Skip to main content
Version: 202201

Create Order

POST 

/openapi/2022-01/orders

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

Request

Body

    line_items object[]required

    List of products

  • Array [
  • variant_idstringrequired
    product_idstringrequired
    quantityint32required

    Quantity of line item

  • ]
  • shipping_address objectrequired

    Shipping address

    first_namestring

    First name of consignee.

    last_namestringrequired

    Last name of consignee.

    phonestring

    Phone number, for example: +86 150 1447 1143

    emailstringrequired
    countrystringrequired

    Country, for example: United States

    country_codestringrequired

    Country code, for example: US

    provincestringrequired

    Province, for example: New Mexico

    province_codestringrequired

    Province Code, for example: NM

    areastring
    citystringrequired

    City, for example: SAN JOSE

    addressstringrequired

    Street address, for example: 1 Rue des Carrieres

    address1string

    Apartment/floor/room number, for example: Suite 1234

    zipstring

    ZIP code, for example: 87036

    companystring

    Company, for example: ABC Limited

    latitudefloat

    Latitude of the delivery address, for example: 22.54

    longitudefloat

    Longitude of the delivery address, for example: 114.06

    tagsstring[]
    Default value: ["Tags"]
    tax_totalstringrequired

    Order tax, numeric string, for example: "9.99"

    currency_codestringrequired

    Currency code of the order, e.g. "USD"

    discountstring

    Discount amount or percent for the order, discount amount cannot be greater than total price of line items, e.g. "10.00", "10%"

    notestring

    Note of the order

    payment_linestring

    Payment method of the order, If you fill in "COD" and the merchant switch on cod, it is cod payment method, else if the merchant switch off "cod" ,you fill in anything it will automatically fill in the default payment method configured by the merchant in the store's admin. if you create a completed payment order, where 'payment_line' refers to the final method of payment. if you create an unpaid order, where 'payment_line' is just a suggested method of payment, not the final method that goes through the checkout process.

    shipping_line object
    namestringrequired

    Name of shipping line, for example: "Free Shipping"

    shipping_pricestringrequired

    Shipping price, numeric string, for example: "10.00", "0"

    descstring

    Description of shipping line

    tagsstring[]

    Tags of the order

Responses

200

Schema
    order object
    idstring
    Example: 633130-00000005
    notestring
    Example: note
    numberstring
    Example: 00000005
    financial_statusstring
    Example: waiting
    statusstring
    Example: opened
    cancel_reason
    payment_methodstring
    Example: none
    fulfillment_statusstring
    Example: initialled
    discount_codestring
    Example: bk:5bed44bd-5bee-44b8-97e4-96307341d9fb
    discount_applicationsstring
    Example: [{"type":"discount_code","code":"bk:5bed44bd-5bee-44b8-97e4-96307341d9fb","discount_id":"c9d74464-ffa1-4464-9197-1a1640419ab4","discount_amount":10,"entitled_product_list":[{"product_id":"a1a88be0-a1d4-47e4-a2f2-ba6e131cf447","variant_id":"88e68830-4ef5-4125-bf7d-aef8047176b2","price":"10.10","quantity":1,"compare_at_price":"12.10","inventory_tracking":false,"inventory_quantity":0,"spu":"T-M","collection_ids":null}],"value_type":"fixed_amount","target_type":"line_item","target_selection":"all","discount_type":"fixed_amount","title":"666","price_rule_id":"53293dc7-a234-44ee-bcab-c165a78b28e7"}]
    customer_notestring
    Example:
    landing_sitestring
    Example:
    buyer_accepts_marketingboolean
    Default value: true
    Example: false
    currencystring
    Example: USD
    total_pricestring
    Example: 15.20
    total_discountstring
    Example: 10.00
    total_taxstring
    Example: 10.10
    total_shippingstring
    Example: 5.00
    sub_totalstring
    Example: 10.10
    code_discount_totalstring
    Example: 10.00
    line_item_discount_totalstring
    Example: 0.00
    tagsstring
    Example: Test tag,openapi
    created_atstring
    Example: 2024-04-19T08:09:04Z
    updated_atstring
    Example: 2024-04-19T08:09:06Z
    canceled_at
    customer_deleted_at
    deleted_at
    placed_at
    total_refund_pricestring
    Example: 0.00
    total_refund_taxstring
    Example: 0.00
    total_refund_discountstring
    Example: 0.00
    refund_status
    total_tip_receivedstring
    Example: 0.00
    browser_ipstring
    Example: 183.15.177.205
    sourcestring
    Example:
    last_landing_urlstring
    Example:
    email_statusstring
    Example: waiting
    recovery_statusstring
    Example: waiting
    total_paidstring
    Example: 0.00
    source_name object
    datastring
    Example:
    created_atstring
    Example:
    last_referrer_show object
    datastring
    Example:
    created_atstring
    Example:
    shipping_line object
    namestring
    Example: test
    customer object
    idstring
    Example: 2dd957e3-2051-4cdf-8584-9c0046b4d1ae
    emailstring
    first_namestring
    Example: ryan
    last_namestring
    Example: zhang
    phonestring
    Example: 19873264342
    created_atstring
    Example: 2024-04-18T09:29:24Z
    updated_atstring
    Example: 2024-04-19T08:09:04Z
    orders_countinteger
    Default value: 0
    Example: 0
    total_spentstring
    Example:
    shipping_address object
    first_namestring
    Example: Ryan
    last_namestring
    Example: Zhang
    address1string
    Example: 1 Rue des Carrieres
    address2string
    Example: Suite 1234
    phonestring
    Example: 19873264342
    citystring
    Example: 北京
    zipstring
    Example: 87036
    provincestring
    Example: Beijing
    countrystring
    Example: China mainland
    companystring
    Example: ABC Limited
    latitudestring
    Example: 22.540000
    longitudestring
    Example: 114.060000
    namestring
    Example: Ryan Zhang
    country_codestring
    Example: CN
    province_codestring
    Example: CN-BJ
    phone_area_codestring
    Example:
    emailstring
    areastring
    Example: Bay area
    extra_info
    billing_address
    payment_line
    payment_lines
    line_items object[]
  • Array [
  • idstring
    Example: 21d66bba-06a7-4bac-a9e5-02b0e42e8062
    product_idstring
    Example: a1a88be0-a1d4-47e4-a2f2-ba6e131cf447
    variant_idstring
    Example: 88e68830-4ef5-4125-bf7d-aef8047176b2
    variant_titlestring
    Example: S-blue-T
    product_titlestring
    Example: shirt
    product_handlestring
    Example: shirt
    quantityinteger
    Default value: 0
    Example: 1
    notestring
    Example:
    fulfillment_statusstring
    Example: waiting
    skustring
    Example: T-M-S-blue-T-A001004
    weight_unitstring
    Example: kg
    vendorstring
    Example: shoplazza
    product_urlstring
    Example: /products/shirt
    compare_at_pricestring
    Example: 12.10
    imagestring
    Example: //img.staticdj.com/ccf0794c594bad32a320eea0d6bfe40c.jpeg
    pricestring
    Example: 10.10
    totalstring
    Example: 10.10
    weightstring
    Example: 1.10
    properties object[]
  • Array [
  • namestring
    Example: size
    valuestring
    Example: S
  • ]
  • custom_properties
    refund_quantityinteger
    Default value: 0
    Example: 0
    refund_totalstring
    Example: 0.00
    base_pricestring
    Example: 10.10
    discount_applicationsstring
    Example:
    duty_pricestring
    Example: 0.00
    tax_pricestring
    Example: 0.00
  • ]
  • fulfillments object[]
  • Array [
  • object
  • ]
  • gift_card_totalstring
    Example: 0.00
    shipping_tax_totalstring
    Example: 0.00
    product_tax_includedboolean
    Default value: true
    Example: false
    refer_infostring
    Example: {"default_payment":"bogus_gateway","inventory_deduction":"order_created","ip":"183.15.177.205","source":"back","user_agent":"Apifox/1.0.0 (https://apifox.com)"}
    additional_totalstring
    Example: 0.00
    additional_prices object[]
  • Array [
  • object
  • ]
  • logistics_codestring
    Example:
    config object
    page_typestring
    Example: three_step
    requires_shippingboolean
    Default value: true
    Example: false
    checkout_business_typeinteger
    Default value: 0
    Example: 0
    product_tax_includedboolean
    Default value: true
    Example: false
    checkout_template_typeinteger
    Default value: 0
    Example: 0
    market_setting
    invoice_urlstring
    Example: https://zhangsenjun-shoplazza.stg.myshoplaza.com/checkout/633130-00000005?key=087ea25dea0be6c1ceab312119ed26