Communication Custom Order Quotation Acceptance Interface

Precautions

  • This interface uses the POST method and requires data to be submitted in application/ format
  • Access requires user login
  • Order status is pending payment, waiting for user to pay
  • Orders can be created by product ID or product detail list
  • This interface has the same parameters as the order creation interface, and is specifically used to accept customized orders

Request address

{域名地址}/api/communication/order/accept

Description:{域名地址}Need to replace it with your domain address, such ashttps://en.anqicms.com/api/communication/order/accept

Request syntax

POST {域名地址}/api/communication/order/accept
Content-Type: application/json

Request header

This interface also involves common request headers. For more information, please seeCommon Request Headers (Common Request Headers).

Request Parameters

Field Name Type Required Description
goods_id integer No Product ID, can be used when placing an order for a single product
quantity integer No Product Quantity, can be used when placing an order for a single item
goods_sku_id integer No SKU ID, can be used when placing an order for a single item
details object[] No Multiple product information, either goods_id or details must be provided
remark string No Order notes
type string No Order type, goods or vip
coupon_code string No Voucher code
coupon_code_id integer No Voucher code ID
coupon_id integer No Coupon ID, discount type coupon
address object No recipient address information

details item parameters

Field Name Type Required Description
goods_id integer Yes Product ID
quantity integer Yes quantity of goods

address parameters

Field Name Type Required Description
id integer No Address ID
name string Yes Recipient
phone string Yes Phone Number
province string Yes province
city string Yes City
Country string Yes District
Address Information string Yes Detailed Address
postcode string Yes Postal Code

Response Headers

This interface only involves public response headers. More information, please refer toCommon Request Headers (Common Request Headers).

Return parameters

Field Name Type Description
code integer Error code
message string Error Description
data object Order Information

Data result parameters

Field Name Type Description
id integer Order ID
order_id string Order Number
payment_id string Payment Transaction ID
user_id integer User ID
remark string Order notes
type string Order Type
origin_amount integer Order Original Total Amount
amount integer Order Actual Total Amount
paid_time integer Payment Time
End Time integer Expected Order Auto Completion Time
Delivery Time integer Shipping Time
finished_time integer Order completion time
Discount amount integer Discount amount
Seller ID integer seller ID
seller amount integer seller's profit
share user ID integer promoter ID
share_parent_user_id integer Promoter's Superior ID
share_amount integer Promoter's Earnings
share_parent_amount integer Promoter's superior income
express_company string Courier company
tracking_number string Express delivery tracking number
created_time integer Order timestamp
updated_time integer update timestamp
status integer Order status: -1 Cancelled, 0 Pending payment, 1 Paid, 2 Shipped, 3 Completed, 8 Refunding, 9 Refunded
Refund status integer Refund status: -1 Refund failed, 0 None or in progress, 1 Refunded

Example Usage

Request Example

POST /api/communication/order/accept HTTP/1.1
Host: www.anqicms.com
Content-Type: application/json

{
  "goods_id": 188,
  "quantity": 1,
  "type": "goods",
  "remark": "定制商品订单"
}

Response Example

{
  "code": 0,
  "msg": "",
  "data": {
    "id": 46,
    "created_time": 1669212548,
    "updated_time": 1669212548,
    "order_id": "202211232209080046",
    "payment_id": "",
    "user_id": 1000,
    "address_id": 0,
    "remark": "定制商品订单",
    "type": "goods",
    "status": 0,
    "refund_status": 0,
    "origin_amount": 9900,
    "amount": 9900,
    "paid_time": 0,
    "end_time": 0,
    "deliver_time": 0,
    "finished_time": 0,
    "discount_amount": 0,
    "seller_id": 15,
    "seller_amount": 7920,
    "share_user_id": 0,
    "share_parent_user_id": 0,
    "share_amount": 0,
    "share_parent_amount": 0,
    "express_company": "",
    "tracking_number": ""
  }
}

Error Code

Error code Description
0 OK
-1 Error, the reason is indicated in msg
1001 Not logged in
1002 Unauthorized
200 API request OK