创建订单
POST https://{handle}.myshopline.com/admin/openapi/v20220901/orders.json
handle
:店铺的唯一标识符,值为店铺域名的前缀。例如,域名为 open001.myshopline.com
的店铺,其 handle
是 open001
。创建订单
请求头
- Content-Type required字段值固定为
application/json; charset=utf-8
- Authorization string required资源的访问令牌。请参考 应用授权 获取访问令牌,然后将获取到的访问令牌以 Bearer 格式传入Example:
Bearer eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiJmMjM3OWQyMTYyOGMzM2QxMWRiMWZkYjY5N2EzZjdjMjZlNGMwYTA5Iiwic2VsbGVySWQiOiIyMDAwMjM0ODgwIiwic3RvcmVJZCI6IjE2NzIzNjk3Mjk2MDYiLCJ2ZXJzaW9uIjoiVjIiLCJkb21haW4iOiJodHRwczovL3NsLW9wZW4tc2cubXlzaG9wbGluZS5jb20iLCJ0aW1lc3RhbXAiOjE2NzUzMTk0OTI0MzksImlzcyI6Inlzb3VsIiwiZXhwIjoxNzY5OTI3NDkyfQ.UwQzomM2veGCUaOZ0paUxq5dpc7DXuhHYFvsQ_uIAKduzWcb_j2E4q_36El83sp145D4cKbpcE5KCeeIz-JNQw
请求体
orderobject required
订单信息billing_addressobject required
账单地址address1 string账单收件人详细地址(最大255个字符)address2 string账单收件人详细地址附加(最大255个字符)area string账单收件人区县(最大64个字符)area_code string账单收件人区县编码city string账单收件人城市(最大64个字符)city_code string账单收件人城市编码company string公司名称country string账单收件人国家(最大64个字符)country_code string账单收件人国家编码email string账单收件人邮箱first_name string账单收件人名last_name string账单收件人姓phone string账单收件人名手机号province string账单收件人名省份province_code string账单收件人名省份编码same_as_receiver boolean是否与收货信息相同(相同其他参数可以不传)zip string账单收件人名邮编customerobject
买家信息email string用户邮箱first_name string名id string用户idlast_name string姓phone string用户手机号line_itemsobject[] required
订单商品快照信息price string商品售价,精度2product_id stringspu序列号quantity long订单中的商品数量rate string税费比例,字符串类型的小数title string商品标题variant_id string商品sku序列号note string订单备注,最大50个字符note_attributesobject[]
附加信息name string名称value string值price_infoobject required
价格信息current_extra_total_discounts string订单优惠金额,非优惠code金额taxes_included boolean是否为含税订单,默认为falsetotal_shipping_price string运费,精度为2的dubbo字符串shipping_addressobject required
收货人地址信息address1 string收货人详细地址(最大255个字符)address2 string收货人详细地址附加(最大255个字符)area string收货人区县名称(最大64个字符)area_code string收货人区县编码city string收货人城市名称(最大64个字符)city_code string收货人城市编码company string公司名称country string收货人国家名称(最大64个字符)country_code string国家或地区,请参考国家代码email string收货人联系邮箱first_name string收货人名(最大64个字符)last_name string收货人姓(最大64个字符)latitude string纬度longitude string经度phone string收货人联系方式(最大32个字符)province string收货人省(最大64个字符)province_code string收货人省编码zip string邮编transactionsobject required
支付单信息channel_code string废弃字段,请勿使用id string支付方式id
响应
- 200
- 401
- 429
更多状态码信息请参考 HTTP 状态码
响应头
traceId
traceId
响应体
orderobject
订单信息adjust_price string调整金额adjust_price_setobject
调整金额presentment_moneyobject
买家侧金额信息amount string金额currency_code string币种shop_moneyobject
卖家侧金额信息amount string金额currency_code string币种billing_addressobject
账单地址信息address1 string详细地址1address2 string详细地址2,备选city string城市company string公司名称country string国家country_code string国家码first_name string姓last_name string名phone string电话province string省份province_code string省份码zip string邮编created_at string订单创建时间(格式见IOS8601)currency string交易币种current_subtotal_price string当前商品总和,商品总价*数量current_subtotal_price_setobject
当前商品总和多币种信息, 买卖家币种和金额一致presentment_moneyobject
买家侧币种amount string金额currency_code string币种shop_moneyobject
卖家侧币种amount string金额currency_code string币种current_total_discounts string折扣总和,精度2,营销优惠+人工折扣current_total_discounts_setobject
presentment_moneyobject
买家侧金额amount string金额currency_code string币种信息shop_moneyobject
卖家侧金额amount string金额currency_code string币种信息current_total_price string当前订单总额,取值逻辑:商品总额 - 优惠总额 + 运费 + 税费current_total_price_setobject
当前订单总额多币种信息,买卖家币种和金额一致presentment_moneyobject
买家侧金额amount string金额currency_code string币种信息shop_moneyobject
卖家侧金额amount string金额currency_code string币种信息current_total_tax string税费总和,商品税 + 运费税current_total_tax_setobject
税费总和多币种信息, 买卖家币种和金额一致presentment_moneyobject
买家侧金额amount string币种信息currency_code string币种信息shop_moneyobject
卖家侧金额amount string币种信息currency_code string币种信息customerobject
买家信息area_code string手机区号currency string币种email string用户邮箱first_name string名id string用户idlast_name string姓phone string用户手机号deduct_member_point_amount string当前订单会员积分抵扣金额discount_codesobject
优惠码信息amount string优惠金额,精度2code string优惠码type string优惠类型,减金额;打折;免运费;固定售价;最低价商品免费;打包价;第N件打折;email string买家邮箱financial_status string支付状态,unpaid,authorized, pending,partially_paid,paid,partially_refunded,refundedid string系统订单号line_itemsobject[]
订单商品快照信息attribute string商品属性:名称 - 属性值 多个以逗号", "分割 如:颜色 - 红色, 尺寸 - Xid string商品快照表的id, 系统生成,与订单号唯一确认一个商品image_url string商品图片name stringsku标题,同titleprice string商品售价,精度2product_id stringspu序列号propertiesobject[]
商品定制信息name string自定义属性名称type string属性类型, text-字符,展示格式为 name: value; picture-图片,展示类型为 name: 通过urls获取渲染出缩略图;link-超链,展示类型为 name: value,支持点击链接跳转 到urls第一个urls stringurl资源列表value string自定义属性值quantity integer订单中的商品数量requires_shipping boolean是否需要发货sku string商品码,barCodetags string商品标签(多个逗号隔开)tax_linesobject[]
税费信息name string税费名称price string税费,精度2price_setobject
税费多币种信息presentment_moneyobject
买家侧币种amount string金额currency_code string币种shop_moneyobject
卖家侧币种amount string金额currency_code string币种rate double税率title string税费描述taxable boolean是否收税title string商品标题variant_id string商品sku序列号variant_title string商品属性值, 多个以" / "分割, 如: “155 / 红色 / 大"vendor string供应商name string自定义订单号note string商家备注内容note_attributesobject[]
附加信息name string名称value string值order_status_url string订单状态页urlpayment_detailsobject[]
支付单信息pay_amount string支付金额pay_channel string支付渠道pay_channel_deal_id string外部渠道支付流水号pay_seq string支付单号pay_status string支付单状态phone string买家联系方式presentment_currency string买家侧币种shipping_addressobject
收货地址address1 string详细地址1address2 string详细地址2,备选city string城市company string公司名称country string国家country_code string国家码district string区district_code string区编码first_name string姓last_name string名latitude string纬度longitude string经度phone string电话province string省份province_code string省份码zip string邮编status string订单状态 open=处理中,cancelled-已取消subtotal_price string商品折后价总和, 商品总价 - 营销优惠 - 人工折扣subtotal_price_setobject
商品折后价总和多币种信息presentment_moneyobject
买家侧金额信息amount string金额currency_code string币种shop_moneyobject
卖家侧金额信息amount string金额currency_code string币种tax_linesobject[]
税费信息name string税费名称price string税费,精度2price_setobject
税费多币种信息presentment_moneyobject
买家侧金额信息amount string金额currency_code string币种shop_moneyobject
卖家侧金额信息amount string金额currency_code string币种rate double税率title string税费描述tax_number string税号tax_type string税号类型taxes_included boolean总计额是否包含税额total_discounts string折扣总额,营销优惠+人工折扣total_discounts_setobject
折扣总额多币种信息presentment_moneyobject
买家侧金额信息amount string金额currency_code string币种shop_moneyobject
卖家侧金额信息amount string金额currency_code string币种total_line_items_price string商品原价总和,精度2total_line_items_price_setobject
商品原价总和,多币种信息presentment_moneyobject
卖家侧金额信息amount string金额currency_code string币种shop_moneyobject
卖家侧金额信息amount string金额currency_code string币种total_outstanding string未付款金额总和,精度2total_shipping_price_setobject
订单运费总和,多币种信息presentment_moneyobject
买家侧金额信息amount string金额currency_code string币种shop_moneyobject
卖家侧金额信息amount string金额currency_code string币种total_tax string税费总和,精度2, 商品税 + 运费税total_tax_setobject
税费总和,多币种信息presentment_moneyobject
买家侧金额信息amount string金额currency_code string币种shop_moneyobject
卖家侧金额信息amount string金额currency_code string币种total_tip_received string小费,精度2total_weight string商品总重量(g)
API Explorer
调试台
示例代码
这篇文章对你有帮助吗?
Error loading component.