Response
By calling this route in the API, you will get a specific response depending on the status of the request.
The structure of the response is always the same with the following structure:
{
"success": bool,
"data": Data Object,
"error": Error Object,
"pagination": Pagination Object
}
Response Objects
success
true
: The request was successful. Theerror
object will be an empty dict{}
.false
: The request was not successful. More information about the error can be found in theerror
object.
data
This object will hold the data in case of a successful request. It will always contain user_id
or account_id
and all other fields will be dynamic, according to the route you called.
Dynamic fields:
country
: The country of the user's account.platform
: The platform of the user's account.message
: Information provided in case of a failed connection.profile
: User profile data. See the Profile section for more information.earnings
: (Gig economy) User earnings. See the Earnings section for more information.employment
: (Formal jobs) User's employment history. See the Employment section for more information.
error
This object will contain error information in case of a failed request.
"mistake":{
"code": str,
"message": str,
"errors": [
{
"message": str,
"location": str
}
]
}
For more information about possible errors, see the Errors section.
pagination
This object will only be included in the response for routes where pagination is used, such as:
POST /accounts/:account_id/earnings/search
POST /accounts
"pagination": {
"page": 1,
"items_per_page": 50,
"total_items": 200,
"total_pages": 4
}
The default value for items_per_page
is 100
, unless a different value is specified in the request payload.