Get Order Statistics Interface

Get the order statistics of the current user, including the number of orders in various states.

Precautions

  • This interface uses the GET method
  • User login verification is required
  • Return the order statistics information of the current user
  • Statistics of the number of various order statuses
  • Statistics of the number of wish list items

Request address

{ๅŸŸๅๅœฐๅ€}/api/orders/statistics

Description:{ๅŸŸๅๅœฐๅ€}Need to replace it with your domain address, such ashttps://en.anqicms.com/api/orders/statistics

Request syntax

GET {ๅŸŸๅๅœฐๅ€}/api/orders/statistics

Request header

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

Request Parameters

None

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 Statistics data object

Data result parameters

Field Name Type Description
total integer Total number of orders
pending integer number of pending orders
processing integer number of processing orders
completed integer Completed Order Quantity
Cancelled integer Cancelled Order Quantity
Refunding integer Refunding Order Quantity
refunded integer Number of completed refund orders
wishlist integer Number of wishlists

Example Usage

Request Example

GET /api/orders/statistics HTTP/1.1
Host: www.anqicms.com

Response Example

{
  "code": 0,
  "msg": "่Žทๅ–ๆˆๅŠŸ",
  "data": {
    "total": 25,
    "pending": 3,
    "processing": 5,
    "completed": 15,
    "cancelled": 1,
    "refunding": 1,
    "refunded": 0,
    "wishlist": 8
  }
}

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