Labels
info
This object used for labeling stuffs in your business. You can label the tickets and customer to easy manager all stuff in your company.
All APIs endpoints
The labels object
Attribute
id: string Unique; //Unique identifier for the object.
companyId: string;
userId: string;
createdBy: string;
updatedBy: string;
name: string;
description: string;
color: string;
Example
{
id: 'unique_label_id';
companyId: 'company_owner_id';
userId: 'created_by_user_id';
createdBy: 'admin';
updatedBy: 'Admin';
name: 'Tester';
description: 'for labeling agent role in company';
color: '#33453';
}
Create a label
Parameters
- name: require; name and identifier of a new label.
- description: require; An arbitrary string that you describe a label object. It is displayed alongside the babel in the dashboard.
- color: require; this will be the color of the label when displayed in the dashboard.
- userName: require; name of admin who creates the label.
Request
curl --location --request POST 'https://api-v1-stg.lumyri.com/labels' \
--header 'Authorization: Bearer $ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "delivery",
"description": "agent roles for delivering company",
"color": "#205d3b",
"userName": "Admin"
}'
Response
{
"id": "54846d7c-b865-47c8-a7e7-453b44081787",
"companyId": "956865a9-b9f7-4198-87eb-10b4f0f411c9",
"userId": "7897990c-d118-4479-a58f-85b9d1297c8b",
"createdAt": "2023-02-15T07:56:07.129Z",
"updatedAt": "2023-02-15T07:56:07.130Z",
"createdBy": "Admin",
"updatedBy": "Admin",
"name": "delivery",
"description": "agent roles for deliver company",
"color": "#205d3b"
}
Get a list of labels
Parameters
- current_page: optional && default = 1; for pagination
- per_page: optional && default = 10; for pagination
- sort_by: optional && default = DESC;
- order_by: optional && default = name;
- name: optional && default = ' '; For search by name of labels
Request
curl --location --request GET 'https://api-v1-stg.lumyri.com/labels?current_page=1&per_page=1&sort_by=DESC&order_by=name&name=dev' \
--header 'Authorization: Bearer $ACCESS_TOKEN'
Response
{
"current_page": 1,
"per_page": 1,
"last_page": 20,
"total": 100,
"data": [
{
"id": "54846d7c-b865-47c8-a7e7-453b44081787",
"companyId": "956865a9-b9f7-4198-87eb-10b4f0f411c9",
"userId": "7897990c-d118-4479-a58f-85b9d1297c8b",
"createdAt": "2023-02-15T07:56:07.129Z",
"updatedAt": "2023-02-15T07:56:07.130Z",
"createdBy": "Admin",
"updatedBy": "Admin",
"name": "delivery",
"description": "agent roles for delivering company",
"color": "#205d3b"
}
]
}
Retrieve a label
Parameters
no parameter require
Request
curl --location --request GET 'https://api-v1-stg.lumyri.com/labels/$LABEL_ID'\
--header 'Authorization: Bearer $ACCESS_TOKEN'
Response
{
"id": "54846d7c-b865-47c8-a7e7-453b44081787",
"companyId": "956865a9-b9f7-4198-87eb-10b4f0f411c9",
"userId": "7897990c-d118-4479-a58f-85b9d1297c8b",
"createdAt": "2023-02-15T07:56:07.129Z",
"updatedAt": "2023-02-15T07:56:07.130Z",
"createdBy": "Admin",
"updatedBy": "Admin",
"name": "delivery",
"description": "agent roles for delivering company",
"color": "#205d3b"
}
Update a label
Parameters
- name: optional;
- description: optional;
- color: optional;
- userName: optional;
Request
curl --location --request PUT 'https://api-v1-stg.lumyri.com/labels/$LABEL_ID' \
--header 'Authorization: $ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{,
"name": "updated delivery",
"description": "agent roles for delivering company",
"color": "#205d3b"
"userName": "Tester"
}'
Response
{
"id": "54846d7c-b865-47c8-a7e7-453b44081787",
"companyId": "956865a9-b9f7-4198-87eb-10b4f0f411c9",
"userId": "7897990c-d118-4479-a58f-85b9d1297c8b",
"createdAt": "2023-02-15T07:56:07.129Z",
"updatedAt": "2023-02-15T07:56:07.130Z",
"createdBy": "Admin",
"updatedBy": "Tester",
"name": "updated delivery",
"description": "agent roles for delivering company",
"color": "#205d3b"
}
Delete multiple labels
Parameters
- label_ids: require; An array of label ids
Request
curl --location --request DELETE 'https://api-v1-stg.lumyri.com/labels' \
--header 'Authorization: Bearer $ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
"label_ids": [
"d0eb7666-528e-412c-a847-928cab2ac8ed",
"d0b5d5ec-ecf6-434c-af19-70c5e7ff7e0e"
]
}'
Response
status code 204: no content