首页 - Order - API
最后修改: 2019-07-02 10:10:25
编辑订单
编号 : orderEdit
POST - http://域名/api-erp-orderEdit.html
修改网站的某一个订单的内容,例如发货的商品,地址等。当订单发货后无法再进行修改
请求参数
参数名 | 参数类型 | 必传 | 缺省值 | 描述 |
---|---|---|---|---|
token | VARCHAR | Y | ||
itemno | VARCHAR | Y | 订单编号 | |
outer_itemno | VARCHAR | Y | 分销商订单编号 | |
order_item_cover | INT | Y | 覆盖订单的商品内容,1为 不保存 | |
order | 订单编号 | Y | 订单修改内容, JSON | |
order_address | 订单编号 | Y | 订单地址, JSON | |
order_item | 订单编号 | Y | 订单的商品内容, JSON |
返回值
修改成功:{"code":0,"status":1,"msg":""} 错误代码: ITEMNO_ERROR: 订单号错误 ORDER_STATUS_ERROR: 订单已发货,不可更改 ADDRESS_ERROR:{} 地址的明细字段不能为空,其中国家代码必须是标准2位 SKU_CODENO_ERROR:{} SKU编号不存在
备注
itemno, outer_itemno : 订单编号或者分销商编号,必须至少提供一个 order_item_cover: 是否直接覆盖订单。当为0时候,首次订单修改API触发时候,会将原来订单的商品数量复制到备注字段,例如:original quantity:3。 方便管理员或者买家核对之前下的订单。如果回推的商品是原订单没有,备注会显示 new added。如果回推的商品是原订单有,会更新购买数量。其他已经删除的商品,数量将会显示为0。 order_address: 地址的JSON,可以留空。 order_item: 新订单的商品JSON,可以留空。如果要修改必须提供订单的全部订购商品。SKU编号必须存在 order: 订单的部分信息,可以留空。 提交范例: $_POST order {"cost_shipping":10,"cost_insurance":2.5,"cost_offer":0} cost_shipping运费, cost_insurance运费险, cost_offer优惠金额 order_item [{"sku_codeno":"LC27768-9S","buy_num":3},{"sku_codeno":"LC27768-9M","buy_num":10},{"sku_codeno":"LC22248-3","buy_num":5}] 二位数组的JSON。sku_codeno是SKU编号,buy_num是订购数量 itemno DN20171107210455 order_address {"first_name":"noven","last_name":"hong","country_code_2":"MX","state":"fuj","city":"xiamen","address":"guanyanshan","postcode":"000000","mobilephone":"18649942017","telephone":"18649942017","email":"527305988@qq.com"} 不留空则必须每项都提交first_name, last_name, address, city, state, country_code_2, postcode, mobilephone。 telephone(telephone 是一个综合字段,可能是 电话/whatsapp/Compnay Name),email 可以选填
最后修改: 2018-01-17 13:47:04
单据流水
编号 : paymentList
POST - http://域名/api-erp-paymentList.html
返回付款流水单据
请求参数
参数名 | 参数类型 | 必传 | 缺省值 | 描述 |
---|---|---|---|---|
token | VARCHAR | Y | ||
status | INT | N | 0是未支付,1是已支付 |
最后修改: 2018-01-17 13:46:52
发货单据
编号 : deliveryList
POST - http://域名/api-erp-deliveryList.html
获取所有的发货物流单号
请求参数
参数名 | 参数类型 | 必传 | 缺省值 | 描述 |
---|---|---|---|---|
token | VARCHAR | Y | ||
page_size | INT | Y | 每页数量 | |
page_no | INT | Y | 页码 | |
max_id | INT | N | 从max_id开始 |
返回值
{"code":0,"count":"32","data":[{"0":"55","id":"55","1":"24073","store_id":"24073","2":"479","order_id":"479","3":"107","user_id":"107","4":"UPS95338","delivery_no":"UPS95338","5":"28","shipping_corp_id":"28","6":"UPS","shipping_corp_name":"UPS","7":"0.0000","shipping_cost":"0.0000","8":"1472024733","create_time":"1472024733","9":"0","delivery_time":"0","10":"ups\u5c3d\u5feb\u53d1\u8d27","remark":"ups\u5c3d\u5feb\u53d1\u8d27"},{"0":"54","id":"54","1":"24073","store_id":"24073","2":"454","order_id":"454","3":"63","user_id":"63","4":"test123","delivery_no":"test123","5":"30","shipping_corp_id":"30","6":"EMS","shipping_corp_name":"EMS","7":"0.0000","shipping_cost":"0.0000","8":"1472019590","create_time":"1472019590","9":"0","delivery_time":"0","10":"666","remark":"666"}]}
备注
id : 数据库自增ID store_id : 店铺ID order_id : 订单数据库ID user_id : 会员数据库ID delivery_no : 发货单号 shipping_corp_id : 物流公司ID shipping_corp_name : 物流公司名称 shipping_cost : 费用 create_time : 发货单创建时间 delivery_time : 发货时间 remark : 发货备注
最后修改: 2021-08-20 16:32:44
订单状态
编号 : orderStatus
POST - http://域名/api-erp-orderStatus.html
通过JSON批量更新订单的状态
请求参数
参数名 | 参数类型 | 必传 | 缺省值 | 描述 |
---|---|---|---|---|
token | VARCHAR | Y | ||
status_res | VARCHAR | Y | JSON结构 |
返回值
{"code":0,"msg":[{"itemno":"SY20160912-xxx","msg":"order_404"}]}
备注
1 status_res的JSON结构范例:[{"itemno":"SY20160901-593","status":200,"transaction_id":"SD3232323DD","receive_account":"test@paypal.com","payment_method":"paypal"},{"itemno":"SY20160912-xxx","status":700}] 2 当msg不为空,表示有更新不成功的订单 3 itemno表示订单编号,必须存在。status 表示备注内容,不能为空 4 transaction_id 订单交易流水号(当status为200时起作用) 5 receive_account 收款账号(选填) 6 payment_method 支付方式(选填) 7 100:新订单,102:订单确认中,200:付款成功,600:作废,700:完成 8 可一次性推送多条数据,最多不超过20个(由于需要触发邮件)
最后修改: 2018-01-17 13:46:41
订单备注
编号 : orderRemark
POST - http://域名/api-erp-orderRemark.html
通过JSON批量添加订单的备注
请求参数
参数名 | 参数类型 | 必传 | 缺省值 | 描述 |
---|---|---|---|---|
token | VARCHAR | Y | ||
remark_res | VARCHAR | Y | JSON结构 |
返回值
{"code":0,"msg":[{"itemno":"SY20160901-593","msg":"success"},{"itemno":"SY20160912-xxx","msg":"order_404"}]}
备注
1 remark_res的JSON结构范例:[{"itemno":"SY20160901-593","remark":"remark test 001"},{"itemno":"SY20160912-xxx","remark":"remark test 002"}] 2 当msg不为空,表示有更新不成功的订单 3 itemno表示订单编号,必须存在。remark 表示备注内容,不能为空 4 可一次性推送多条数据,最多不超过20个(由于需要触发邮件)
最后修改: 2023-07-25 14:05:11
订单发货
编号 : orderShip
POST - http://域名/api-erp-orderShip.html
通过JSON批量处理订单发货
请求参数
参数名 | 参数类型 | 必传 | 缺省值 | 描述 |
---|---|---|---|---|
token | VARCHAR | Y | ||
shipno_res | VARCHAR | Y | JSON结构 |
返回值
{"code":0,"msg":[{"itemno":"SY20160901-593","msg":"success"},{"itemno":"SY20160912-596","msg":"order_status_limit"}]}
备注
1 shipno_res的JSON结构范例: [{"itemno":"SY20160901-593","delivery_no":"LN00000000","shipping_corp_codeno":"","shipping_corp_name":"DHL","remark":"","remark_user":""},{"itemno":"SY20160912-596","delivery_no":"LN00111111","shipping_corp_codeno":"","shipping_corp_name":"FEDEX"}] 2 当msg不为空,表示有更新不成功的订单 3 itemno表示订单编号,必须存在。delivery_no表示物流单号,不能为空 shipping_corp_codeno跟shipping_corp_name不能同时为空,如果shipping_corp_codeno填写将去读取该编号物流公司作为发货物流。 正常情况下,请使用shipping_corp_name,并将shipping_corp_codeno留空 remark 可选字段,后台备注 remark_user 可选字段,备注用户可见 4 只有已付款,已发货的订单才能进行发货操作 5 可一次性推送多条数据,最多不超过20个(由于需要触发邮件)
最后修改: 2022-05-31 10:10:33
获取订单
编号 : orderList
POST - http://域名/api-erp-orderList.html
获取网站的所有订单
请求参数
参数名 | 参数类型 | 必传 | 缺省值 | 描述 |
---|---|---|---|---|
token | VARCHAR | Y | ||
order_by | INT | N | 排序。1:按照 pay_time 升序,0:按照 id 升序 | |
order_status | VARCHAR | N | 状态,多个用英文逗号隔开 | |
page_size | INT | N | 50 | 每页数量 |
page_no | INT | N | 1 | 页码 |
time_type | INT | N | 1: pay_time,留空: create_time , 2: act_time(修改时间) | |
start_time | DATE | N | 开始日期。2016-9-9 | |
end_time | DATE | N | 结束日期。2016-9-9 | |
itemno | VARCHAR | N | 订单编号,多个用英文逗号隔开 | |
payment_id | VARCHAR | N | 支付id,多个用英文逗号隔开 |
返回值
{"code":0,"count":"400","data":[{"0":"595","id":"595","1":"SY20160902-595","itemno":"SY20160902-595","2":null,"outer_itemno":null,"3":"24073","store_id":"24073","4":"6","user_id":"6","5":null,"user_name":null,"6":"100","order_status":"100","7":"100","payment_status":"100","8":"0","shipping_status":"0","9":null,"account_descript":null,"10":null,"system_descript":null,"11":null,"admin_descript":null,"12":"0.1300","total_weight":"0.1300","13":"1.0000","currency_rate":"1.0000","14":"136","shipping_id":"136","15":"SHUNFENG","shipping_method":"SHUNFENG","16":"0","shipping_corp_id":"0","17":"142","payment_id":"142","18":"Amazon Payment","payment_method":"Amazon Payment","19":"USD","currency_code":"USD","20":"1.8000","cost_product":"1.8000","21":"10.0000","cost_shipping":"10.0000","22":"0.1300","cost_payment":"0.1300","23":"1.0000","cost_insurance":"1.0000","24":"0.0000","cost_offer":"0.0000","25":"12.9300","total_amount":"12.9300","26":"45","country_id":"45","27":"2043462356","ip":"2043462356","28":"","remark":"","29":"0","marked":"0","30":"1472789032","create_time":"1472789032","31":"0","pay_time":"0","32":"0","act_time":"0","33":"phone","source_device":"phone","34":"","source":"","35":"","utm_source":"","36":"","utm_medium":"","shipping_corp_codeno":null,"item":[{"0":"780","id":"780","1":"595","order_id":"595","2":"4911","goods_id":"4911","3":"24073","store_id":"24073","4":"Low Rise Flowery Legging","goods_name":"Low Rise Flowery Legging","5":"LC79246","goods_codeno":"LC79246","6":"17028_17122","sku_code":"17028_17122","7":"LC79246S","sku_codeno":"LC79246S","8":"Color:As shown<br />Size:S","sku_value":"Color:As shown<br />Size:S","9":"1","buy_num":"1","10":"1.8000","price":"1.8000","11":"0.1300","weight":"0.1300","12":"http://cn01.imgcdn.ymcart.com/24073/2016/07/18/a/a/aae1d529a581e72a.jpg","image":"http://cn01.imgcdn.ymcart.com/24073/2016/07/18/a/a/aae1d529a581e72a.jpg","13":"","remark":""}],"delivery":null,"address":[{"0":"593","id":"593","1":"595","order_id":"595","2":"24073","store_id":"24073","3":"1","address_type":"1","4":"cqz","first_name":"cqz","5":"","last_name":"","6":"45","country_id":"45","7":"fujian","state":"fujian","8":"xiamen","city":"xiamen","9":"tian rui 99","address":"tian rui 99","10":"","address_spare":"","11":"361004","postcode":"361004","12":"1541441","mobilephone":"1541441","13":"","telephone":"","14":"1602279268@qq.com","email":"1602279268@qq.com","country_code_2":"CN","country_code_3":"CHN","country_name":"China"}]}]}
备注
order_status 允许的值如下 100新订单,101付款失败,102付款确认中,200付款成功,301已发货,600作废,700完成 id : 数据库自增ID itemno : 订单号 outer_itemno : 分销商编号 store_id : 店铺id user_id : 下单用户id user_name : 下单用户名 order_status : 订单状态 (100新订单,101付款失败,102付款确认中,200付款成功,301已发货,600作废,700完成) payment_status : 订单支付状态 (100未付款 101付款失败 102确认中 200已支付) shipping_status : 订单配送状态(0未发货 301已发货) account_descript : 会员描述 system_descript : 系统描述 admin_descript: 管理员描述 total_weight : 重量(kg) currency_rate : 汇率 shipping_id : 配送方式ID shipping_method : 配送方式 shipping_corp_id : 物流公司id payment_id : 支付方式ID payment_method : 支付方式 currency_code : 货币 cost_product : 商品金额 cost_shipping : 运费金额 cost_payment : 支付手续费 cost_insurance : 运费险 cost_offer : 优惠金额 total_amount : 订单总金额(小计+运费) country_id : 国家ID ip : 下单客户ip remark : 订单备注 marked : 订单标记 create_time : 订单创建时间 pay_time : 订单支付时间 act_time : 最后操作时间 source_device : 来源设备 source : 订单来源 utm_source : 业务来源 utm_medium : 业务设备 shipping_corp_codeno : 物流公司编号 item : 订单详细列表 { id : 数据库自增id order_id : 订单id goods_id : 商品id store_id : 店铺id goods_name : 商品名称 goods_codeno : 商品编号 sku_code : SKU系统编码 sku_codeno : SKU编号 sku_value : 购买的商品SKU规格值 buy_num : 购买数量 price : 商品单价 weight : 商品重量(kg) image : 商品主图 remark : 商品备注 old_price : 商品原价 user_id : 会员ID category_id : 分类ID } delivery : 物流信息 address : 会员详细信息 { id : 数据库自增id order_id : 订单id store_id : 店铺id address_type : #0配送地址 #1账单地址 first_name : 名字 last_name : 姓氏 country_id : 国家ID state : 洲/省份 city : 城市 address : 地址 address_spare : 备用地址 postcode : 邮编 mobilephone : 移动电话 telephone : telephone 是一个综合字段,可能是 电话/whatsapp/Compnay Name email : 电子邮箱 country_code_2 : 国家两位编码 country_code_3 : 国家三位编码 country_name : 国家名称 } user:用户列表 { id base_name: 登陆用户名 store_id:语言站点ID contact :附属联系方式 status:状态 user_group_id:账户组别 ip : 会员IP source:来源 country_id:国家ID create_time source_device:来源设备 is_cart:是否有购物车 utm_source: utm_medium:来源标识(比如link) login_time:来源信息(比如链接) order_time:下单时间 pay_time:支付时间 admin_id:管理员ID credit:预留字段(用于提取现金) growth:成长值数 } payment:订单支付单据列表 { trade_no:交易单号 pay_method_no:第三方支付单号 create_time:创建时间 payment_id:支付方式ID remark:备注 order_id:订单ID payment_method:支付方式 } offer:订单优惠列表 { id order_id:订单 store_id:语言站点ID offer_id:父ID base_name:优惠名称 offer_type:优惠类型 coupon:优惠券号 如无则为空 remark:备注 amount:优惠金额,赠品按赠品销售价- price is_return: } order_remark:订单备注 { id order_id:订单 store_id:语言站点ID remark:备注 create_time } order_other_info: 订单其它信息 [ { name: 名称 value:对应值 }, ...... ]