Labels

Labels represent labels associated with an invoice. They can be used to categorize invoices and filter them in the invoices list.

The Label object

Properties

  • colorstring

    The color of the label.

  • idstring

    The id of the label.

  • namestring

    The name of the label.

Client object

{
  "id": "6654468b366ad245719322f4",
  "name": "VIP",
  "color": "#991b1b"
}

POST/v2/invoices/:id/labels/:labelId

Add a label

This endpoint allows you to add a label.

Parameters

    Request

    POST
    /v2/invoices/:id/labels
    curl https://api.lsp.expert/v2/invoices/6548c72a13162e1d7ade0290/labels/6654468b366ad245719322f4 \
      -u {key}:
    

    Response

    {
      "id": "6548c72a13162e1d7ade0290",
      "number": "001",
      "labels": [
        {
          "id": "6654468b366ad245719322f4",
          "name": "VIP",
          "color": "#991b1b"
        }
      ]
      // ...
    }
    
    

    DELETE/v2/invoices/:id/labels/:labelId

    Delete a label

    This endpoint allows you to delete a label.

    Request

    DELETE
    /v2/invoices/:id/labels/:labelId
    curl -X DELETE https://api.lsp.expert/v2/invoices/66f1313f9e477f90664d1ad8/labels/6654468b366ad245719322f4 \
      -u {key}:
    

    Response

    {
      "id": "6548c72a13162e1d7ade0290",
      "number": "001",
      "labels": []
      // ...
    }