User¶
A user is an authenticated account. Each user belongs to a group, a language and a currency. This resource is read-only and scoped to the authenticated user's group.
Lists Users¶
GET https://domain.com/api/v1/users
Headers¶
| Name | Type | Description |
|---|---|---|
| Authorization* | String | Bearer \ |
| Content-Type* | String | application/vnd.api+json |
Response — 200 OK
{
"data": [
{
"type": "users",
"id": "<ID>",
"attributes": {
"email": "email@email.com",
"name": "User Name",
"abilities": null,
"locale": "es",
"is-admin-user": 1,
"sign-in-count": 1,
"active": 1,
"is-distributor": 1,
"invitation-accepted": 0
},
"relationships": {
"language": {
"links": {
"related": "https://domain.com/api/v1/users/<ID>/language",
"self": "https://domain.com/api/v1/users/<ID>/relationships/language"
}
},
"currency": {
"links": {
"related": "https://domain.com/api/v1/users/<ID>/currency",
"self": "https://domain.com/api/v1/users/<ID>/relationships/currency"
}
},
"group": {
"links": {
"related": "https://domain.com/api/v1/users/<ID>/group",
"self": "https://domain.com/api/v1/users/<ID>/relationships/group"
}
}
},
"links": {
"self": "https://domain.com/api/v1/users/<ID>"
}
}
],
"meta": {
"page": {
"currentPage": 1,
"from": 1,
"lastPage": 1,
"perPage": 20,
"to": 1,
"total": 1
}
},
"jsonapi": {
"version": "1.0"
},
"links": {
"first": "https://domain.com/api/v1/users?page[number]=1&page[size]=20",
"last": "https://domain.com/api/v1/users?page[number]=1&page[size]=20"
}
}
Filters¶
| Filter | Example |
|---|---|
| Name | /users?filter[name]=User name |
/users?filter[email]=user@example.com |
|
| ID | /users?filter[id]=1,2,3 |
Get User¶
GET https://domain.com/api/v1/users/:id
Path Parameters¶
| Name | Type | Description |
|---|---|---|
| id* | Number | User ID |
Headers¶
| Name | Type | Description |
|---|---|---|
| Authorization* | String | Bearer \ |
| Content-Type* | String | application/vnd.api+json |
Response — 200 OK
{
"data": {
"type": "users",
"id": "<ID>",
"attributes": {
"email": "email@email.com",
"name": "User Name",
"abilities": null,
"locale": "es",
"is-admin-user": 1,
"sign-in-count": 1,
"active": 1,
"is-distributor": 1,
"invitation-accepted": 0
},
"relationships": {
"language": {
"links": {
"related": "https://domain.com/api/v1/users/<ID>/language",
"self": "https://domain.com/api/v1/users/<ID>/relationships/language"
}
},
"currency": {
"links": {
"related": "https://domain.com/api/v1/users/<ID>/currency",
"self": "https://domain.com/api/v1/users/<ID>/relationships/currency"
}
},
"group": {
"links": {
"related": "https://domain.com/api/v1/users/<ID>/group",
"self": "https://domain.com/api/v1/users/<ID>/relationships/group"
}
}
},
"links": {
"self": "https://domain.com/api/v1/users/<ID>"
}
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "https://domain.com/api/v1/users/<ID>"
}
}
Response — 404 Not Found