Get the order list related to distributors, supporting pagination query.
Precautions
- This interface uses the GET method
- The user must be logged in for verification (the current user must be a distributor)
- Returns the list of orders generated by the current distributor's promotion
- Supports pagination queries, can specify the current page number and number of items per page
- Includes detailed order information, buyer information, and product information
Request address
{域名地址}/api/retailer/orders
Description:{域名地址}Need to replace it with your domain address, such ashttps://en.anqicms.com/api/retailer/orders
Request syntax
GET {域名地址}/api/retailer/orders
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 |
| Current |
integer |
No |
Current page number, default is 1 |
| pageSize |
integer |
No |
Number of items per page, default is 10 |
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[] |
Distributor order list array |
| total |
integer |
Total number of records |
data result item parameter
| 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 |
Original total price of the order (unit: cents) |
| amount |
integer |
Actual total price of the order (unit: cents) |
| paid_time |
integer |
Payment timestamp, 0 for unpaid |
| End Time |
integer |
Order estimated auto-complete timestamp |
| Delivery Time |
integer |
Shipping timestamp, 0 for not shipped |
| finished_time |
integer |
Order completion timestamp, 0 for incomplete |
| Discount amount |
integer |
Discount amount (Unit: cents) |
| Seller ID |
integer |
seller ID |
| seller amount |
integer |
Seller's Earnings (Unit: Cents) |
| share user ID |
integer |
Promoter ID (i.e., current distributor ID) |
| share_parent_user_id |
integer |
Promoter's Superior ID |
| share_amount |
integer |
Promoter's Earnings (Unit: Cents) |
| share_parent_amount |
integer |
Promoter's Superior's Earnings (Unit: Cents) |
| express_company |
string |
Courier company |
| tracking_number |
string |
Express delivery tracking number |
| user |
object |
Buyer User Information |
| details |
object[] |
Order Details List |
| created_time |
integer |
Order 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 No Refund or Refunding, 1 Refunded |
Buyer User Information Parameters
| Field Name |
Type |
Description |
| id |
integer |
User ID |
| parent_id |
integer |
Parent user ID |
| user_name |
string |
Username |
| Real Name |
string |
True Name |
| avatar_url |
string |
User avatar address |
| email |
string |
Email Address |
| phone |
string |
Phone number |
| group_id |
integer |
User Group ID |
| is_retailer |
integer |
Is the retailer |
| balance |
integer |
User Balance (Unit: Cents) |
| Total Reward |
integer |
Distributor cumulative earnings (Unit: fen) |
| Invite Code |
string |
User invitation code |
| Last login |
integer |
Timestamp of the last login |
| Expire time |
integer |
Expiration timestamp |
| created_time |
integer |
registration timestamp |
| updated_time |
integer |
update timestamp |
| status |
integer |
User display status |
details order detail information parameters
| Field Name |
Type |
Description |
| id |
integer |
Order detail ID |
| order_id |
string |
Order Number |
| user_id |
integer |
User ID |
| goods_id |
integer |
Product ID |
| goods_item_id |
integer |
Product SKU ID |
| Price |
integer |
Product Price (Unit: Cents) |
| Original Price |
integer |
Original Product Price (Unit: Cents) |
| amount |
integer |
Actual Total Product Price (Unit: Cents) |
| origin_amount |
integer |
Original Total Product Price (Unit: Cents) |
| quantity |
integer |
quantity of goods |
| status |
integer |
Status |
| Goods |
object |
Goods Details |
Goods Details Parameters
| Field Name |
Type |
Description |
| id |
integer |
Document ID |
| Title |
string |
Document Title |
| SEO Title |
string |
Document SEO Title |
| url_token |
string |
Document URL Alias |
| Keywords |
string |
Document keywords |
| Description |
string |
Document Summary |
| module_id |
integer |
Document Model ID |
| category_id |
integer |
Document Category ID |
| views |
integer |
Document views |
| comment_count |
integer |
Document comments |
| images |
string array |
Document Group Image |
| Logo |
string |
Document Logo |
| Thumbnail |
string |
Document Thumbnail |
| Canonical URL |
string |
Canonical URL |
| fixed_link |
string |
Document Fixed Link |
| created_time |
integer |
Document Publish Timestamp |
| updated_time |
integer |
Document Update Timestamp |
| status |
integer |
Document Display Status |
| user_id |
integer |
User ID |
| Price |
integer |
Price (Unit: Cents) |
| Stock |
integer |
Stock Quantity |
Example Usage
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 (Current user is not a distributor) |
| 200 |
API request OK |