administrators
info
administrators manager
All APIs endpoints
Get list of administrators
Parameter
- limit: optional
- description: limit number of customer per page for pagination
- default: 10
- page: optional
- description:current page for pagination
- default: 1
- order_by: optional
- description: sort by name or description by ASC/DECS
- default: asc
Request
curl --location --request GET 'https://api-v1-stg.lumyri.com/users/administrators?page=1&limit=5&order_by=desc' \
--header 'Authorization: Bearer $ACCESS_TOKEN'
Response
{
"error": null,
"data": {
"total": 2,
"per_page": 10,
"current_page": 1,
"last_page": 1,
"data": [
{
"id": "af68853c-a48a-4f21-a274-9df5c5dee4e7",
"company_id": "299302e4-b6d4-4d28-b7d6-ee3e62c7559f",
"first_name": "admin",
"last_name": "first",
"email": "administrator1@gmail.com",
"avatar": "",
"role": {
"name": "admin",
"description": "custom company admin role",
"category": "CUSTOME ROLE"
},
"state": "ACTIVE"
},
{
"id": "84c580ac-a2b3-4612-ac40-597f77d3ff19",
"company_id": "299302e4-b6d4-4d28-b7d6-ee3e62c7559f",
"first_name": "admin",
"last_name": "second",
"email": "administrator2@gmail.com",
"avatar": "",
"role": {
"name": "co-worker",
"description": "custom company admin role",
"category": "CUSTOME ROLE"
},
"state": "INACTIVE"
}
]
}
}
Invite a administrator
Parameter
- first_name: require
- last_name: require
- email: require
- role_id: require
- description: get role id from user roles api
Request
curl --location --request POST 'https://api-v1-stg.lumyri.com/users/administrators/invite' \
--data-raw '{
"first_name" : "admin",
"last_name" : "third",
"email" : "adminitrator3@bunbusoft.com",
"role_id" : "299effa5-1df6-49fc-996b-2f8aa85cbd7b"
}'
Response
{
"error": null,
"data": {
"message": "OK"
}
}
Delete a administrator
Request
curl --location --request DELETE 'https://api-v1-stg.lumyri.com/users/administrators/$ADMIN_ID' \
--header 'Authorization: Bearer $ACCESS_TOKEN'
Response
{
"error": null,
"data": {
"message": "OK"
}
}