Taxes
The API allows you to configure and update taxes that will be applied to your products or services.
Create a tax
This endpoint allows the creation of a new tax in your application.
HTTP Request
POST/taxes
Parameters
Name | Type | Description |
---|---|---|
name | String / Required | Tax name |
percentage | Decimal / Required / Min:0 Max:100 | Percentage that will apply the tax, admits 2 decimals |
positive | Boolean / Required / true, false | Indicates whether the tax is applied positively or negatively |
default | Boolean / Required / true, false | Indicates if the tax is applied by default to products or services, there may be several by default |
Playload
{
"name": "Special",
"percentage": 10.55,
"positive": true,
"default": false
}
201Response
{
"data": {
"id": 21,
"name": "Special",
"version": "b61b5814-07e6-402d-acd7-09791e13de72",
"percentage": 10.55,
"positive": true,
"default": false,
"created_at": "2022-09-30T15:30:15+00:00",
"updated_at": "2022-09-30T15:30:15+00:00"
}
}
List taxes
This endpoint allows the consultation of all the taxes of your application. Taxes are returned ordered by name.
HTTP Request
GET/taxes
200 Response
{
"data": [
{
"id": 20,
"name": "IRPF",
"version": "279232c1-4b06-44af-9c4c-f4a681f00be9",
"percentage": 15,
"positive": false,
"default": true,
"created_at": "2022-09-30T15:30:15+00:00",
"updated_at": "2022-09-30T15:30:15+00:00"
},
{
"id": 19,
"name": "IVA",
"version": "5d9faebb-1b26-415f-a0bf-6fe854f1359f",
"percentage": 21,
"positive": true,
"default": true,
"created_at": "2022-09-29T15:30:15+00:00",
"updated_at": "2022-09-29T15:30:15+00:00"
},
{
"id": 21,
"name": "Special",
"version": "b61b5814-07e6-402d-acd7-09791e13de72",
"percentage": 10.55,
"positive": true,
"default": false,
"created_at": "2022-09-28T15:30:15+00:00",
"updated_at": "2022-09-28T15:30:15+00:00"
}
]
}
Get a tax
This endpoint allows the consultation of a tax of your application.
HTTP Request
GET/taxes/{id}
200 Response
{
"data": {
"id": 21,
"name": "Special",
"version": "b61b5814-07e6-402d-acd7-09791e13de72",
"percentage": 10.55,
"positive": true,
"default": false,
"created_at": "2022-09-30T15:30:15+00:00",
"updated_at": "2022-09-30T15:30:15+00:00"
}
}
Update a tax
This endpoint allows the update of a tax of your application.
HTTP Request
PATCH/taxes/{id}
Parameters
Name | Type | Description |
---|---|---|
name | String / Optional | Tax name |
percentage | NĂºmero decimal / Optional / Min:0 Max:100 | Percentage that will apply the tax, admits 2 decimals |
positive | Boolean / Optional / true, false | Indicates whether the tax is applied positively or negatively |
default | Boolean / Optional / true, false | Indicates if the tax is applied by default to products or services, there may be several by default |
All parameters are optional but at least one parameter with value must be sent.
Updating the value of the tax implies that a new version of it will be generated.
When editing a tax, the products in which it applies will be updated. No changes will be applied to invoices or estimates.
Playload
{
"percentage": 11,
"default": true
}
200Response
{
"data": {
"id": 21,
"name": "Special",
"version": "c7214772-51ee-49b1-8e92-7336c44d331b",
"percentage": 11,
"positive": true,
"default": true,
"created_at": "2022-09-30T15:30:15+00:00",
"updated_at": "2022-09-30T15:30:15+00:00"
}
}
Remove a tax
This endpoint allows the removal of a tax from your application.
It is not possible to delete if it is in use in the application.
HTTP Request
DELETE/taxes/{id}
204 Response
Response without body.