Taxes

A tax represents tax that can be applied to an invoice. For example, VAT or GST.

The tax object

Properties

  • idstring

    Unique identifier for the object.

  • namestring

    The name of the tax.

  • disabledboolean

    True if the tax is disabled.

  • isDefaultTax1boolean

    True is by default applied as first tax when creating a client.

  • isDefaultTax2boolean

    True is by default applied as second tax when creating a client.

  • valuenumber

    The value of the tax (as a percentage min -1 max 1).

tax object

{
  "id": "6548c1705136b418fd626e65",
  "name": "VAT",
  "value": 0.21,
  "disabled": false,
  "isDefaultTax1": true,
  "isDefaultTax2": false
}

GET/v2/account/taxes

List all taxes

This endpoint allows you to retrieve all the taxes.

Request

GET
/v2/account/taxes
curl -G https://api.lsp.expert/v2/account/taxes \
  -u {key}: 

Response

[
  {
    "id": "6548c1705136b418fd626e65",
    "name": "VAT",
    "value": 0.21,
    "disabled": false,
    "isDefaultTax1": true,
    "isDefaultTax2": false
  }
  // ...
]


POST/v2/account/taxes

Create a tax

This endpoint allows you to add a new tax.

Parameters

  • namestring Required

    The name of the tax.

  • valuenumber Required

    The value of the tax (as a percentage min -1 max 1).

Request

POST
/v2/account/taxes
curl https://api.lsp.expert/v2/account/taxes \
  -u {key}: \
  -d name="VAT" \
  -d value=0.21

Response

{
  "id": "66e7f69da9d8b6741f4a441d",
  "name": "VAT",
  "value": 0.21,
  "disabled": false,
  "isDefaultTax1": false,
  "isDefaultTax2": false
}


PUT/v2/account/taxes/:id

Update a tax

This endpoint allows you to perform an update on a tax. Any parameters not provided will be left unchanged.

Parameters

  • namestring

    The name of the tax.

  • disabledboolean

    True if the tax is disabled.

  • isDefaultTax1boolean

    True is by default applied as first tax when creating a client.

  • isDefaultTax2boolean

    True is by default applied as second tax when creating a client.

  • valuenumber

    The value of the tax (as a percentage min -1 max 1).

Request

PUT
/v2/account/taxes/:id
curl -X PUT https://api.lsp.expert/v2/account/taxes/66e7f69da9d8b6741f4a441d \
  -u {key}: \
  -d isDefaultTax1=true

Response

{
  "id": "66e7f69da9d8b6741f4a441d",
  "name": "VAT",
  "value": 0.21,
  "disabled": false,
  "isDefaultTax1": true,
  "isDefaultTax2": false
}

DELETE/v2/account/taxes/:id

Delete a tax

This endpoint allows you to delete a tax.

Request

DELETE
/v2/account/taxes/66e7f69da9d8b6741f4a441d
curl -X DELETE https://api.lsp.expert/v2/account/taxes/66e7f69da9d8b6741f4a441d \
  -u {key}: