Skip to content

Things to Note

1. Base URL

EnvironmentAddress
Developmenthttps://openapi.test.fastmoss.com
Productionhttps://openapi.fastmoss.com

2. Request Method

All API requests use the POST method.

3. Common Parameters

Except for the APIs to obtain or refresh access_token, all other APIs require the following parameters to be passed via the URL:

Parameter NameTypeDescription
client_idstringClient ID
access_tokenstringAccess Token
timestamptimestamp[integer]Timestamp
signstringSignature

Example

bash
curl 'https://openapi.test.fastmoss.com/test?client_id=xxx&access_token=xxx&timestamp=xxx&sign=xxx'

4. Response Format

All API responses are returned in JSON object format. The data field contains the specific data, which is a Json object.

Parameter NameTypeDescription
codeintegerStatus Code
msgstringMessage
dataobjectData
request_idstringrequest id
timestamptimestamp[integer]server timestamp

Example

json
{
    "code": 0,
    "msg": "success",
    "data": {
        "xxx": "xxx"
    },
    "request_id": "xxxx",
    "timestamp": 1690351112
}

5. Relationship Between HTTP Status Code and Code

  • HTTP Status Code and Code do not conflict.
  • Code represents the specific business status code.
  • You should first check the HTTP Status Code, then check the Code.
  • When the HTTP Status Code is 200 and the Code is 0, it indicates success.

Status Code Description

Status CodeTypeDescription
0No ExceptionSuccess
10001Parameter ErrorParameter does not meet requirements
20001Data ErrorResource not found
30001Permission ErrorNo access permission
30002Permission ErrorData limit exceeded
30003Permission ErrorAccess frequency limit exceeded
40001Service ErrorService exception