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