API Documentation
Integrate FlashMail email services into your workflow with simple HTTP requests. Supports balance queries, product purchasing, mail reading, and more.
Query balance and VIP information
Returns the balance and VIP information of the user corresponding to the current API Key
Request URL
GET https://api.shanyouxiang.com/open/user/balanceRequest Params
Current user's API key, passed as a query parameter for OpenAPI authentication
| Param | Type | Required | Location | Description |
|---|---|---|---|---|
| clientKey | string | Yes | query | Current user's API key, passed as a query parameter for OpenAPI authentication |
Test API
Current user's API key, passed as a query parameter for OpenAPI authentication
Request Example
curl -X GET "https://api.shanyouxiang.com/open/user/balance?clientKey={clientKey}"Documented Response Example (Not Live Data)
{
"code": 0,
"success": true,
"message": "",
"data": {
"email": "",
"balance": 0,
"vipLevel": 0,
"vipName": "",
"discountRate": 0,
"totalDeposit": 0
},
"requestId": ""
}Query product list and stock
Does not require clientKey authentication. Returns all visible product stock when productId is not provided, and returns a list containing the specified product stock when productId is provided
Request URL
GET https://api.shanyouxiang.com/open/product/stockRequest Params
Product ID. When omitted, all visible product stock is returned; you can copy it from the product card on the products page
| Param | Type | Required | Location | Description |
|---|---|---|---|---|
| productId | number | No | query | Product ID. When omitted, all visible product stock is returned; you can copy it from the product card on the products page |
Test API
Product ID. When omitted, all visible product stock is returned; you can copy it from the product card on the products page
Request Example
curl -X GET "https://api.shanyouxiang.com/open/product/stock?productId={productId}"Documented Response Example (Not Live Data)
{
"code": 0,
"success": true,
"message": "",
"data": [
{
"productId": 0,
"name": "",
"stock": 0,
"price": 0
}
],
"requestId": ""
}Purchase email accounts
Purchases email accounts by productId and quantity
Request URL
GET https://api.shanyouxiang.com/open/product/buyRequest Params
Current user's API key, passed as a query parameter for OpenAPI authentication
Product ID. You can copy it from the product card on the products page
Buy quantity, greater than or equal to 1
| Param | Type | Required | Location | Description |
|---|---|---|---|---|
| clientKey | string | Yes | query | Current user's API key, passed as a query parameter for OpenAPI authentication |
| productId | number | Yes | query | Product ID. You can copy it from the product card on the products page |
| quantity | integer | Yes | query | Buy quantity, greater than or equal to 1 |
Test API
Current user's API key, passed as a query parameter for OpenAPI authentication
Product ID. You can copy it from the product card on the products page
Buy quantity, greater than or equal to 1
Request Example
curl -X GET "https://api.shanyouxiang.com/open/product/buy?clientKey={clientKey}&productId={productId}&quantity={quantity}"Documented Response Example (Not Live Data)
{
"code": 0,
"success": true,
"message": "",
"data": {
"accounts": [
""
],
"quantity": 0,
"totalAmount": 0,
"balance": 0
},
"requestId": ""
}Get the latest email of the specified email account
Queries the latest email by account credentials, mailbox folder, and optional start_timestamp. Currently, only Microsoft mailbox emails are supported
Request URL
GET https://api.shanyouxiang.com/open/mail/latest-messageRequest Params
Current user's API key, passed as a query parameter for OpenAPI authentication
Full email account credentials in email:password:refreshToken:clientId format
Mail folder. Only inbox or junkemail is supported
Start received timestamp (Unix seconds). Only emails received after this time are returned. Query parameter name is start_timestamp
| Param | Type | Required | Location | Description |
|---|---|---|---|---|
| clientKey | string | Yes | query | Current user's API key, passed as a query parameter for OpenAPI authentication |
| account | string | Yes | query | Full email account credentials in email:password:refreshToken:clientId format |
| folder | string | Yes | query | Mail folder. Only inbox or junkemail is supported |
| start_timestamp | number | No | query | Start received timestamp (Unix seconds). Only emails received after this time are returned. Query parameter name is start_timestamp |
Test API
Current user's API key, passed as a query parameter for OpenAPI authentication
Full email account credentials in email:password:refreshToken:clientId format
Mail folder. Only inbox or junkemail is supported
Start received timestamp (Unix seconds). Only emails received after this time are returned. Query parameter name is start_timestamp
Request Example
curl -X GET "https://api.shanyouxiang.com/open/mail/latest-message?clientKey={clientKey}&account={account}&folder={folder}&start_timestamp={start_timestamp}"Documented Response Example (Not Live Data)
{
"code": 0,
"success": true,
"message": "",
"data": {
"from": "",
"subject": "",
"html": "",
"text": "",
"receivedAt": ""
},
"requestId": ""
}Query order list
Queries the current user's web purchase orders by page number, page size, and optional order status. API purchase orders are not currently available for query
Request URL
GET https://api.shanyouxiang.com/open/order/listRequest Params
Current user's API key, passed as a query parameter for OpenAPI authentication
Page number, starting from 1. Defaults to page 1 when omitted; values less than 1 are rejected
Page size. Defaults to 10 when omitted; values less than 1 or greater than 100 are rejected
Filter by order status. When omitted, all statuses are returned. 0=pending, 1=processing, 2=completed, 3=partially completed, 4=failed, 5=refunded
| Param | Type | Required | Location | Description |
|---|---|---|---|---|
| clientKey | string | Yes | query | Current user's API key, passed as a query parameter for OpenAPI authentication |
| pageNum | integer | No | query | Page number, starting from 1. Defaults to page 1 when omitted; values less than 1 are rejected |
| pageSize | integer | No | query | Page size. Defaults to 10 when omitted; values less than 1 or greater than 100 are rejected |
| status | integer | No | query | Filter by order status. When omitted, all statuses are returned. 0=pending, 1=processing, 2=completed, 3=partially completed, 4=failed, 5=refunded |
Test API
Current user's API key, passed as a query parameter for OpenAPI authentication
Page number, starting from 1. Defaults to page 1 when omitted; values less than 1 are rejected
Page size. Defaults to 10 when omitted; values less than 1 or greater than 100 are rejected
Filter by order status. When omitted, all statuses are returned. 0=pending, 1=processing, 2=completed, 3=partially completed, 4=failed, 5=refunded
Request Example
curl -X GET "https://api.shanyouxiang.com/open/order/list?clientKey={clientKey}&pageNum={pageNum}&pageSize={pageSize}&status={status}"Documented Response Example (Not Live Data)
{
"code": 0,
"success": true,
"message": "",
"data": [
{
"orderNo": "",
"productId": 0,
"productName": "",
"quantity": 0,
"unitPrice": 0,
"totalAmount": 0,
"status": 0,
"createTime": "yyyy-MM-dd HH:mm:ss"
}
],
"requestId": ""
}Query order detail
Queries the current user's web purchase order detail by order number. API purchase orders are not currently available for query
Request URL
GET https://api.shanyouxiang.com/open/order/infoRequest Params
Current user's API key, passed as a query parameter for OpenAPI authentication
Order number
| Param | Type | Required | Location | Description |
|---|---|---|---|---|
| clientKey | string | Yes | query | Current user's API key, passed as a query parameter for OpenAPI authentication |
| orderNo | string | Yes | query | Order number |
Test API
Current user's API key, passed as a query parameter for OpenAPI authentication
Order number
Request Example
curl -X GET "https://api.shanyouxiang.com/open/order/info?clientKey={clientKey}&orderNo={orderNo}"Documented Response Example (Not Live Data)
{
"code": 0,
"success": true,
"message": "",
"data": {
"orderNo": "",
"productId": 0,
"productName": "",
"quantity": 0,
"unitPrice": 0,
"totalAmount": 0,
"status": 0,
"createTime": "yyyy-MM-dd HH:mm:ss"
},
"requestId": ""
}