List users
This endpoint allows you to search for users.
Many results can be returned, so a pagination system is provided with the limit and offset parameters.
You can use several search parameters, such as the user firstname, lastname, email, etc... to find specific users.
Endpoint
GET /user/v1/users
Parameters
| Name | Location | Required | Type | Default value | Description |
|---|---|---|---|---|---|
| customer_id | URL | No | Integer | Connected user's customer ID | Search for users belonging to this customer. By default, the id of the customer associated to the connected user will be used |
| include_subsidiaries | URL | No | Boolean | true | Include users belonging to the customer subsidiaries |
| limit | URL | No | Integer | 100 | Number of users to return (max 500) |
| offset | URL | No | Integer | 0 | Offset used |
| sort[] | URL | No | String[] | [] | Sort results by one or more fields. All fields are sortable. |
| id | URL | No | String | Search for users by id. This parameter accepts a * wildcard. | |
| firstname | URL | No | String | Search for users by firstname. This parameter accepts a * wildcard. | |
| lastname | URL | No | String | Search for users by lastname. This parameter accepts a * wildcard. | |
| URL | No | String | Search for users by email. This parameter accepts a * wildcard. | ||
| created_by | URL | No | String | Search for users created by a specific user. This parameter accepts a * wildcard. | |
| updated_by | URL | No | String | Search for users updated by a specific user. This parameter accepts a * wildcard. |
Response
A UserSearchResult object.
Example Request
GET /user/v1/users?sort[]=firstname:desc&limit=2&offset=2
Example Response
{
"message": "OK",
"data": {
"total": 9,
"include_subsidiaries": true,
"limit": 2,
"offset": 2,
"sort": [
"firstname:desc"
],
"results": [
{
"id": "5ec2c050-7aa8-48b4-98d7-7c972dfabf6f",
"firstname": "Jane",
"lastname": "Doe",
"email": "jane.doe@company.fr",
"language": "fr",
"phone": "+33612345679",
"customer_id": 1234,
"expires_at": "2050-12-25T00:00:00+01:00",
"last_login_at": null,
"created_at": "2023-01-01T00:00:00+01:00",
"created_by": {
"id": "7a1506b9-9ce4-43f9-a6f0-e94ef4252277",
"firstname": "Company",
"lastname": "Administrator"
},
"updated_at": "2023-01-01T00:00:00+01:00",
"updated_by": {
"id": "7a1506b9-9ce4-43f9-a6f0-e94ef4252277",
"firstname": "Company",
"lastname": "Administrator"
}
},
{
"id": "c0b48140-34cb-4187-acd7-aaa830dc97f9",
"firstname": "John",
"lastname": "Doe",
"email": "john.doe@company.com",
"language": "fr",
"phone": "+33612345678",
"customer_id": 1234,
"expires_at": "2050-12-25T12:00:00+01:00",
"last_login_at": null,
"created_at": "2023-01-01T00:00:00+01:00",
"created_by": {
"id": "7a1506b9-9ce4-43f9-a6f0-e94ef4252277",
"firstname": "Company",
"lastname": "Administrator"
},
"updated_at": "2023-01-01T00:00:00+01:00",
"updated_by": {
"id": "7a1506b9-9ce4-43f9-a6f0-e94ef4252277",
"firstname": "Company",
"lastname": "Administrator"
}
}
]
}
}