Get one user by id
GET
/users/{user_id}
const url = 'https://api.fleet.co/platform/v1/users/42';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.fleet.co/platform/v1/users/42 \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”user_id
required
User id
string
Example
42Responses
Section titled “Responses”User
Media typeapplication/json
object
data
required
object
id
required
integer
email
required
string
secondary_email
required
string
first_name
required
string
last_name
required
string
phone
required
string
phone_country
required
string
language
required
string
position
required
string
role
required
EMPLOYEE: standard company user. ADMIN: can manage company configuration and users. On create, defaults to EMPLOYEE when omitted.
string
is_signatory
required
Whether the user can sign leasing contracts for the company
boolean
arrival_date
required
string
departure_date
required
string
date_of_birth
required
string
city_of_birth
required
string
country_of_birth
required
string
teams
required
Teams the user belongs to, sorted by label.
Array<object>
object
id
required
integer
label
required
string
created_at
required
string
updated_at
required
string
Example
{ "data": { "role": "EMPLOYEE" }}Validation error
Media typeapplication/json
object
message
required
Every validation failure, comma-separated
string
type
required
string
error
required
string
Example
{ "message": "Required, must be an ISO 3166-1 alpha-2 country code", "type": "validation_error", "error": "validation_error"}Missing, invalid, or revoked API key
Media typetext/plain
string
Example
UnauthorizedUser not found
Media typeapplication/json
object
error
required
string
Example
{ "error": "USER_NOT_FOUND"}Rate limit exceeded. The RateLimit-* headers give the limit and the reset time.
Media typetext/plain
string
Example
Too many requests, please try again later.Unexpected server error
Media typeapplication/json
object
error
required
string
Example
{ "error": "INTERNAL_ERROR"}Rate limiting is temporarily unavailable; retry with backoff
Media typeapplication/json
object
message
required
string
Example generated
{ "message": "example"}
