Query Order List

Query order list as well as the corresponding order information.

Request URL

GET {base_url}/order/openapi/order/v1/page?{query parameters}

Request parameters

Headers
Parameter Required Description
User-Agent Yes Provide information about the user agent, such as the type of web browser, operating system, software version, etc., so as to help Yeastar Partner Portal to identify the user or the application that is making the request.

Example: User-Agent: OpenAPI.

Authorization Yes Pass the access token in the header, so as to authenticate the API request.

Format: Bearer {access_token}.

Query parameters
Parameter Required Type Description
pageSize No Integer Define how many records per page.

Default value: 25

pageNo No Integer Define which page is displayed.

Default value: 1

Response parameters

Parameter Type Description
code String The response message of the API request.
detailMessage String The detailed error information.

When the request is successful, this parameter returns empty.

requestId String The unique ID of the request, which can be used to quickly locate the request.
result Object<Details> The information of the queried orders.
status Integer The HTTP status code of the API request.

Details

Parameter Type Description
count Integer The total number of orders.
pageNo Integer Which page is displayed.
pageSize Integer How many records are displayed per page.
results Array<Order_Info> The list of detailed order information.
total Integer The total number of orders.
totalPage Integer The total number of pages.
Order_Info
Parameter Type Description
createTime Long Creation time of the order.
currencyCode String Currency for payment.
  • USD
  • RMB
customReferenceNo String Custom order-relevant number.
id String The unique ID of the order.
invoiceNo String Invoice number.
orderNo String Order number.
orderStatus String Order status.
  • succeed
  • failed
  • pending
  • invalid
  • cancelled
  • refunded
  • confirmed
  • unconfirmed
orderType String Order type.
  • online
  • offline
  • special_offer
productModel String Product model.
Note: This parameter returns the product model of the PBX that has been subscribed to the P-Series Plan for Appliance Edition or Linkus Cloud Service.
productName String Product name.
productNo String The unique product identifier.

This parameter returns the Serial Number (SN) of the PBX.

totalAmount number The total of the actual price.

Example

Request example

Query order list:
  • Display 5 records per page.
  • Display Page 1.
GET /order/openapi/order/v1/page?pageSize=5&pageNo=1 HTTP/1.1
Host: openapi.partner.yeastar.com
User-Agent: OpenAPI
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOlsicmVzMSJdLCJYLU1TLVVTRVIiOiJ7XCJleHByXCI6XCIwXCIsXCJ0eXBlXCI6XCJwYXJ0bmVyXCIsXCJ1Y0lkXCI6XCIzMDc2OTEzNjQ0ODkwODMyODk2XCIsXCJ1c2VyQ29kZVwiOlwiRGlzdHJpYnV0b3JcIixcInVzZXJJZFwiOlwiMzA3NjkxMzY0NDkxNTk5ODcyMFwiLFwidXNlcm5hbWVcIjpcImRpc3RyaWJ1dG9yZXhhbXBsZUBvdXRsb29rLmNvbVwifSIsInVzZXJfbmFtZSI6ImRpc3RyaWJ1dG9yZXhhbXBsZUBvdXRsb29rLmNvbSIsInNjb3BlIjpbImFsbCJdLCJleHAiOjE3MzkyNTgwMTUsInRva2VuX3R5cGUiOiJvcGVuYXBpIiwiYXV0aG9yaXRpZXMiOlsiNzciXSwianRpIjoibDkzTXhVMWlWYm1MeEhuOWkrdzRVaitqZ0JZPSIsImNsaWVudF9pZCI6ImFjMGYyZTViZWU3NmI2ZDdmNDU0NTY5NmMyNGZjMWYzIn0.4jMWQBsRMZp2Q0Lxo_NTOsM2V89r4FphvKlDe667oCA

Response example

{
    "code": "success",
    "detailMessage": "",
    "requestId": "7249dc2422a5b3192c06b00fa77d31a2",
    "result": {
        "count": 117,
        "pageNo": 1,
        "pageSize": 5,
        "results": [
            {
                "createTime": 1680256570000,
                "currencyCode": "USD",
                "customReferenceNo": "123456",
                "id": "1002069",
                "invoiceNo": "MH3076943823830528000",
                "orderNo": "CY3076943806474498048",
                "orderStatus": "succeed",
                "orderType": "online",
                "productModel": "",
                "productName": "Cloud PBX (PCE Instance)",
                "productNo": "3658B4311196TPKC",
                "totalAmount": 130.00
            },
            {
                "createTime": 1681200842000,
                "currencyCode": "USD",
                "customReferenceNo": "",
                "id": "1004586",
                "invoiceNo": "DZ3080904385743106048",
                "orderNo": "LK3080904367292362752",
                "orderStatus": "succeed",
                "orderType": "online",
                "productModel": "",
                "productName": "Cloud PBX (PCE Instance)",
                "productNo": "3658B4311196T2CZ",
                "totalAmount": 300.00
            },
            {
                "createTime": 1681218539000,
                "currencyCode": "USD",
                "customReferenceNo": "",
                "id": "1004828",
                "invoiceNo": "",
                "orderNo": "TL3080978594820747264",
                "orderStatus": "confirmed",
                "orderType": "offline",
                "productModel": "",
                "productName": "Software PBX (PSE Self-hosted)",
                "productNo": "3651D1513766",
                "totalAmount": 250.00
            },
            {
                "createTime": 1684460001000,
                "currencyCode": "USD",
                "customReferenceNo": "",
                "id": "1007495",
                "invoiceNo": "",
                "orderNo": "LW3094574272280424448",
                "orderStatus": "cancelled",
                "orderType": "",
                "productModel": "S20",
                "productName": "Linkus Cloud Service",
                "productNo": "3691D1473527",
                "totalAmount": 83.85
             },
             {
                "createTime": 1694749358000,
                "currencyCode": "USD",
                "customReferenceNo": "",
                "id": "1052513",
                "invoiceNo": "ID3137730998612283392",
                "orderNo": "QB3137730964600672256",
                "orderStatus": "succeed",
                "orderType": "online",
                "productModel": "P550",
                "productName": "P-Series Plan for Appliance Edition",
                "productNo": "3631D3769197",
                "totalAmount": 90.00
            }
        ],
        "total": 117,
        "totalPage": 1
    },
    "status": 200
}