> ## 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.

# Register series

> Register a new series with the AT for the supplier.

This endpoint registers a new series for the supplier. The series will be validated and registered with the Portuguese Tax Authority, and a validation code (used to generate ATCUD codes) will be returned.

For a detailed explanation of the `type` field (`N`, `F`, `R`) and other Portugal-specific series requirements, see the [Series Management](/guides/pt-at#series-management) section of the AT Portugal Guide.


## OpenAPI

````yaml POST /apps/at-pt/v1/entry/{silo_entry_id}/series
openapi: 3.1.0
info:
  contact:
    email: dev@invopop.com
    name: Invopop Developers
  description: Set of end-points to interact with the AT Portugal app API.
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  title: Portugal AT Service API
  version: 0.1.0
servers:
  - description: production
    url: https://api.invopop.com
security:
  - InvopopAuth: []
paths:
  /apps/at-pt/v1/entry/{silo_entry_id}/series:
    post:
      description: Register a new series with the AT for the supplier.
      parameters:
        - description: Silo entry ID of the supplier to register the series for.
          in: path
          name: silo_entry_id
          required: true
          schema:
            description: Silo entry ID of the supplier to register the series for.
            example: 347c5b04-cde2-11ed-afa1-0242ac120002
            title: Silo Entry ID
            type: string
      requestBody:
        content:
          application/json:
            schema:
              properties:
                base:
                  description: Base code for the series (without the document type prefix).
                  example: SERIES-A
                  title: Base
                  type: string
                document_type:
                  description: |-
                    Document type for the series:
                    - `FT`: Invoice (Fatura)
                    - `FS`: Simplified Invoice (Fatura Simplificada)
                    - `FR`: Invoice-Receipt (Fatura-Recibo)
                    - `ND`: Debit Note (Nota de Débito)
                    - `NC`: Credit Note (Nota de Crédito)
                    - `RG`: Receipt (Recibo)
                    - `GR`: Delivery Note (Guia de Remessa)
                    - `GT`: Waybill (Guia de Transporte)
                  enum:
                    - FT
                    - FS
                    - FR
                    - ND
                    - NC
                    - RG
                    - GR
                    - GT
                  example: FT
                  title: Document Type
                  type: string
                type:
                  description: |-
                    Type of the series:
                    - `N`: Normal
                    - `F`: Training (Formação)
                    - `R`: Recovery (Recuperação)
                  enum:
                    - 'N'
                    - F
                    - R
                  example: 'N'
                  title: Type
                  type: string
              required:
                - base
                - type
                - document_type
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Series'
          description: Series registered successfully.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Invalid parameters.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Supplier not found.
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: >-
            Validation error (e.g., supplier without AT credentials, invalid
            series type for current mode).
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Internal server error.
components:
  schemas:
    Series:
      properties:
        id:
          description: Series ID.
          example: 1d8ab49a-bd14-11ef-925f-325096b39f47
          title: ID
          type: string
        code:
          description: Full series code (document type + base code).
          example: FT SERIES-A
          title: Code
          type: string
        base:
          description: Base code for the series.
          example: SERIES-A
          title: Base
          type: string
        document_type:
          description: Document type for the series.
          example: FT
          title: Document Type
          type: string
        type:
          description: Type of the series.
          example: 'N'
          title: Type
          type: string
        validation_code:
          description: AT validation code for the series used to generate ATCUD codes.
          example: AAJFJ3N5YS
          title: Validation Code
          type: string
      type: object
    Error:
      properties:
        message:
          description: Details of the error.
          title: Message
          type: string
      type: object
  securitySchemes:
    InvopopAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: |
        Use the `Bearer` scheme with a valid JWT token to authenticate requests.

        Example: `Authorization: Bearer <token>`

````