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

# Creare un'entità

Registra una persona fisica (INDIVIDUAL) o una persona giuridica (COMPANY) con il relativo documento identificativo. L'entità viene creata nello stato PENDING\_KYC senza file: carica i file giustificativi in seguito con “Caricare un documento probatorio”.

* I dati KYC minimi vengono convalidati alla creazione: name e lastname per INDIVIDUAL, name per COMPANY. In caso contrario, l'API restituisce 422 INCOMPLETE\_KYC\_DATA.
* Le proprietà sconosciute vengono rifiutate con 400 VALIDATION\_ERROR. Inserisci gli eventuali dati aggiuntivi in attributes.
* I codici paese devono essere in formato ISO 3166-1 alpha-3 (BRA, non BR).
* Un identificativo fiscale (CPF, CNPJ, CUIT, RFC, …) è un documento, non un campo dell'entità. Invialo in document; documents\[] non è accettato alla creazione (400 VALIDATION\_ERROR).
* Aggiungi gli altri documenti (documento d'identità, prova di residenza, atto costitutivo) con “Aggiungere un documento”.
* Conserva document.documentId dalla risposta: è il docId da usare per caricare i file sul documento principale.

Gli errori usano `application/problem+json` con un `code` stabile. Catalogo completo: [Stati delle entità e codici di errore](https://docs.localpayment.com/it/reference/entity-statuses-and-error-codes.md).


## OpenAPI

````yaml openapi/it/localpayment.json POST /api/entity/v1/entities
openapi: 3.1.0
info:
  version: '1.0'
  title: Localpayment
  contact:
    name: Support
    url: mailto:support@localpayment.com
servers:
  - url: https://api.stage.localpayment.com
    description: Stage
security:
  - token: []
paths:
  /api/entity/v1/entities:
    post:
      summary: Creare un'entità
      operationId: create-entity
      parameters:
        - name: Authorization
          in: header
          description: >-
            Token di accesso Bearer per l'autenticazione. Questo token si
            ottiene dagli endpoint [Ottenere il token di
            accesso](/it/reference/get-token) o [Rinnovare il token di
            accesso](/it/reference/refresh-token). Da esso vengono ricavati il
            tuo conto esercente e l'utente che esegue l'operazione.
          required: true
          schema:
            type: string
            examples:
              - Bearer <your_access_token>
        - name: X-Correlation-ID
          in: header
          description: >-
            Identificatore di traccia (UUID). Restituito nella risposta;
            generato da Localpayment se assente.
          required: false
          schema:
            type: string
            examples:
              - 0e8f6a2c-5b3d-4c1e-9a7f-6d5e4c3b2a10
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                externalId:
                  type: string
                  description: >-
                    Il tuo identificatore per l'entità. Univoco per esercente,
                    da 1 a 64 caratteri.
                  examples:
                    - f47ac10b-58cc-4372-a567-0e02b2c3d479
                type:
                  type: string
                  description: INDIVIDUAL (persona fisica) o COMPANY (persona giuridica).
                  enum:
                    - INDIVIDUAL
                    - COMPANY
                  examples:
                    - COMPANY
                name:
                  type: string
                  description: >-
                    Nome (INDIVIDUAL) o ragione sociale (COMPANY). Fino a 255
                    caratteri.
                  examples:
                    - Example Company S.A.
                lastname:
                  type: string
                  description: Cognome. Obbligatorio per INDIVIDUAL. Fino a 255 caratteri.
                  examples:
                    - Doe
                birthdate:
                  type: string
                  format: date
                  description: YYYY-MM-DD. Consigliato per INDIVIDUAL.
                  examples:
                    - '1990-01-15'
                gender:
                  type: string
                  description: MALE, FEMALE, OTHER o UNDISCLOSED.
                  enum:
                    - MALE
                    - FEMALE
                    - OTHER
                    - UNDISCLOSED
                  examples:
                    - FEMALE
                nationality:
                  type: string
                  description: Codice ISO 3166-1 alpha-3 (BRA, ARG, MEX).
                  examples:
                    - BRA
                birthCountry:
                  type: string
                  description: Codice ISO 3166-1 alpha-3.
                  examples:
                    - BRA
                residenceCountry:
                  type: string
                  description: >-
                    Codice ISO 3166-1 alpha-3. Per una COMPANY, paese di
                    residenza fiscale.
                  examples:
                    - BRA
                occupation:
                  type: string
                  description: Professione della persona. Fino a 100 caratteri.
                  examples:
                    - Engineer
                isPep:
                  type: boolean
                  description: 'Persona politicamente esposta. Valore predefinito: false.'
                  examples:
                    - false
                incorporationDate:
                  type: string
                  format: date
                  description: YYYY-MM-DD. Solo COMPANY.
                  examples:
                    - '2020-01-15'
                incorporationCountry:
                  type: string
                  description: Codice ISO 3166-1 alpha-3. Solo COMPANY.
                  examples:
                    - BRA
                website:
                  type: string
                  description: Sito web dell'azienda. Fino a 255 caratteri.
                  examples:
                    - https://www.example.com
                legalRepresentativeName:
                  type: string
                  description: >-
                    Nome del rappresentante legale (COMPANY). Fino a 255
                    caratteri.
                  examples:
                    - Jane Doe
                email:
                  type: string
                  description: E-mail di contatto. Fino a 255 caratteri.
                  examples:
                    - test@example.com
                phone:
                  type: object
                  description: Telefono di contatto, solo cifre in ciascuna parte.
                  properties:
                    countryCode:
                      type: string
                      description: Prefisso internazionale senza + (55), da 1 a 4 cifre.
                      examples:
                        - '55'
                    areaCode:
                      type: string
                      description: Prefisso (11), da 1 a 5 cifre.
                      examples:
                        - '11'
                    number:
                      type: string
                      description: >-
                        Numero locale (999990001), da 4 a 15 cifre. Obbligatorio
                        quando viene inviato phone.
                      examples:
                        - '999990000'
                address:
                  type: object
                  description: Indirizzo postale. Se viene inviato, country è obbligatorio.
                  properties:
                    street:
                      type: string
                      description: Nome della via, fino a 256 caratteri.
                      examples:
                        - Rua Exemplo
                    number:
                      type: string
                      description: Numero civico, fino a 20 caratteri.
                      examples:
                        - '100'
                    line2:
                      type: string
                      description: >-
                        Riga aggiuntiva dell'indirizzo (appartamento, piano,
                        interno), fino a 256 caratteri.
                      examples:
                        - Sala 100
                    line3:
                      type: string
                      description: >-
                        Seconda riga aggiuntiva dell'indirizzo, fino a 256
                        caratteri.
                      examples:
                        - Torre A
                    city:
                      type: string
                      description: Città, fino a 100 caratteri.
                      examples:
                        - São Paulo
                    state:
                      type: string
                      description: >-
                        Stato o provincia, fino a 100 caratteri. Usa il codice
                        ISO 3166-2 (SP).
                      examples:
                        - SP
                    zipCode:
                      type: string
                      description: Codice postale, fino a 20 caratteri.
                      examples:
                        - 01310-100
                    country:
                      type: string
                      description: >-
                        Codice ISO 3166-1 alpha-3. Obbligatorio quando viene
                        inviato address.
                      examples:
                        - BRA
                    comment:
                      type: string
                      description: >-
                        Informazioni aggiuntive sull'indirizzo (piano,
                        appartamento, riferimenti), fino a 255 caratteri.
                      examples:
                        - Sala 100
                attributes:
                  type: object
                  description: >-
                    Campi personalizzati definiti dal tuo schema di campi
                    personalizzati (vedi Campi personalizzati). Fino a 64 KB.
                document:
                  type: object
                  description: >-
                    Documento identificativo dell'entità (codice fiscale o
                    documento d'identità). Diventa il documento principale. Gli
                    altri documenti si aggiungono in seguito con “Aggiungere un
                    documento”.
                  properties:
                    type:
                      type: string
                      description: Consulta “Tipi di documenti e documenti probatori”.
                      enum:
                        - DNI
                        - NATIONAL_ID
                        - DRIVER_LICENSE
                        - PASSPORT
                        - CE
                        - CC
                        - CUIT
                        - CUIL
                        - RFC
                        - CURP
                        - CPF
                        - CNPJ
                        - RUC
                        - NIT
                        - TAX_ID
                        - ARTICLES_OF_INCORPORATION
                        - POWER_OF_ATTORNEY
                        - TAX_CERTIFICATE
                        - PAYSLIP
                        - ARCA_REGISTRATION
                        - PROOF_OF_ADDRESS
                        - PROOF_OF_FUNDS
                        - OTHER
                      examples:
                        - CNPJ
                    id:
                      type: string
                      description: >-
                        Numero del documento come emesso, da 1 a 30 caratteri.
                        Univoco insieme a type nel tuo conto esercente.
                      examples:
                        - '00000000000100'
                    issuingCountry:
                      type: string
                      description: Codice ISO 3166-1 alpha-3.
                      examples:
                        - BRA
                    issueDate:
                      type: string
                      format: date
                      description: Formato YYYY-MM-DD.
                      examples:
                        - '2024-01-15'
                    expirationDate:
                      type: string
                      format: date
                      description: >-
                        YYYY-MM-DD. Una data passata contrassegna il documento
                        come EXPIRED.
                      examples:
                        - '2034-01-15'
                    metadata:
                      type: object
                      description: Metadati in formato libero del documento.
                  required:
                    - type
                    - id
              required:
                - externalId
                - type
                - name
                - document
            examples:
              Example 1 - INDIVIDUAL:
                value:
                  externalId: 550e8400-e29b-41d4-a716-446655440000
                  type: INDIVIDUAL
                  name: Jane
                  lastname: Doe
                  birthdate: '1990-01-15'
                  nationality: BRA
                  birthCountry: BRA
                  residenceCountry: BRA
                  isPep: false
                  email: jane.doe@example.com
                  phone:
                    countryCode: '55'
                    areaCode: '11'
                    number: '999990001'
                  address:
                    street: Rua Exemplo
                    number: '123'
                    city: São Paulo
                    state: SP
                    zipCode: 01310-100
                    country: BRA
                  document:
                    type: CPF
                    id: '00000000000'
                    issuingCountry: BRA
              Example 2 - COMPANY example:
                value:
                  externalId: f47ac10b-58cc-4372-a567-0e02b2c3d479
                  type: COMPANY
                  name: Example Company S.A.
                  incorporationCountry: BRA
                  incorporationDate: '2020-01-15'
                  website: https://www.example.com
                  email: test@example.com
                  phone:
                    countryCode: '55'
                    areaCode: '11'
                    number: '999990000'
                  legalRepresentativeName: Jane Doe
                  isPep: false
                  address:
                    street: Rua Exemplo
                    number: '100'
                    city: São Paulo
                    state: SP
                    zipCode: 01310-100
                    country: BRA
                    line2: Sala 100
                    line3: Torre A
                  document:
                    type: CNPJ
                    id: '00000000000100'
                    issuingCountry: BRA
                  attributes:
                    reasonForAccountOpening: receive_payments_for_goods_and_services
                    sourceOfFundsAndIncome: sales_of_goods_and_services
                    numberOfEmployees: 11-50
                    estimatedAnnualRevenueUsd: 1m_to_10m
                    estimatedMonthlyVolumeUsd: '50000'
                    businessActivityDescription: >-
                      Online retail of home goods. Receives payments from end
                      customers in Brazil via PIX.
                    countryTaxResidence: BRA
                    socialMedia: https://www.linkedin.com/company/example
                    emailPixKey: test@example.com
      responses:
        '201':
          description: Creato.
          content:
            application/json:
              schema:
                type: object
                properties:
                  internalId:
                    type: string
                    examples:
                      - 5aced5da-40c1-4bec-85ff-c8cd1bcb4526
                    format: uuid
                    description: >-
                      Identificatore Localpayment dell'entità. Usalo in tutti
                      gli altri endpoint di Entities.
                  externalId:
                    type: string
                    examples:
                      - 550e8400-e29b-41d4-a716-446655440000
                    description: Il tuo identificatore, così come inviato.
                  type:
                    type: string
                    examples:
                      - INDIVIDUAL
                    enum:
                      - INDIVIDUAL
                      - COMPANY
                    description: INDIVIDUAL o COMPANY.
                  status:
                    type: string
                    examples:
                      - PENDING_KYC
                    enum:
                      - PENDING_KYC
                      - IN_REVIEW
                      - ACTIVE
                      - REJECTED
                      - BLOCKED
                      - CLOSED
                    description: >-
                      Stato dell'entità. Consulta “Stati delle entità e codici
                      di errore”.
                  name:
                    type: string
                    examples:
                      - Jane
                  lastname:
                    type: string
                    examples:
                      - Doe
                  birthdate:
                    type: string
                    examples:
                      - '1990-01-15'
                    format: date
                  gender:
                    type:
                      - string
                      - 'null'
                  nationality:
                    type: string
                    examples:
                      - BRA
                  birthCountry:
                    type: string
                    examples:
                      - BRA
                  residenceCountry:
                    type: string
                    examples:
                      - BRA
                  occupation:
                    type:
                      - string
                      - 'null'
                  isPep:
                    type: boolean
                    examples:
                      - false
                  incorporationDate:
                    type:
                      - string
                      - 'null'
                    format: date
                  incorporationCountry:
                    type:
                      - string
                      - 'null'
                  website:
                    type:
                      - string
                      - 'null'
                  legalRepresentativeName:
                    type:
                      - string
                      - 'null'
                  email:
                    type: string
                    examples:
                      - jane.doe@example.com
                  phone:
                    type: object
                    properties:
                      countryCode:
                        type: string
                        examples:
                          - '55'
                      areaCode:
                        type: string
                        examples:
                          - '11'
                      number:
                        type: string
                        examples:
                          - '999990001'
                  address:
                    type: object
                    properties:
                      street:
                        type: string
                        examples:
                          - Rua Exemplo
                      city:
                        type: string
                        examples:
                          - São Paulo
                      state:
                        type: string
                        examples:
                          - SP
                      zipCode:
                        type: string
                        examples:
                          - 01310-100
                      number:
                        type: string
                        examples:
                          - '123'
                      comment:
                        type:
                          - string
                          - 'null'
                      country:
                        type: string
                        examples:
                          - BRA
                      line2:
                        type:
                          - string
                          - 'null'
                      line3:
                        type:
                          - string
                          - 'null'
                  attributes:
                    type:
                      - object
                      - 'null'
                  documentationStatus:
                    type: string
                    examples:
                      - NO_FILES
                    enum:
                      - NO_FILES
                      - PARTIAL
                      - COMPLETE
                    description: >-
                      NO_FILES, PARTIAL o COMPLETE: indica se nessuno, alcuni o
                      tutti i documenti dichiarati hanno almeno un file. Misura
                      la presenza di file, non l'approvazione.
                  document:
                    type: object
                    properties:
                      documentId:
                        type: string
                        examples:
                          - 2e16d844-4fa9-4295-9a21-83ec32ef241a
                        format: uuid
                      entityId:
                        type: string
                        examples:
                          - 5aced5da-40c1-4bec-85ff-c8cd1bcb4526
                        format: uuid
                      type:
                        type: string
                        examples:
                          - CPF
                        enum:
                          - DNI
                          - NATIONAL_ID
                          - DRIVER_LICENSE
                          - PASSPORT
                          - CE
                          - CC
                          - CUIT
                          - CUIL
                          - RFC
                          - CURP
                          - CPF
                          - CNPJ
                          - RUC
                          - NIT
                          - TAX_ID
                          - ARTICLES_OF_INCORPORATION
                          - POWER_OF_ATTORNEY
                          - TAX_CERTIFICATE
                          - PAYSLIP
                          - ARCA_REGISTRATION
                          - PROOF_OF_ADDRESS
                          - PROOF_OF_FUNDS
                          - OTHER
                        description: INDIVIDUAL o COMPANY.
                      id:
                        type: string
                        examples:
                          - '00000000000'
                      issuingCountry:
                        type: string
                        examples:
                          - BRA
                      issueDate:
                        type:
                          - string
                          - 'null'
                        format: date
                      expirationDate:
                        type:
                          - string
                          - 'null'
                        format: date
                      isPrimary:
                        type: boolean
                        examples:
                          - true
                      status:
                        type: string
                        examples:
                          - PENDING
                        enum:
                          - PENDING
                          - VERIFIED
                          - REJECTED
                          - EXPIRED
                        description: >-
                          Stato derivato del documento: EXPIRED se
                          expirationDate è già passata, REJECTED se un documento
                          probatorio attivo è stato rifiutato, VERIFIED se tutti
                          i documenti probatori attivi sono approvati,
                          altrimenti PENDING.
                      metadata:
                        type:
                          - object
                          - 'null'
                      proofs:
                        type: array
                        items:
                          type: object
                      createdAt:
                        type: string
                        examples:
                          - '2024-01-15T17:03:10Z'
                        format: date-time
                        description: Timestamp UTC in formato ISO 8601.
                      updatedAt:
                        type: string
                        examples:
                          - '2024-01-15T17:03:10Z'
                        format: date-time
                        description: Timestamp UTC in formato ISO 8601.
                    description: >-
                      Il documento principale con il relativo documentId
                      (necessario per caricare i file), lo stato derivato e i
                      proofs[] correnti.
                  documents:
                    type: array
                    items:
                      type: object
                    description: >-
                      Gli altri documenti dichiarati (quello principale è solo
                      in document), con la stessa struttura.
                  version:
                    type: integer
                    examples:
                      - 0
                    description: >-
                      Versione dell'entità. Corrisponde all'header ETag;
                      rinviala come If-Match nella richiesta PATCH.
                  createdAt:
                    type: string
                    examples:
                      - '2024-01-15T17:03:10Z'
                    format: date-time
                    description: Timestamp UTC in formato ISO 8601.
                  updatedAt:
                    type: string
                    examples:
                      - '2024-01-15T17:03:10Z'
                    format: date-time
                    description: Timestamp UTC in formato ISO 8601.
                  customFieldSchemaVersion:
                    type:
                      - integer
                      - 'null'
                    description: >-
                      Versione dello schema dei campi personalizzati usata per
                      convalidare attributes, oppure null.
              examples:
                Example 1:
                  value:
                    internalId: 5aced5da-40c1-4bec-85ff-c8cd1bcb4526
                    externalId: 550e8400-e29b-41d4-a716-446655440000
                    type: INDIVIDUAL
                    status: PENDING_KYC
                    name: Jane
                    lastname: Doe
                    birthdate: '1990-01-15'
                    gender: null
                    nationality: BRA
                    birthCountry: BRA
                    residenceCountry: BRA
                    occupation: null
                    isPep: false
                    incorporationDate: null
                    incorporationCountry: null
                    website: null
                    legalRepresentativeName: null
                    email: jane.doe@example.com
                    phone:
                      countryCode: '55'
                      areaCode: '11'
                      number: '999990001'
                    address:
                      street: Rua Exemplo
                      city: São Paulo
                      state: SP
                      zipCode: 01310-100
                      number: '123'
                      comment: null
                      country: BRA
                      line2: null
                      line3: null
                    attributes: null
                    documentationStatus: NO_FILES
                    document:
                      documentId: 2e16d844-4fa9-4295-9a21-83ec32ef241a
                      entityId: 5aced5da-40c1-4bec-85ff-c8cd1bcb4526
                      type: CPF
                      id: '00000000000'
                      issuingCountry: BRA
                      issueDate: null
                      expirationDate: null
                      isPrimary: true
                      status: PENDING
                      metadata: null
                      proofs: []
                      createdAt: '2024-01-15T17:03:10Z'
                      updatedAt: '2024-01-15T17:03:10Z'
                    documents: []
                    version: 0
                    createdAt: '2024-01-15T17:03:10Z'
                    updatedAt: '2024-01-15T17:03:10Z'
                    customFieldSchemaVersion: null
          headers:
            ETag:
              description: >-
                Versione dell'entità. Rinviala come If-Match in “Aggiornare
                un'entità”.
              schema:
                type: string
                examples:
                  - '"0"'
        '400':
          description: >-
            Richiesta non valida. VALIDATION_ERROR: un campo, un header, un
            parametro di percorso o di query è mancante, sconosciuto o non
            valido. details[] elenca il campo e il problema.
            CUSTOM_FIELDS_INVALID: attributes non soddisfa il tuo schema di
            campi personalizzati. details[] elenca il campo e il problema.
          content:
            application/problem+json:
              schema:
                type: object
                description: >-
                  Dettagli del problema secondo RFC 9457
                  (application/problem+json).
                properties:
                  type:
                    type: string
                    examples:
                      - about:blank
                  title:
                    type: string
                    description: Breve riepilogo del problema.
                  status:
                    type: integer
                    description: Codice di stato HTTP.
                  detail:
                    type: string
                    description: Spiegazione leggibile.
                  instance:
                    type: string
                    description: Percorso della richiesta.
                  code:
                    type: string
                    description: >-
                      Codice di errore stabile e leggibile automaticamente. Basa
                      la tua logica su questo valore.
                  correlationId:
                    type: string
                    format: uuid
                    description: >-
                      Identificatore della richiesta. Indicalo quando contatti
                      l'assistenza.
                    examples:
                      - 0e8f6a2c-5b3d-4c1e-9a7f-6d5e4c3b2a10
                  details:
                    type: array
                    description: Campi non validi, se applicabile.
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                          examples:
                            - numberOfEmployees
                        issue:
                          type: string
                          examples:
                            - NOT_IN_OPTIONS
              examples:
                Example 1 - VALIDATION_ERROR:
                  value:
                    type: about:blank
                    title: Validation error
                    status: 400
                    detail: >-
                      A field, header, path or query parameter is missing,
                      unknown or invalid. details[] lists field and issue.
                    instance: /api/entity/v1/entities
                    code: VALIDATION_ERROR
                    correlationId: 0e8f6a2c-5b3d-4c1e-9a7f-6d5e4c3b2a10
                    details:
                      - field: externalId
                        issue: REQUIRED
                Example 2 - CUSTOM_FIELDS_INVALID:
                  value:
                    type: about:blank
                    title: Validation error
                    status: 400
                    detail: >-
                      attributes does not satisfy your custom-fields schema.
                      details[] lists field and issue.
                    instance: /api/entity/v1/entities
                    code: CUSTOM_FIELDS_INVALID
                    correlationId: 0e8f6a2c-5b3d-4c1e-9a7f-6d5e4c3b2a10
                    details:
                      - field: numberOfEmployees
                        issue: NOT_IN_OPTIONS
        '401':
          description: >-
            Non autorizzato. UNAUTHORIZED: token di accesso mancante o non
            valido.
          content:
            application/problem+json:
              schema:
                type: object
                description: >-
                  Dettagli del problema secondo RFC 9457
                  (application/problem+json).
                properties:
                  type:
                    type: string
                    examples:
                      - about:blank
                  title:
                    type: string
                    description: Breve riepilogo del problema.
                  status:
                    type: integer
                    description: Codice di stato HTTP.
                  detail:
                    type: string
                    description: Spiegazione leggibile.
                  instance:
                    type: string
                    description: Percorso della richiesta.
                  code:
                    type: string
                    description: >-
                      Codice di errore stabile e leggibile automaticamente. Basa
                      la tua logica su questo valore.
                  correlationId:
                    type: string
                    format: uuid
                    description: >-
                      Identificatore della richiesta. Indicalo quando contatti
                      l'assistenza.
                    examples:
                      - 0e8f6a2c-5b3d-4c1e-9a7f-6d5e4c3b2a10
                  details:
                    type: array
                    description: Campi non validi, se applicabile.
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                          examples:
                            - numberOfEmployees
                        issue:
                          type: string
                          examples:
                            - NOT_IN_OPTIONS
              examples:
                Example 1 - UNAUTHORIZED:
                  value:
                    type: about:blank
                    title: Unauthorized
                    status: 401
                    detail: Missing or invalid access token.
                    instance: /api/entity/v1/entities
                    code: UNAUTHORIZED
                    correlationId: 0e8f6a2c-5b3d-4c1e-9a7f-6d5e4c3b2a10
                    details: []
        '409':
          description: >-
            Conflitto. DUPLICATE_ENTITY: externalId, o la coppia type + id di un
            documento, esiste già nel tuo conto esercente.
          content:
            application/problem+json:
              schema:
                type: object
                description: >-
                  Dettagli del problema secondo RFC 9457
                  (application/problem+json).
                properties:
                  type:
                    type: string
                    examples:
                      - about:blank
                  title:
                    type: string
                    description: Breve riepilogo del problema.
                  status:
                    type: integer
                    description: Codice di stato HTTP.
                  detail:
                    type: string
                    description: Spiegazione leggibile.
                  instance:
                    type: string
                    description: Percorso della richiesta.
                  code:
                    type: string
                    description: >-
                      Codice di errore stabile e leggibile automaticamente. Basa
                      la tua logica su questo valore.
                  correlationId:
                    type: string
                    format: uuid
                    description: >-
                      Identificatore della richiesta. Indicalo quando contatti
                      l'assistenza.
                    examples:
                      - 0e8f6a2c-5b3d-4c1e-9a7f-6d5e4c3b2a10
                  details:
                    type: array
                    description: Campi non validi, se applicabile.
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                          examples:
                            - numberOfEmployees
                        issue:
                          type: string
                          examples:
                            - NOT_IN_OPTIONS
              examples:
                Example 1 - DUPLICATE_ENTITY:
                  value:
                    type: about:blank
                    title: Conflict
                    status: 409
                    detail: >-
                      externalId, or the pair type + id of a document, already
                      exists in your merchant.
                    instance: /api/entity/v1/entities
                    code: DUPLICATE_ENTITY
                    correlationId: 0e8f6a2c-5b3d-4c1e-9a7f-6d5e4c3b2a10
                    details: []
        '413':
          description: 'Payload troppo grande. PAYLOAD_TOO_LARGE: attributes supera i 64 KB.'
          content:
            application/problem+json:
              schema:
                type: object
                description: >-
                  Dettagli del problema secondo RFC 9457
                  (application/problem+json).
                properties:
                  type:
                    type: string
                    examples:
                      - about:blank
                  title:
                    type: string
                    description: Breve riepilogo del problema.
                  status:
                    type: integer
                    description: Codice di stato HTTP.
                  detail:
                    type: string
                    description: Spiegazione leggibile.
                  instance:
                    type: string
                    description: Percorso della richiesta.
                  code:
                    type: string
                    description: >-
                      Codice di errore stabile e leggibile automaticamente. Basa
                      la tua logica su questo valore.
                  correlationId:
                    type: string
                    format: uuid
                    description: >-
                      Identificatore della richiesta. Indicalo quando contatti
                      l'assistenza.
                    examples:
                      - 0e8f6a2c-5b3d-4c1e-9a7f-6d5e4c3b2a10
                  details:
                    type: array
                    description: Campi non validi, se applicabile.
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                          examples:
                            - numberOfEmployees
                        issue:
                          type: string
                          examples:
                            - NOT_IN_OPTIONS
              examples:
                Example 1 - PAYLOAD_TOO_LARGE:
                  value:
                    type: about:blank
                    title: Payload too large
                    status: 413
                    detail: attributes exceeds 64 KB.
                    instance: /api/entity/v1/entities
                    code: PAYLOAD_TOO_LARGE
                    correlationId: 0e8f6a2c-5b3d-4c1e-9a7f-6d5e4c3b2a10
                    details: []
        '415':
          description: >-
            Tipo di contenuto non supportato. UNSUPPORTED_MEDIA_TYPE: il
            Content-Type della richiesta non è quello previsto dall'endpoint
            (application/json, oppure multipart/form-data per i caricamenti).
          content:
            application/problem+json:
              schema:
                type: object
                description: >-
                  Dettagli del problema secondo RFC 9457
                  (application/problem+json).
                properties:
                  type:
                    type: string
                    examples:
                      - about:blank
                  title:
                    type: string
                    description: Breve riepilogo del problema.
                  status:
                    type: integer
                    description: Codice di stato HTTP.
                  detail:
                    type: string
                    description: Spiegazione leggibile.
                  instance:
                    type: string
                    description: Percorso della richiesta.
                  code:
                    type: string
                    description: >-
                      Codice di errore stabile e leggibile automaticamente. Basa
                      la tua logica su questo valore.
                  correlationId:
                    type: string
                    format: uuid
                    description: >-
                      Identificatore della richiesta. Indicalo quando contatti
                      l'assistenza.
                    examples:
                      - 0e8f6a2c-5b3d-4c1e-9a7f-6d5e4c3b2a10
                  details:
                    type: array
                    description: Campi non validi, se applicabile.
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                          examples:
                            - numberOfEmployees
                        issue:
                          type: string
                          examples:
                            - NOT_IN_OPTIONS
              examples:
                Example 1 - UNSUPPORTED_MEDIA_TYPE:
                  value:
                    type: about:blank
                    title: Unsupported media type
                    status: 415
                    detail: >-
                      The request Content-Type is not the one the endpoint
                      expects (application/json, or multipart/form-data for
                      uploads).
                    instance: /api/entity/v1/entities
                    code: UNSUPPORTED_MEDIA_TYPE
                    correlationId: 0e8f6a2c-5b3d-4c1e-9a7f-6d5e4c3b2a10
                    details: []
        '422':
          description: >-
            Entità non elaborabile. INCOMPLETE_KYC_DATA: mancano i dati KYC
            minimi: name e lastname per INDIVIDUAL, name per COMPANY.
          content:
            application/problem+json:
              schema:
                type: object
                description: >-
                  Dettagli del problema secondo RFC 9457
                  (application/problem+json).
                properties:
                  type:
                    type: string
                    examples:
                      - about:blank
                  title:
                    type: string
                    description: Breve riepilogo del problema.
                  status:
                    type: integer
                    description: Codice di stato HTTP.
                  detail:
                    type: string
                    description: Spiegazione leggibile.
                  instance:
                    type: string
                    description: Percorso della richiesta.
                  code:
                    type: string
                    description: >-
                      Codice di errore stabile e leggibile automaticamente. Basa
                      la tua logica su questo valore.
                  correlationId:
                    type: string
                    format: uuid
                    description: >-
                      Identificatore della richiesta. Indicalo quando contatti
                      l'assistenza.
                    examples:
                      - 0e8f6a2c-5b3d-4c1e-9a7f-6d5e4c3b2a10
                  details:
                    type: array
                    description: Campi non validi, se applicabile.
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                          examples:
                            - numberOfEmployees
                        issue:
                          type: string
                          examples:
                            - NOT_IN_OPTIONS
              examples:
                Example 1 - INCOMPLETE_KYC_DATA:
                  value:
                    type: about:blank
                    title: Unprocessable entity
                    status: 422
                    detail: >-
                      Minimum KYC data is missing: name and lastname for
                      INDIVIDUAL, name for COMPANY.
                    instance: /api/entity/v1/entities
                    code: INCOMPLETE_KYC_DATA
                    correlationId: 0e8f6a2c-5b3d-4c1e-9a7f-6d5e4c3b2a10
                    details: []
      security:
        - token: []
components:
  securitySchemes:
    token:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.