查询指定客户订单
GET https://{handle}.myshopline.com/admin/openapi/v20260301/customers/:id/orders.json
handle :店铺的唯一标识符,值为店铺域名的前缀。例如,域名为 open001.myshopline.com 的店铺,其 handle 是 open001 。支持通过该接口查询指定客户下的全部订单信息
路径参数
- id string required客户id例子:
2002697754
查询参数
- fields string要查询的字段,逗号分隔,不传查所有的字段信息,目前全部字段返回例子:
id - limit integer查询数量限制,默认50,不能超过100例子:
10 - page_info string分页查询的唯一标识,用于定位特定页面。该字段值需要在你已经查询完分页信息后,在该接口响应头中的
link字段值中获取。例如,你获取到的link的值为<https://{handle}.myshopline.com/admin/openapi/{version}/customers/:id/orders.json?limit=1&page_info=eyJzaW5jZUlkIjoiMTYwNTc1OTAxNTM4OTA4Mjk1MjExMTI3ODgiLCJkaXJlY3Rpb24iOiJuZXh0IiwibGltaXQiOjF9>; rel="next",那么page_info的值为eyJzaW5jZUlkIjoiMTYwNTc1OTAxNTM4OTA4Mjk1MjExMTI3ODgiLCJkaXJlY3Rpb24iOiJuZXh0IiwibGltaXQiOjF9。关于更多如何使用分页信息,请参考 分页机制。例子:eyJxdWVyeVBhcmFtU3RyaW5nIjoie1wic2l6ZVwiOjEsXCJzb3J0XCI6W1widWlkOmRlc2NcIl0sXCJzdG9yZUlkXCI6XCIxNjM5NjQwNTgxMzQ2XCIsXCJ1aWRcIjpcIjBcIixcImNyZWF0ZVRpbWVcIjpcIjw9MTY0OTg1NTYwMDAwMFwiLFwidXBkYXRlVGltZVwiOlwiXCJ9Iiwic2luY2VJZExpc3QiOlsiNDIwMTY4MDE5NSJdLCJwYWdlIjoyLCJzaXplIjoxLCJpbml0U29ydCI6WyJ1aWQ6ZGVzYyJdLCJzb3J0IjpbInVpZDpkZXNjIl0sImRpcmVjdGlvbiI6Im5leHQifQ - since_id string要查询的数据的订单号id的起始位置例子:
21050224312121887324667162 - status string required订单状态,open-处理中,cancelled-已取消,any-包 含任何状态,包含已归档例子:
any
请求头
- Content-Type string required字段值固定为
application/json; charset=utf-8。 - Authorization string required资源的访问令牌。参考 应用授权 获取访问令牌,然后将获取到的访问令牌以 Bearer 格式传入。例子:
Bearer eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiJmMjM3OWQyMTYyOGMzM2QxMWRiMWZkYjY5N2EzZjdjMjZlNGMwYTA5Iiwic2VsbGVySWQiOiIyMDAwMjM0ODgwIiwic3RvcmVJZCI6IjE2NzIzNjk3Mjk2MDYiLCJ2ZXJzaW9uIjoiVjIiLCJkb21haW4iOiJodHRwczovL3NsLW9wZW4tc2cubXlzaG9wbGluZS5jb20iLCJ0aW1lc3RhbXAiOjE2NzUzMTk0OTI0MzksImlzcyI6Inlzb3VsIiwiZXhwIjoxNzY5OTI3NDkyfQ.UwQzomM2veGCUaOZ0paUxq5dpc7DXuhHYFvsQ_uIAKduzWcb_j2E4q_36El83sp145D4cKbpcE5KCeeIz-JNQw
状态码
- 200
- 401
- 422
- 429
更多状态码信息,参考 HTTP 状态码。
响应头
link
提供分页数据的 URL 链接。你可以获取该字段值中的page_info信息用于下一次分页请求中。当你请求的页面存在上一页或下一页的时候,该字段会被返回。关于更多如何使用分页信息,请参考 分页机制。traceId
请求的全局唯一标识符。用于追踪请求在系统中的流转,以便于问题发生时进行定位和调试。
响应体
listobject[]
订单信息列表total_tip_received string小费,精度2例子:234user_id string买家id例子:2002697754refundsobject[]
退款列表refund_line_itemsobject[]
退款详细信息subtotal double退款金额合计,精度2例子:23subtotal_setobject
退款金额合计,多币种信息,卖家和买家侧相同presentment_moneyobject
买家侧币种amount string金额,精度2例子:34currency_code string币种例子:CNyshop_moneyobject
卖家侧金额信息amount string金额,精度2例子:544currency_code string币种例子:CNYtotal_tax double退款商品的税额,精度2例子:33id string退款单号例子:42323524353total_tax_setobject
总税额,多币种信息presentment_moneyobject
买家侧币种currency_code string币种例子:CNYamount string金额,精度2例子:43shop_moneyobject
卖家侧金额信息amount string金额,精度2例子:243currency_code string币种例子:CNYline_item_id string商品快照表的id, 系统生成,与订单号唯一确认一个商品例子:2343535325restock_type string库存返还类型,no_restock-未返还,cancel-取消, return-返还 只有未返还例子:cancelline_itemobject
描述fulfillable_quantity integer可发货数量例子:3fulfillment_status string商品的发货状态, 发货状态, fulfilled-已发货; partial-部分发货; null-未发货;例子:fullfilledproduct_id stringspu序列号例子:42342352435325sku string商品码,barCode例子:32424324variant_id string商品sku序列号例子:23424235235id string商品快照表的id, 系统生成,与订单号唯一确认一个商品例子:432434325image_url string商品图片例子:https://dsfaf.comtitle string标题例子:airpropertiesobject[]
商品定制信息name string自定义属性名称例子:sizetype string属性类型, text-字符,展示格式为 name: value; picture-图片,展示类型为 name: 通过urls获取渲染出缩略图;link-超链,展示类型为 name: value,支持点击链接跳转 到urls第一个例子:pictureurls arrayurl资源列表例子:["https://asdfasfsaf.com"]value string自定义属性值例子:big sizevariant_title string商品属性值, 多个以" / "分割, 如: “155 / 红色 / 大"例子:redgrams double重量(克)例子:33taxable boolean是否收税例子:truequantity integer订单中的商品数量例子:2tags string商品标签(多个逗号隔开)例子:big,redtax_linesobject[]
税费信息price_setobject
税费多币种信息presentment_moneyobject
买家侧币种amount string金额例子:4234currency_code string币种例子:CNYshop_moneyobject
卖家侧币种currency_code string币种例子:CNyamount string金额例子:3546rate double税率例子:4title string税费名称例子:googsprice string税费,精度2例子:8attribute string商品属性:名称 - 属性值 多个以逗号", "分割 如:颜色 - 红色, 尺寸 - X例子:redname stringsku标题,同title例子:goodprice string商品售价,精度2例子:23requires_shipping boolean是否需要发货例子:truefulfillment_service string物流商名称例子:EMSgift_card boolean是否为礼品卡商品vendor string供应商例子:alibabaquantity integer数量,商品数量例子:2user_id string用户id例子:22034092order_adjustmentsobject[]
调整单信息refund_id string退款单id例子:43254325325325tax_amount_setobject
调整单税费金额presentment_moneyobject
店铺调整单展示税费金额amount double店铺调整单展示税费金额例子:43currency_code string店铺调整单展示税费金额例子:CNYshop_moneyobject
店铺调整单税费金额amount double店铺调整单税费金额例子:434currency_code string店铺调整单税费币种例子:CNyamount string调整单金额例子:34id string退款调整单id例子:werwqrwqrqwrorder_id string订单号例子:423343254235reason string调整原因例子:no reasontax_amount string调整单税费金额例子:44amount_setobject
调整单金额presentment_moneyobject
店铺调整展示金额currency_code string店铺调整展示金额币种例子:CNyamount double店铺调整展示金额例子:44shop_moneyobject
店铺调整金额amount double店铺调整金额例子:34currency_code string店铺调整金额币种例子:CNYkind string调整单类型例子:nonetransactionsobject[]
退款交易信息processed_at string更新时间例子:2021-08-16T08:27:57+00:00id string退款id例子:123424252435amount string退款金额,精度2例子:34created_at string创建时间例子:2021-08-16T08:27:57+00:00currency string币种例子:CNyorder_id string订单号例子:234535235325user_id string用户id例子:22032949status string处理状态, pending, failure, success, and error例子:successkind string交易类型(authorization, capture, sale, void, refund)例子:salenote string退款备注例子:noneprocessed_at string更新时间 (格式见IOS8601)例子:2021-08-16T08:27:57+00:00created_at string退款单创建时间 (格式见IOS8601)例子:2021-08-16T08:27:57+00:00id string退款id例子:2342353425235order_id string订单号例子:54325235235442354tax_type string税号类型例子:1name string自定义订单号例子:1037updated_at string订单更新时间,(格式见IOS8601)例子:2012-05-01T14:22:25-04:00financial_status string支付状态,unpaid,authorized, pending,partially_paid,paid,partially_refunded,refunded例子:paidtax_number string税号例子:12342421412email string买家邮箱例子:hok@shoplineapp.comcustomerobject
买家信息id string用户id例子:223234928updated_at string买家更新时间例子:2021-08-16T08:27:57+00:00area_code string手机区号例子:0086currency string币种例子:CNYemail string用户邮箱例子:267347264@163.comaddressesobject
买家地址信息address1 string详细地址1例子:department1last_name string姓例子:Jamesname string全名例子:Bob Jamesaddress2 string详细地址2,备选例子:department2country string国家例子:chinaprovince string省份例子:guangdongcity string城市例子:guangzhoushicity_code string城市码例子:440113country_code string国家码例子:CNfirst_name string名例子:Bobprovince_code string省份码例子:440000phone string电话例子:008613877763452zip string邮编例子:523424created_at string买家创建时间例子:2021-08-16T08:27:57+00:00first_name string名例子:Boblast_name string姓例子:Jamesphone string用户手机号例子:008615087675643total_shipping_price_setobject
订单运费总和,多币种信息presentment_moneyobject
买家侧金额信息amount string金额,精度2例子:234currency_code string币种例子:CNYshop_moneyobject
卖家侧金额信息amount string金额,精度2例子:2342currency_code string币种例子:CNYcurrent_subtotal_price_setobject
当前商品总和多币种信息, 买卖家币种和金额一致presentment_moneyobject
买家侧金额amount string金额,精度2例子:43currency_code string币种信息例子:CNYshop_moneyobject
卖家侧金额amount string金额,精度2例子:543currency_code string币种信息例子:CNYbuyer_note string买家留言例子:is goodhidden_order boolean是否是归档订单, true=已归档订单, false=未归档订单例子:truesubtotal_price_setobject
商品折后价总和多币种信息shop_moneyobject
店铺侧金额信息amount string金额,精度2例子:23currency_code string币种例子:CNYpresentment_moneyobject
买家侧金额信息amount string金额,精度2例子:34currency_code string币种例子:CNYtoken_infoobject
订单关联的购物车或结算页token信息cart_token string购物车token例子:423e23e2323echeckout_token string结算页token例子:e3e232e32ephone string电话号码例子:(555)555-5555total_line_items_price_setobject
商品原价总和,多币种信息presentment_moneyobject
买家侧金额信息currency_code string币种例子:CNYamount string金额,精度2例子:44shop_moneyobject
卖家侧金额信息amount string金额,精度2例子:12currency_code string币种例子:CNYtotal_discounts string折扣总额,营销优惠+人工折扣例子:34browser_ip string客户端ip例子:157.119.232.35current_total_discounts string折扣总和,精度2,营销优惠+人工折扣例子:0.0current_total_tax_setobject
税费总和多币种信息, 买卖家币种和金额一致shop_moneyobject
卖家侧金额amount string金额,精度2例子:4353currency_code string币种信息例子:CNYpresentment_moneyobject
买家侧金额amount string金额,精度2例子:453424currency_code string币种信息例子:CNYtotal_tax_setobject
税费总和,多币种信息presentment_moneyobject
买家侧金额信息amount string金额,精度2例子:67currency_code string币种例子:CNYshop_moneyobject
卖家侧金额信息amount string金额,精度2例子:75currency_code string币种例子:CNYtotal_outstanding string未付款金额总和,精度2例子:3422note string商家备注内容例子:good customershipping_addressobject
收货地址first_name string名例子:Bobcountry string国家例子:chinadelivery_store_name string门店名称例子:hellodistrict_code string区编码例子:440372country_code string国家码例子:CNname string全名例子:Bob Jamescompany string公司名称例子:joyydelivery_store_code string门店编码例子:341e32last_name string姓例子:Jamesprovince_code string省份码例子:440000zip string邮编例子:423443address1 string详细地址1例子:department1phone string手机号例子:008615098987462province string省份例子:guangdongcity_code string城市码例子:440100district string区例子:panyuquaddress2 string详细地址2,备选例子:department2city string城市例子:guangzhoushipayment_detailsobject[]
支付单信息payment_merchant_order_id string支付商户订单号例子:42323432424create_time string支付单创建时间例子:2021-08-16T08:27:57+00:00pay_amount double支付金额例子:45pay_channel_deal_id string外部渠道支付流水号例子:2344325435235235pay_seq string支付单号例子:56464645466pay_status string支付单状态, unpaid-未支付;pending-支付中;risking-风控中;paid-已支付;paid_overtime-支付失败;paid_failed-支付失败;例子:paidpayment_channel string支付渠道例子:onlinepayment_merchant_id string支付商户id例子:4234242e32esubtotal_price string商品折后价总和, 商品总价 - 营销优惠 - 人工折扣例子:43locationsobject[]
到店取货地点地址信息country string国家例子:chinadistrict string区/县例子:panyuprovince string省份例子:guangdongzip_code string邮编例子:430302town string乡/镇例子:dashilocation_seq string地址序列号例子:234423424234name string地址名称例子:wandaguangchangphone string电话例子:008615089765743address string详细地址1例子:department1city string城市例子:guangzhoushicountry_code string国家码例子:CNaddress_add string详细地址2例子:department2currency string交易币种例子:CNYshipping_linesobject[]
物流信息title string物流名称例子:EMScode string物流编号例子:e2342542354325discounted_price string折扣金额,精度2例子:2phone string电话例子:00861897657463price string物流运费,精度2例子:2price_setobject
物流运费多币种信息presentment_moneyobject
买家侧金额信息amount string金额,精度2例子:34currency_code string币种例子:CNYshop_moneyobject
店 铺侧金额信息amount string金额,精度2例子:34currency_code string币种例子:CNYrequested_fulfillment_service_id string运输服务代号例子:324242424tax_linesobject[]
物流征税列表price string税费例子:44price_setobject
税费多币种信息shop_moneyobject
店铺侧金额信息amount string金额,精度2例子:65currency_code string币种例子:CNYpresentment_moneyobject
买家侧金额信息amount string金额,精度2例子:54currency_code string币种例子:CNYrate double税率title string税费名称例子:goodsadjust_price_setobject
调整金额presentment_moneyobject
买家侧金额currency_code string币种信息例子:CNYamount string金额,精度2例子:45shop_moneyobject
卖家侧金额currency_code string币种信息例子:CNYamount string金额,精度2例子:45total_tax string税费总和,精度2, 商品税 + 运费税例子:234total_discounts_setobject
折扣总额多币种信息presentment_moneyobject
买家侧折扣信息amount string金额,精度2例子:45currency_code string币种例子:CNYshop_moneyobject
卖家侧折扣信息amount string金额,精度2例子:4353245currency_code string币种例子:CNYorder_status_url string订单状态页url例子:https//hhdghs.comid string系统订单号例子:21050224312121887324667162discount_codesobject[]
优惠码信息code string优惠码例子:43563type string优惠类型,减金额;打折;免运费;固定售价;最低价商品免费;打包价;第N件打折;例子:1amount string优惠金额,精度2例子:32created_at string订单创建时间(格式见IOS8601)例子:2021-08-16T08:27:57+00:00status string订单状态,open-处理中,cancelled-已取消,any-包含任何状态,包含已归档;例子:openorder_from string订单来源例子:admintax_linesobject[]
税费信息title string税费名称例子:goodsprice string税费例子:34price_setobject
税费多币种信息presentment_moneyobject
买家侧金额信息amount string金额,精度2例子:45currency_code string币种例子:CNYshop_moneyobject
卖家侧金额信息amount string金额,精度2例子:56currency_code string币种例子:CNYrate double税率例子:9taxes_included boolean总计额是否包含税额cancelled_at string订单取消时间(结束)(格式见IOS8601)例子:2012-05-01T14:22:25-04:00current_total_tax string税费总和,商品税 + 运费税例子:0.0presentment_currency string买家侧币种,同卖家侧币种例子:USDtotal_weight double商品总重量(g)例子:45current_total_price string当前订单总额,取值逻辑:商品总额 - 优惠总额 + 运费 + 税费例子:60.0tags string订单标签例子:returnclient_detailsobject
客户端详细信息browser_ip stringip地址例子:157.119.232.35session_hash stringsessionId例子:42343243253543user_agent string客户端代理例子:157.119.232.35current_subtotal_price string当前商品总和,商品总价*数量例子:78.0current_total_discounts_setobject
折扣总和多币种信息,没有多币种,所以买卖家币种和金额一致presentment_moneyobject
买家侧金额amount string金额,精度2例子:43currency_code string币种信息例子:CNYshop_moneyobject
卖家侧金额amount string金额,精度2例子:565435currency_code string币种信息例子:CNYservice string发货方式类型, pickUp表示到店取货.例子:pickUppayment_gateway_names array付款方式列表,该订单所用到的付款方式列表, SLpayments ,Paypal(PayPal支付), Oceanpay(钱海支付), TwoCheckout,AsiaBill, Stripe,Pacypay, WorldPay, COD(货到付款), CUSTOM(自定义), adjustPay(资金调整), Xendit(xendit信用卡), XenditOther例子:["Paypal"]total_line_items_price string商品原价总和,精度2例子:3432532532fulfillmentsobject[]
包裹信息order_id string订单号例子:543543654654657status string物流配送状态, success-已发货; cancelled-已取消;例子:successtracking_url string物流公司url例子:https//ems.hsh.comline_itemsobject[]
商品列表product_id stringspu序列号例子:23424242143214fulfillable_quantity integer可发货数量例子:3quantity integer订单中的商品数量例子:2tax_linesobject[]
税费信息rate double税率title string税费名称例子:gatewayprice string税费,精度2例子:33price_setobject
税费多币种信息presentment_moneyobject
买家侧金额amount string金额例子:34currency_code string币种例子:CNYshop_moneyobject
卖家侧金额信息amount string金额例子:533currency_code string币种例子:CNYvendor string供应商例子:alibabaname stringsku标题,同title例子:airtaxable boolean是否收税image_url string商品图片例子:https://imageaaa.comvariant_id string商品sku序列号例子:dsfsfsdffsdfprice string商品售价,精度2例子:43variant_title string商品属性值, 多个以" / "分割, 如: “155 / 红色 / 大"例子:redfulfillment_status string商品的发货状态, 发货状态, fulfilled-已发货; partial-部分发货; null-未发货;例子:fulfilledgrams double重量(克)例子:23sku string商品码,barCode例子:e2erwrwrwrattribute string商品属性:名称 - 属性值 多个以逗号", "分割 如:颜色 - 红色, 尺寸 - X例子:bigfulfillment_service string物流商名称例子:EMSid string商品快照表的id, 系统生成,与订单号唯一确认一个商品例子:4322424124214requires_shipping boolean是否需要发货例子:truetitle string商品标题例子:goodgift_card boolean礼品卡信息shipment_status string包裹状态例子:sendedtracking_number string第三方物流单号例子:43324523532535updated_at string更新时间例子:2021-08-16T08:27:57+00:00created_at string创建时间例子:2021-08-16T08:27:57+00:00tracking_company string物流公司名称例子:EMSid string包裹编号例子:4323245325235435fulfillment_status string发货状态, unshipped-未发货; partial-部分发货; shipped-已发货;例子:unshippedline_itemsobject[]
订单商品快照信息sku string商品码,barCode例子:4324325325345taxable boolean是否收税name stringsku标题,同title例子:goodfulfillment_status string商品的发货状态, 发货状态, fulfilled-已发货; partial-部分发货; null-未发货;例子:fulfilledgrams double重量(克)例子:324tax_linesobject[]
税费信息price_setobject
税费多币种信息shop_moneyobject
卖家侧币种currency_code string币种例子:CNYamount string金额例子:34534presentment_moneyobject
卖家侧币种amount string金额例子:43currency_code string币种例子:CNYrate double税率title string税费名称例子:goodsprice string税费,精度2例子:0vendor string供应商例子:alibabapropertiesobject[]
商品定制信息value string自定义属性值例子:bigname string自定义属性名称例子:sizetype string属性类型, text-字符,展示格式为 name: value; picture-图片,展示类型为 name: 通过urls获取渲染出缩略图;link-超链,展示类型为 name: value,支持点击链接跳转 到urls第一个例子:pictureurls arrayurl资源列表例子:["https://dsadasd.com"]quantity integer订单中的商品数量例子:3attribute string商品属性:名称 - 属性值 多个以逗号", "分割 如:颜色 - 红色, 尺寸 - X例子:redid string商品快照表的id, 系统生成,与订单号唯一确认一个商品例子:4324234535tags string商品标签(多个逗号隔开)例子:goodfulfillable_quantity integer可发货数量例子:2price string商品售价,精度2例子:32variant_title string商品属性值, 多个以" / "分割, 如: “155 / 红色 / 大"例子:redimage_url string商品图片例子:https://aaa.comproduct_id stringspu序列号例子:24344523543254325requires_shipping boolean是否需要发货title string商品标题例子:airfulfillment_service string物流商名称例子:EMSgift_card boolean是否为礼品卡商品variant_id string商品sku序列号例子:432424324current_total_price_setobject
当前订单总额多币种信息,买卖家币种和金额一致presentment_moneyobject
买家侧金额amount string金额,精度2例子:443currency_code string币种信息例子:CNYshop_moneyobject
卖家侧金额amount string金额,精度2例子:644currency_code string币种信息例子:CNYcustomer_locale string买家国家,语种编码+国家名称缩写例子:enCNnote_attributesobject[]
商家备注日志,日期内容create_time string备注创建时间(格式见IOS8601)例子:2021-08-16T08:27:57+00:00name string备注来源(卖家标识)例子:nonevalue string备注内容例子:hellocancel_reason string卖家取消原因例子:no reasonadjust_price string调整金额例子:34billing_addressobject
账单地址信息name string全名例子:Bob Jamesphone string手机号例子:008613987675643address2 string详细地址2,备选例子:department2country_code string国家码例子:CNlast_name string姓例子:Jameszip string邮编例子:539002address1 string详细地址1例子:department1company string公司名称例子:joyyprovince string省份例子:guangdongprovince_code string省份码例子:440000city string城市例子:guangzhoushicity_code string城市码例子:414000country string国家例子:chinafirst_name string名例子:Bob
API Explorer
调试台
示例代码
这篇文章对你有帮助吗?