> ## Documentation Index
> Fetch the complete documentation index at: https://docs.invopop.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Series

> A series is a placeholder for a counter with number formatting details to be able to generate a code.

## Overview

**Series** allow users to configure numbering templates for any document that requires unique sequential identifiers (such as invoices). Each series defines how numbers are formatted, including prefixes, suffixes, and zero-padding rules. For example, given a series configured with the options on the left, will produce a identifiers as in the right box:

<div class="flex gap-8">
  <div class="grow">
    |              |       |
    | ------------ | ----- |
    | Prefix       | `ES-` |
    | Padding      | `5`   |
    | Start number | `1`   |
    | Code         | `INV` |
  </div>

  <div class="grow">
    ```
    INV-ES-00001
    INV-ES-00002
    INV-ES-00003
    INV-ES-00001
    INV-ES-00002
    INV-ES-00003
    ```
  </div>
</div>

## Create a new series

<Frame>
  <img src="https://mintcdn.com/invopop/fWniCD0icTwRKXxR/assets/console/series-create.png?fit=max&auto=format&n=fWniCD0icTwRKXxR&q=85&s=9b5e20444149bf41a124f5581555762a" alt="Email app connected" width="2068" height="1242" data-path="assets/console/series-create.png" />
</Frame>

| **Field**                  | **Description**                                                                             | **API Property** |
| -------------------------- | ------------------------------------------------------------------------------------------- | ---------------- |
| **Name**                   | Human-readable label identifying the series.                                                | `name`           |
| **Code** (Optional)        | Internal or business code used to categorize series.                                        | `code`           |
| **Prefix** (Optional)      | Text placed before the numeric portion of the generated code.                               | `prefix`         |
| **Padding**                | Total number of digits in the numeric sequence. Zeros are added to the left when necessary. | `padding`        |
| **Start Number**           | The first number to be issued in the sequence.                                              | `last_index`     |
| **Suffix** (Optional)      | Text appended after the numeric part.                                                       | `suffix`         |
| **Description** (Optional) | Free text for internal documentation or identification.                                     | `description`    |

## Preview panel

On the right side of the form, the UI displays a **live preview** of the resulting code based on the current field values.
For example:

```
INV-ES-00001
```

Here you can verify the final output format before saving.

## Using your series

You will be able to use the series you've created from the API or through the "Add sequential code" step in your workflow. This will ensure your invoice numbers remain numbered correctly, as many regimes require not only unique invoice identifiers but also sequential numbering.

### 'Add sequential code' workflow step

<Frame>
  <img src="https://mintcdn.com/invopop/H_oChJH7Z1ZQfhZp/assets/console/add-dynamic-sequence.png?fit=max&auto=format&n=H_oChJH7Z1ZQfhZp&q=85&s=d8671ba13a23193287ff136a4caed49e" width="398" data-path="assets/console/add-dynamic-sequence.png" />
</Frame>

This workflow step allows you to use previously created Series, or to use a new numbering sequence tied specifically to the Tax ID and the series of the originating document. If "Dynamic sequence" is selected, the document must have a `series` defined.

## Tips

* Use **prefixes** for country or business unit codes (e.g., `ES-`, `FR-`, `US-`).
* Adjust **padding** to maintain consistent visual width across codes, and make sure you choose a length adequate for your invoicing volume.
* **Start Number** will usually be `1`, unless you are continuing a series.
* **Code** and **Description** fields are for human readability and internal organization.

## Related resources

|                |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| API Reference  | <Icon icon="code" /> [Sequences - Introduction](/api-ref/sequences/introduction)<br /><Icon icon="code" /> [Series - Overview](/api-ref/sequences/series/overview)<br /><Icon icon="code" /> [Series - Fetch all series](/api-ref/sequences/series/fetch-all-series)<br /><Icon icon="code" /> [Series - Create a series](/api-ref/sequences/series/create-a-series)<br /><Icon icon="code" /> [Series - Fetch a series](/api-ref/sequences/series/fetch-a-series)<br /><Icon icon="code" /> [Entries - Overview](/api-ref/sequences/entries/overview)<br /><Icon icon="code" /> [Entries - Fetch all series entries](/api-ref/sequences/entries/fetch-all-series-entries)<br /><Icon icon="code" /> [Entries - Create a series entry](/api-ref/sequences/entries/create-a-series-entry)<br /><Icon icon="code" /> [Entries - Fetch a series entry](/api-ref/sequences/entries/fetch-a-series-entry) |
| Related Guides | <Icon icon="book" /> [Series Guide](/guides/series)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |

## FAQ

<AccordionGroup>
  <Accordion title="Job fails with 'series required when code_id not present'">
    This happens because you have not defined a `series` in your document. This is used to determine which dynamic sequence to assign in the "Add sequential code" workflow step.
  </Accordion>

  <Accordion title="Should I use a different series for each document type?">
    Many jurisdictions require separate numbering series for different document types; e.g., one for standard invoices and another for credit notes. Even when it’s not mandatory, keeping distinct series is simply good practice and makes administration easier, so we recommend this approach.
  </Accordion>
</AccordionGroup>
