API documentation

v1.0

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

NameTypeDescription
nameString / RequiredInvoice series name
prefixString / RequiredInvoice series prefix, will precede the sequential number
numberInteger / Required / Min:1Number at which the first invoice in the series starts, `1` is the most used value
defaultBoolean / Required / true, falseIndicates if it is the default series of its type
rectificationBoolean / Required / true, falseIndicates 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

NameTypeDescription
nameString / OptionalInvoice series name
prefixString / OptionalInvoice series prefix, will precede the sequential number
numberInteger / Optional / Min:1Number at which the first invoice in the series starts, `1` is the most used value
defaultBoolean / Optional / true, falseIndicates if it is the default series of its type
rectificationBoolean / Optional / true, falseIndicates 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.