商品订单接口
该接口用于创建或更新商品订单
请求方法
POST /customer_orders
请求参数(Query String)
| 参数名 | 类型 | 必填 | 说明 | 限制 | 
|---|---|---|---|---|
| type | 字符串 | 是 | 获取指定客户工单列表时必填,值详见 | |
| content | 字符串 | 是 | 获取指定客户工单列表时必填,值详见 | |
| order | 订单对象 | 是 | 订单信息 | 
order订单对象
| 参数 | 类型 | 是否必填 | 说明 | 
|---|---|---|---|
| order_no | string | 是 | 订单编号 | 
| name | string | 是 | 订单名称 | 
| url | string | 否 | 订单跳转链接 | 
| price | decimal | 是 | 订单价格 | 
| order_at | datetime | 是 | 下单时间 | 
| pay_at | datetime | 否 | 付款时间 | 
| status | string | 是 | 订单状态 | 
| remark | string | 否 | 备注 | 
| consignee_name | string | 否 | 收货人姓名 | 
| consignee_phone | string | 否 | 收货人电话 | 
| consignee_address | string | 否 | 收货地址 | 
| commodit_num | numeric | 否 | 商品总数量 | 
| commodities | Array | 否 | 商品信息Array(Ojbect) | 
选项名称及可选值说明
| option_name | 选项说明 | option_value | 选项值说明 | 
|---|---|---|---|
| status | 订单状态 | wait_pay | 待付款 | 
| paid | 已付款 | ||
| closed | 已关闭 | 
commodities商品信息对象
| 参数名 | 类型 | 必填 | 说明 | 
|---|---|---|---|
| commodit_name | string | 否 | 商品名称 | 
| commodit_no | string | 否 | 商品编号 | 
| commodit_count | numeric | 否 | 商品数量 | 
| commodit_fee | string | 否 | 商品价格 | 
返回数据
| 属性名 | 类型 | 说明 | 
|---|---|---|
| code | 整型 | 执行结果码,1000代表成功 | 
| customer_exists | Boolean | 客户在Udesk是否存在 | 
示例
请求
curl https://demo.udesk.cn/open_api_v1/customer_orders?email=admin@udesk.cn×tamp=1494474404&sign=6892f1b794071c260e1b1eac15df588fc919c9e86eb742affaa742ad6c03cb52&nonce=2d931510-d99f-494a-8c67-87feb05e1594&sign_version=v2
 \
-X PUT \
-H 'content-type:application/json' \
-d '
{
  "type": "id",
  "content": "8888",
  "order": {
      "order_no": "20190510",
      "name": "Apple iPhone X (A1903) 64GB",
      "url": "xxx",
      "price": 8888.8,
      "order_at": "2019-05-10 10:10:10",
      "pay_at": "2019-05-10 10:15:10",
      "status": "paid",
      "remark": "xxxx",
      "consignee_name": "张三",
      "consignee_phone": "01012345",
      "consignee_address": "北京市大兴区",
      "commodit_num": 88,
      "commodities": [
        {
          "commodit_name": "牛奶A",
          "commodit_no": "NO123456",
          "commodit_count": 1,
          "commodit_fee": "46.5"
        }
      ]
  }'
返回
{
    "code": 1000,
    "customer_exists": true
}