Get distribution order list interface

Get the order list related to the distributor, supporting pagination query.

Points to note

  • This interface uses the GET method
  • The user needs to log in for verification (the current user must be a distributor)
  • Return the order list generated by the current distributor's promotion
  • Support pagination queries, can specify the current page number and the number of items per page
  • Containing order details, buyer information, and product information

Request address

{域名地址}/api/retailer/orders

Description:{域名地址}Replace it with your domain name, such ashttps://en.anqicms.com/api/retailer/orders

Request Syntax

GET {域名地址}/api/retailer/orders

Request Headers

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

Request parameters

Field name Type Required Description
current int No The current page number, default is 1
pageSize int No Number of items displayed per page, default is 10

Response header

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

Return parameters

Field name Type Description
code int Error code
msg string Error description
data object[] Distribution order list array
Total int Total number of records

data result item parameter

Field name Type Description
id int Order ID
order_id string Order Number
payment_id string Payment流水ID
user_id int User ID
remark string Order remarks
type string Order Type
original amount int Original order total price (unit: fen)
amount int Actual order total price (unit: fen)
Paid Time int Payment timestamp, 0 if not paid
End Time int Estimated automatic completion timestamp of the order
deliver_time int Shipment timestamp, 0 if not shipped
Finished Time int Order completion timestamp, 0 if not completed
Discount amount int Discount amount (in cents)
seller_id int seller ID
seller amount int Seller's profit (unit: points)
share user ID int Promoter ID (i.e., current distributor ID)
share_parent_user_id int Promoter's superior ID
Share amount int Promoter's profit (unit: points)
share_parent_amount int Promoter's superior's profit (unit: points)
express_company string express_company
tracking number string express delivery waybill number
user object Buyer User Information
details object[] Order Details Information List
created_time int order timestamp
status int Order Status: -1 Cancelled, 0 Pending Payment, 1 Paid, 2 Shipped, 3 Completed, 8 Refunding, 9 Refunded
refund_status int Refund status: -1 Refund failed, 0 No or in progress, 1 Refunded

user Buyer user information parameters

Field name Type Description
id int User ID
parent_id int Parent User ID
user_name string Username
real_name string Real Name
avatar_url string User avatar address
email string Email address
phone string Phone number
group_id int user group ID
is_retailer int Is a Distributor
balance int User Balance (Unit: Cents)
Total Reward int Distributor Cumulative Earnings (Unit: Cents)
Invite Code string User Invite Code
last login int timestamp of last login
expire time int expiration timestamp
created_time int registration timestamp
updated_time int update timestamp
status int User Display Status

details Order details information parameters

Field name Type Description
id int order detail ID
order_id string Order Number
user_id int User ID
goods_id int Product ID
goods_item_id int Product SKU ID
price int Product Price (Unit: Cents)
origin_price int Original Product Price (Unit: Cents)
amount int Actual Total Product Price (Unit: Cents)
original amount int Original Total Product Price (Unit: Cents)
quantity int Product Quantity
status int Status
goods object Product Details

goods product detail parameters

Field name Type Description
id int Document ID
Title string Document title
seo title string Document SEO Title
URL Token string Document URL Alias
keywords string Document keyword
description string Document Introduction
module_id int Document Model ID
category_id int Document Category ID
Views int Document Views
Comment Count int Document Comment Volume
Images string array document group chart
Logo string Document Logo
thumbnail string document thumbnail
canonical_url string Canonical URL
fixed link string document fixed link
created_time int document publish timestamp
updated_time int document update timestamp
status int document display status
user_id int User ID
price int price (unit: fen)
stock int inventory quantity

Usage Example

Request example

GET /api/retailer/orders?current=1&pageSize=10 HTTP/1.1
Host: www.anqicms.com

Response Example

{
  "code": 0,
  "msg": "",
  "data": [
    {
      "id": 46,
      "created_time": 1669212548,
      "updated_time": 1669212548,
      "order_id": "202211232209080046",
      "payment_id": "202211232209080016",
      "user_id": 1000,
      "address_id": 0,
      "remark": "英文外贸响应式通用主题wzl-008等",
      "type": "goods",
      "status": 1,
      "refund_status": 0,
      "origin_amount": 9900,
      "amount": 9900,
      "paid_time": 1669212548,
      "end_time": 0,
      "deliver_time": 0,
      "finished_time": 0,
      "discount_amount": 0,
      "seller_id": 15,
      "seller_amount": 7920,
      "share_user_id": 1000,
      "share_parent_user_id": 0,
      "share_amount": 1980,
      "share_parent_amount": 0,
      "express_company": "",
      "tracking_number": "",
      "user": {
        "id": 1001,
        "created_time": 1669012062,
        "updated_time": 1679536756,
        "parent_id": 0,
        "user_name": "customer1",
        "real_name": "",
        "avatar_url": "",
        "email": "[email protected]",
        "phone": "13800138000",
        "group_id": 2,
        "status": 1,
        "is_retailer": 0,
        "balance": 0,
        "total_reward": 0,
        "invite_code": "customer123",
        "last_login": 1702912236,
        "expire_time": 1997404800
      },
      "details": [
        {
          "id": 16,
          "created_time": 1669212548,
          "updated_time": 1669212548,
          "order_id": "202211232209080046",
          "user_id": 1000,
          "goods_id": 188,
          "goods_item_id": 0,
          "price": 9900,
          "origin_price": 9900,
          "amount": 9900,
          "origin_amount": 9900,
          "quantity": 1,
          "status": 1,
          "goods": {
            "id": 188,
            "created_time": 1669122751,
            "updated_time": 1669122751,
            "title": "英文外贸响应式通用主题wzl-008",
            "seo_title": "",
            "url_token": "ywwmxystyztw0-7",
            "keywords": "英文外贸响应式通用主题wzl-008",
            "description": "英文主题,外贸主题,响应式主题,通用英文企业站主题",
            "module_id": 3,
            "category_id": 36,
            "views": 158,
            "comment_count": 0,
            "images": [
              "https://en.anqicms.com/uploads/202211/22/6315f8a943b979a4.webp",
              "https://en.anqicms.com/uploads/202211/22/c705ba844eb51aec.webp"
            ],
            "status": 1,
            "canonical_url": "",
            "fixed_link": "",
            "user_id": 15,
            "price": 9900,
            "stock": 9999999,
            "logo": "https://en.anqicms.com/uploads/202211/22/6315f8a943b979a4.webp",
            "thumb": "https://en.anqicms.com/uploads/202211/22/thumb_6315f8a943b979a4.webp",
            "link": "https://en.anqicms.com/endesign/188.html"
          }
        }
      ]
    }
  ],
  "total": 1
}

error code

Error code Description
0 OK
-1 Error, the reason is indicated in msg
1001 Not logged in
1002 Unauthorized (the current user is not a distributor)
200 API request OK