Labels
Labels represent labels associated with a supplier. They can be used to categorize suppliers and filter them in the supplier list.
The Label object
Properties
colorstring
The color of the label.
idstring
The id of the label.
namestring
The name of the label.
Label object
{
"id": "6654468b366ad245719322f4",
"name": "VIP",
"color": "#991b1b"
}
POST/v2/suppliers/:id/labels/:labelId
Add a label
This endpoint allows you to add a label.
Parameters
Request
POST
/v2/suppliers/:id/labels/:labelIdcurl https://api.lsp.expert/v2/suppliers/6548c72a13162e1d7ade0290/labels/6654468b366ad245719322f4 \
-u {key}:
Response
{
"id": "6548c72a13162e1d7ade0290",
"name": "John Smith",
"address": {
"name": "John Smith"
},
"archived": false,
"labels": [
{
"id": "6654468b366ad245719322f4",
"name": "VIP",
"color": "#991b1b"
}
]
// ...
}
DELETE/v2/suppliers/:id/labels/:labelId
Delete a label
This endpoint allows you to delete a label.
Request
DELETE
/v2/suppliers/:id/labels/:labelIdcurl -X DELETE https://api.lsp.expert/v2/suppliers/66f1313f9e477f90664d1ad8/labels/6654468b366ad245719322f4 \
-u {key}:
Response
{
"id": "6548c72a13162e1d7ade0290",
"name": "John Smith",
"address": {
"name": "John Smith"
},
"archived": false,
"labels": []
// ...
}