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

# Atualizar uma entrada

> Use este endpoint para atualizar os dados de uma entrada Pix existente
associada a uma conta.


**Notas:**

- Apenas as informações da conta, o nome e o nome fantasia podem ser alterados.

- Chaves EVP (aleatórias) - Alterações são permitidas com os seguintes motivos:
BRANCH_TRANSFER, RECONCILIATION e RFB_VALIDATION.



## OpenAPI

````yaml pt/openapi/v3-current/indirect-pix.yaml PATCH /v1/dict/entries/{entry_id}
openapi: 3.0.3
info:
  title: Plugin BR Pix Indireto - API Completa
  description: |
    API completa para o sistema brasileiro de pagamentos instantâneos Pix,
    incluindo operações de dicionário de chaves Pix, geração/decodificação de
    QR Code, transações e limites de transações.
  version: 1.0.0
servers:
  - url: https://plugin-pix-indirect.api.lerian.net
security:
  - bearerAuth: []
paths:
  /v1/dict/entries/{entry_id}:
    patch:
      tags:
        - DICT API
      summary: Atualizar uma entrada
      description: >-
        Use este endpoint para atualizar os dados de uma entrada Pix existente

        associada a uma conta.



        **Notas:**


        - Apenas as informações da conta, o nome e o nome fantasia podem ser
        alterados.


        - Chaves EVP (aleatórias) - Alterações são permitidas com os seguintes
        motivos:

        BRANCH_TRANSFER, RECONCILIATION e RFB_VALIDATION.
      parameters:
        - $ref: '#/components/parameters/EntryId'
        - $ref: '#/components/parameters/XAccountId'
        - $ref: '#/components/parameters/XReasonUpdate'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateEntryInput'
            example:
              account:
                branch: '0001'
                number: '123456789'
                type: TRAN
              owner:
                name: John Doe
                tradeName: Johns Store
      responses:
        '200':
          description: Entrada atualizada com sucesso no DICT e no banco de dados local.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EntryObject'
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
              examples:
                ErrorPIX0001:
                  $ref: '#/components/examples/ErrorPIX0001'
                ErrorPIX0002:
                  $ref: '#/components/examples/ErrorPIX0002'
                ErrorPIX0003:
                  $ref: '#/components/examples/ErrorPIX0003'
                ErrorPIX0004:
                  $ref: '#/components/examples/ErrorPIX0004'
                ErrorPIX0005:
                  $ref: '#/components/examples/ErrorPIX0005'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
              examples:
                ErrorPIX0115:
                  $ref: '#/components/examples/ErrorPIX0115'
        '404':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
              examples:
                ErrorPIX0112:
                  $ref: '#/components/examples/ErrorPIX0112'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
              examples:
                ErrorPIX0165:
                  $ref: '#/components/examples/ErrorPIX0165'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
              examples:
                ErrorPIX0000:
                  $ref: '#/components/examples/ErrorPIX0000'
                ErrorPIX0500:
                  $ref: '#/components/examples/ErrorPIX0500'
                ErrorPIX0599:
                  $ref: '#/components/examples/ErrorPIX0599'
        '502':
          description: Bad Gateway
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
              examples:
                ErrorPIX1000:
                  $ref: '#/components/examples/ErrorPIX1000'
                ErrorPIX1007:
                  $ref: '#/components/examples/ErrorPIX1007'
                ErrorPIX1099:
                  $ref: '#/components/examples/ErrorPIX1099'
      deprecated: false
      security:
        - bearerAuth: []
components:
  parameters:
    EntryId:
      name: entry_id
      in: path
      description: Identificador único da entrada Pix (formato UUID).
      required: true
      example: 019c96a0-0c0c-7221-8cf3-13313fb60081
      schema:
        type: string
    XAccountId:
      name: X-Account-Id
      in: header
      description: Identificador único da Conta do Ledger Midaz (formato UUID).
      required: true
      example: 019c96a0-0a98-7287-9a31-786e0809c769
      schema:
        type: string
    XReasonUpdate:
      name: X-Reason
      in: header
      description: >-
        Especifica o motivo da atualização da entrada de chave Pix. Valores
        válidos: USER_REQUESTED, BRANCH_TRANSFER, RECONCILIATION.
      required: true
      example: USER_REQUESTED
      schema:
        type: string
        enum:
          - USER_REQUESTED
          - BRANCH_TRANSFER
          - RECONCILIATION
  schemas:
    UpdateEntryInput:
      type: object
      required:
        - account
        - owner
      properties:
        account:
          $ref: '#/components/schemas/UpdateEntryAccountInput'
          description: Informações atualizadas da conta.
        owner:
          $ref: '#/components/schemas/UpdateEntryOwnerInput'
          description: Informações atualizadas do proprietário.
        metadata:
          description: >-
            Mapa opcional de chave-valor para atualizar atributos
            personalizados.
          type: object
          additionalProperties: {}
    EntryObject:
      type: object
      properties:
        id:
          type: string
          description: Identificador único da entrada (formato UUID).
          example: 019c96a0-0c0c-7221-8cf3-13313fb60081
        key:
          type: string
          description: Valor da chave Pix.
          example: john.doe@example.com
        keyType:
          type: string
          description: Tipo de chave Pix.
          example: EMAIL
        status:
          type: string
          description: Status da entrada (ACTIVE, INACTIVE).
          example: ACTIVE
        account:
          $ref: '#/components/schemas/AccountDetails'
        owner:
          $ref: '#/components/schemas/OwnerDetails'
        createdAt:
          type: string
          format: date-time
          description: Timestamp de criação.
          example: '2024-01-15T10:30:00Z'
        updatedAt:
          type: string
          format: date-time
          description: Timestamp da última atualização.
          example: '2024-01-15T10:30:00Z'
    ErrorFormat:
      type: object
      description: A mensagem de erro da resposta.
      required:
        - code
        - title
        - message
      properties:
        code:
          type: string
          description: Um identificador único e estável para o erro.
        title:
          type: string
          description: Um breve resumo do problema.
        message:
          type: string
          description: Orientação detalhada para resolver o erro.
    UpdateEntryAccountInput:
      type: object
      properties:
        branch:
          type: string
          description: Código da agência bancária.
          example: '0001'
        number:
          type: string
          description: Número da conta.
          example: '123456789'
        type:
          type: string
          description: Tipo de conta.
          enum:
            - CACC
            - SVGS
            - TRAN
            - OTHR
          example: TRAN
    UpdateEntryOwnerInput:
      type: object
      properties:
        name:
          type: string
          description: Nome do proprietário.
          example: John Doe
        tradeName:
          type: string
          description: Nome fantasia (para contas empresariais).
          example: Johns Store
    AccountDetails:
      type: object
      properties:
        branch:
          type: string
          description: Código da agência bancária.
          example: '0001'
        number:
          type: string
          description: Número da conta.
          example: '123456789'
        participant:
          type: string
          description: ISPB da instituição participante.
          example: '12345678'
        type:
          type: string
          description: Tipo de conta.
          example: TRAN
    OwnerDetails:
      type: object
      properties:
        name:
          type: string
          description: Nome do proprietário.
          example: John Doe
        taxIdNumber:
          type: string
          description: CPF ou CNPJ.
          example: '12345678901'
        type:
          type: string
          enum:
            - NATURAL_PERSON
            - LEGAL_PERSON
          description: Tipo de proprietário.
          example: NATURAL_PERSON
  examples:
    ErrorPIX0001:
      summary: Missing Headers in Request
      value:
        code: PIX-0001
        title: Missing Headers in Request
        message: >-
          Your request is missing one or more required header params. Please
          refer to the documentation to ensure all necessary header params are
          included in your request.
    ErrorPIX0002:
      summary: Invalid Header Value
      value:
        code: PIX-0002
        title: Invalid Header Value
        message: >-
          One or more header values are invalid. Please refer to the
          documentation to verify the expected format and allowed values for
          each header.
    ErrorPIX0003:
      summary: Missing Fields in Request
      value:
        code: PIX-0003
        title: Missing Fields in Request
        message: >-
          Your request is missing one or more required fields. Please refer to
          the documentation to ensure all necessary fields are included in your
          request.
    ErrorPIX0004:
      summary: Invalid Field Values in Request
      value:
        code: PIX-0004
        title: Invalid Field Values in Request
        message: >-
          Your request contains one or more fields with invalid values. Please
          refer to the documentation to verify that all fields have the correct
          values.
    ErrorPIX0005:
      summary: Invalid Field Type in Request
      value:
        code: PIX-0005
        title: Invalid Field Type in Request
        message: >-
          Your request contains one or more fields with an invalid data type.
          Please refer to the documentation to verify that all fields have the
          correct type.
    ErrorPIX0115:
      summary: EVP Key Cannot Be Updated
      value:
        code: PIX-0115
        title: EVP Key Cannot Be Updated
        message: EVP keys cannot be updated.
    ErrorPIX0112:
      summary: Entry Not Found
      value:
        code: PIX-0112
        title: Entry Not Found
        message: The entry was not found.
    ErrorPIX0165:
      summary: Entry Inactive
      value:
        code: PIX-0165
        title: Entry Inactive
        message: The entry is not in active status.
    ErrorPIX0000:
      summary: Internal Server Error
      value:
        code: PIX-0000
        title: Internal Server Error
        message: The server encountered an unexpected error. Please try again later.
    ErrorPIX0500:
      summary: CRM Connection Error
      value:
        code: PIX-0500
        title: CRM Connection Error
        message: Failed to connect to CRM service.
    ErrorPIX0599:
      summary: CRM Bad Request
      value:
        code: PIX-0599
        title: CRM Bad Request
        message: CRM returned a bad request error.
    ErrorPIX1000:
      summary: Provider Connection Error
      value:
        code: PIX-1000
        title: Provider Connection Error
        message: Failed to connect to provider.
    ErrorPIX1007:
      summary: Provider Internal Error
      value:
        code: PIX-1007
        title: Provider Internal Error
        message: Provider returned an internal error.
    ErrorPIX1099:
      summary: Provider Unmapped Error
      value:
        code: PIX-1099
        title: Provider Unmapped Error
        message: Provider returned an unmapped error.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````