Invoice Series
Invoice series offer the possibility of differentiating invoices corresponding to different activities of the company or different periods.
Create an invoice series
This endpoint allows the creation of a new invoice series in your application.
HTTP Request
POST/invoices-series
Parameters
Name | Type | Description |
---|---|---|
name | String / Required | Invoice series name |
prefix | String / Required | Invoice series prefix, will precede the sequential number |
number | Integer / Required / Min:1 | Number at which the first invoice in the series starts, `1` is the most used value |
default | Boolean / Required / true, false | Indicates if it is the default series of its type |
rectification | Boolean / Required / true, false | Indicates the type, if it is a series for corrective invoices or not |
When sending a default series with the value `default` = `true` will be marked the rest of the series of its type (corrective or not) with value `false`, only one series will be default in each type.
Playload
{
"name": "Corrective",
"prefix": "R",
"number": 1,
"rectification": true,
"default": true
}
201Response
{
"data": {
"id": 24,
"name": "Corrective",
"prefix": "R",
"number": 1,
"rectification": true,
"default": true,
"created_at": "2022-09-30T15:30:15+00:00",
"updated_at": "2022-09-30T15:30:15+00:00"
}
}
List invoice series
This endpoint allows the consultation of invoice series of your application.
HTTP Request
GET/invoices-series
200 Response
{
"data": [
{
"id": 24,
"name": "Corrective",
"prefix": "R",
"number": 1,
"rectification": true,
"default": true,
"created_at": "2022-09-30T15:30:15+00:00",
"updated_at": "2022-09-30T15:30:15+00:00"
},
{
"id": 23,
"name": "Secondary",
"prefix": "FS",
"number": 1,
"rectification": false,
"default": false,
"created_at": "2022-09-29T15:30:15+00:00",
"updated_at": "2022-09-29T15:30:15+00:00"
},
{
"id": 22,
"name": "Principal",
"prefix": "F",
"number": 1,
"rectification": false,
"default": true,
"created_at": "2022-09-28T15:30:15+00:00",
"updated_at": "2022-09-28T15:30:15+00:00"
}
]
}
Get an invoice series
This endpoint allows the consultation of an invoice series of your application.
HTTP Request
GET/invoices-series/{id}
200 Response
{
"data": {
"id": 24,
"name": "Corrective",
"prefix": "R",
"number": 1,
"rectification": true,
"default": true,
"created_at": "2022-09-30T15:30:15+00:00",
"updated_at": "2022-09-30T15:30:15+00:00"
}
}
Update an invoice series
This endpoint allows updating an invoice series from your application.
Only the `name` and `default` attributes of a invoice serie in use can be updated, if additional parameters are sent they will be ignored.
HTTP Request
PATCH/invoices-series/{id}
Parameters
Name | Type | Description |
---|---|---|
name | String / Optional | Invoice series name |
prefix | String / Optional | Invoice series prefix, will precede the sequential number |
number | Integer / Optional / Min:1 | Number at which the first invoice in the series starts, `1` is the most used value |
default | Boolean / Optional / true, false | Indicates if it is the default series of its type |
rectification | Boolean / Optional / true, false | Indicates the type, if it is a series for corrective invoices or not |
A series in use cannot be deleted and can only be partially updated.
All parameters are optional but at least one parameter with value must be sent.
When sending a default series with the value `default` = `true` will be marked the rest of the series of its type (corrective or not) with value `false`, only one series will be default in each type.
Playload
{
"name": "Corrective serie"
}
204 Response
Response without body.
Delete an invoice series
This endpoint allows the deletion of an invoice series from your application.
It is not possible to delete if it is in use in the application.
HTTP Request
DELETE/invoices-series/{id}
204 Response
Response without body.
A series in use cannot be deleted and can only be partially updated.