This is FastRyders's official API documentation.
With this API, you can do what you would have done with the official mobile application.
Let me walk you through on how to do all that.
First of all, you will need to:
This API has followed, the following Datatypes and response format
The response received will be in JSON with keys (or properties) such as status, message. Depending on the status of the response, you might find additional keys especially data, errorcode.
The Authentication section (and following sections) throws more light on the API Responses
All API Calls are authenticated and will fail if authentication parameters are either missing, wrongly supplied, or wrong
To authorize API calls from your server:
Here is a sample of a typical API Call with required authentication
curl
--request POST
"https://api.fastryders.com/user-mgt/register-user"
--header
"x-fastryders-token: FRYD-TEST-P2mJBDwqgbgJDM0lOOEp7Gv5cxDzycgJb0P90AS7"
--header
"Authorization: Basic c2FtcGxlQGVtYWlsLmNvbTp5b3VyIHBhc3N3b3Jk"
Responses are usually in JSON format except in critical cases of not reaching the enpoint at all
Here's is a typical JSON response expressed in a table with description
Key | Sample value | Description |
---|---|---|
status | success | Value can be either success or error |
message | Authentication failed | Message will depend on the status of the response as well as on the purpose of the call. Message should be minimally descriptive to explain the result of the call |
data | JSON |
The data key may exist or not, depending on the status of the response. When present, will be a JSON with keys and values of expected values |
errcode | AUTH-01 |
Error codes may exist on responses with status error.
Find below th list of error codes and their description |
Here is a list of error codes and their description
Error Code | Description |
---|---|
AUTH-01 | You have not passed (or wrongly passed) either your API Token or "Basic Auth" Header values |
AUTH-02 | This is an authentication failed error. Either your API Token or dev user email or dev user password is wrong |
INV-01 | General unaccepted input value - usually the expected value of an input does not match with what was supplied |
INV-02 | You passed an unccepted country dial code. We have a list of accepted dialing codes |
MISS-01 | One or more of the POST BODY Fields is either missing or not properly passed |
INPT-01 | One or more of the supplied form body fields is incorrect |
MAX-01 | Exceeded the expected allowed limit |
GENERR |
This is a general error. The message field should provide adequate description
|