logo

Product Order Interface

This interface is used to create or update product orders.

Request Method

POST /customer_orders

Request Parameters (Query String)

Parameter NameTypeRequiredDescriptionRestrictions
typeStringYesRequired when retrieving a specified customer's order list, see values
contentStringYesRequired when retrieving a specified customer's order list, see values
orderOrder ObjectYesOrder information

Order Object

ParameterTypeRequiredDescription
order_noStringYesOrder number
nameStringYesOrder name
urlStringNoOrder redirect link
priceDecimalYesOrder price
order_atDateTimeYesOrder placement time
pay_atDateTimeNoPayment time
statusStringYesOrder Status
remarkStringNoNotes
consignee_nameStringNoConsignee name
consignee_phoneStringNoConsignee phone number
consignee_addressStringNoConsignee address
commodit_numNumericNoTotal number of products
commoditiesArrayNoProduct Information Array(Object)

Option Names and Values Description

option_nameOption Descriptionoption_valueOption Value Description
statusOrder Statuswait_payAwaiting Payment
paidPaid
closedClosed

Product Information Object

Parameter NameTypeRequiredDescription
commodit_nameStringNoProduct name
commodit_noStringNoProduct number
commodit_countNumericNoProduct quantity
commodit_feeStringNoProduct price

Response Data

Attribute NameTypeDescription
codeIntegerExecution result code, 1000 represents success
customer_existsBooleanWhether the customer exists in Udesk

Example

Request

curl https://demo.udesk.cn/open_api_v1/customer_orders?email=admin@udesk.cn&timestamp=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": "Zhang San",
      "consignee_phone": "01012345",
      "consignee_address": "Beijing Daxing District",
      "commodit_num": 88,
      "commodities": [
        {
          "commodit_name": "Milk A",
          "commodit_no": "NO123456",
          "commodit_count": 1,
          "commodit_fee": "46.5"
        }
      ]
  }'

Response

{
    "code": 1000,
    "customer_exists": true
}

This website employs cookies and associated technologies, as outlined in our privacy policy, to fulfill various objectives such as site functionality, analytics, improved user experience, or advertising. You have the option to either grant consent to our utilization of these technologies or customize your preferences accordingly.