web123456

RESTful style API interface document template

1 Interface name

User registration interface

2 Interface description

  1. User information registration
  2. Users can register through their mobile phone number/email address
  3. Only one account can be registered for the same mobile phone number/email address

3 Request address

{apiAddress}/api/user/signup

4 Request method

POST

5 Request parameters

5.1 Headerparameter

Parameter name Must-choose Type/parameter value illustrate
Content-Type yes application/json Request parameter type

5.2 Body Parameters

Parameter name Must-choose type Limitation conditions illustrate Example Values
account yes string 1 < length < 50 User account
passcode yes string 1 < length < 50 password
checkCode yes string length = 6 Verification code

Notes:The password (passcode) is encrypted as xxxxxx

Other interfaces that need to be called:

Interface name Interface address Description of use
Get the verification code {apiAddress}/api/common/getCheckCode Obtain the verification code required for registration

5.3 Request Example

{
"account" : 1001,
"passcode" : 123456,
"checkCode" : 1
}
  • 1
  • 2
  • 3
  • 4
  • 5

6 Response parameters

6.1 Return parameters

Parameter name Must-choose type Limitation conditions illustrate Example Values
account yes string 1 < length < 50 User account
passcode yes string 1 < length < 50 password
checkCode yes string length = 6 Verification code

6.2 Return to the example

{
    "code": 200,  // Status code
    "msg": "success",  // Prompt message
    "data": null  // Return to content
}
  • 1
  • 2
  • 3
  • 4
  • 5

7 Notes

For more error codes, please check the home page Return status code table

8 Error response code (selected)

Error code Error description reason Solution Example Values
SYSTEMERROR Interface returns an error System timeout Please call the API again with the same parameters. 001