openapi: 3.0.0
info:
  title: Core Finance - API Payroll Credit Portability
  description: >-
    A API de Portabilidade de Crédito Consignado permite que usuários transfiram
    suas operações de crédito consignado entre instituições financeiras em busca
    de melhores condições para o Open Finance Brasil.
  version: 1.0.0-RC.1
servers:
  - url: https://api.banco.com.br/open-banking/payroll-credit-portability/v1
    description: Servidor de Produção
  - url: https://apih.banco.com.br/open-banking/payroll-credit-portability/v1
    description: Servidor de Homologação
tags:
  - name: Account data
    description: >-
      Informação dos dados bancários para liquidação de contrato via STR
      exclusiva do OFB.
  - name: Concurrency Management
    description: >-
      Para evitar o envio de múltiplas solicitações de portabilidade para o
      mesmo contrato, as instituições devem implementar mecanismos que permitam
      recusar solicitações simultâneas.
  - name: Credit Portability
    description: >-
      Permite que usuários transfiram suas operações de crédito consignado entre
      instituições financeiras em busca de melhores condições.
  - name: Registering Entity
    description: Fornece dados do contrato consignado junto a averbadora (SERPRO).
  - name: Payments
    description: >-
      Conjunto de endpoints relacionado ao pagamento via STR de um contrato de
      empréstimo consignado.
components:
  schemas: {}
  parameters: {}
paths:
  /portabilities/{portabilityId}/account-data:
    get:
      summary: >-
        Obtém os dados necessários para realização do pagamento da operação via
        TED.
      description: >-
        Método responsável por recuperar informações de contas para realização
        do pagamento via TED.
      operationId: payrollCreditPortabilityGetPortabilitiesPortabilityIdAccountData
      tags:
        - Account data
      parameters:
        - schema:
            type: string
            minLength: 36
            maxLength: 36
            pattern: >-
              ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
            description: Identificador do pedido de portabilidade de crédito.
          required: true
          description: Identificador do pedido de portabilidade de crédito.
          name: portabilityId
          in: path
        - schema:
            type: string
            description: >-
              Cabeçalho HTTP padrão. Permite que as credenciais sejam fornecidas
              dependendo do tipo de recurso solicitado.
          required: true
          description: >-
            Cabeçalho HTTP padrão. Permite que as credenciais sejam fornecidas
            dependendo do tipo de recurso solicitado.
          name: Authorization
          in: header
        - schema:
            type: string
            format: uuid
            description: UUID RFC4122 usado como ID de correlação entre request e response.
          required: true
          description: UUID RFC4122 usado como ID de correlação entre request e response.
          name: x-fapi-interaction-id
          in: header
        - schema:
            type: string
          required: false
          name: x-fapi-auth-date
          in: header
        - schema:
            type: string
          required: false
          name: x-fapi-customer-ip-address
          in: header
        - schema:
            type: string
          required: false
          name: x-customer-user-agent
          in: header
      responses:
        '200':
          description: Dados para realização do pagamento da operação via TED.
          content:
            application/jwt:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      strCode:
                        type: object
                        properties:
                          ispb:
                            type: string
                            minLength: 8
                            maxLength: 8
                            pattern: ^[0-9A-Z]{8}$
                            example: '22896431'
                          name:
                            type: string
                            maxLength: 80
                            pattern: ^(?!\s)[\w\W\s]*[^\s]$
                            description: >-
                              [RESTRIÇÃO] Obrigatório quando hasFinancialAgent
                              for true
                            example: Instituicao Credora
                          companyCnpj:
                            type: string
                            minLength: 14
                            maxLength: 14
                            pattern: ^[0-9A-Z]{12}[0-9]{2}$
                            description: >-
                              [RESTRIÇÃO] Obrigatório quando hasFinancialAgent
                              for true
                            example: '21128159000166'
                          branchCode:
                            type: number
                            example: 1
                          hasFinancialAgent:
                            type: boolean
                            example: true
                          accountNumber:
                            type: number
                            description: >-
                              [RESTRIÇÃO] Obrigatório quando hasFinancialAgent
                              for true
                            example: 12345678
                        required:
                          - ispb
                          - branchCode
                          - hasFinancialAgent
                    required:
                      - strCode
                  links:
                    type: object
                    properties:
                      self:
                        type: string
                        maxLength: 2000
                        format: uri
                        example: https://api.banco.com.br/open-banking/api/v1/resource
                    required:
                      - self
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - data
                  - links
                  - meta
        '400':
          description: A requisição foi malformada, omitindo atributos obrigatórios.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '401':
          description: Cabeçalho de autenticação ausente/inválido ou token inválido.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '403':
          description: >-
            O token tem escopo incorreto ou uma política de segurança foi
            violada.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '404':
          description: O recurso solicitado não existe ou não foi implementado.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '405':
          description: O consumidor tentou acessar o recurso com um método não suportado.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '406':
          description: >-
            A solicitação continha um cabeçalho Accept diferente dos tipos de
            mídia permitidos.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '422':
          description: >-
            A sintaxe da requisição está correta, mas não foi possível processar
            as instruções presentes.
          content:
            application/jwt:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '500':
          description: Ocorreu um erro no gateway da API ou no microsserviço.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '504':
          description: A requisição não foi atendida dentro do tempo limite estabelecido.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '529':
          description: O site está sobrecarregado e a operação foi recusada.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        default:
          description: Erro inesperado.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
  /credit-operations/{contractId}/portability-eligibility:
    get:
      summary: >-
        Informa se um contrato está habilitado para realização do pedido de
        portabilidade de crédito.
      description: >-
        Informa se o contrato está disponível para solicitação de portabilidade
        de crédito.
      operationId: >-
        payrollCreditPortabilityGetCreditOperationsContratIdPortabilityEligibility
      tags:
        - Concurrency Management
      parameters:
        - schema:
            type: string
            maxLength: 100
            pattern: ^[a-zA-Z0-9][a-zA-Z0-9-]{0,99}$
            description: >-
              Identificador do contrato para todos os tipos de operação de
              crédito.
          required: true
          description: >-
            Identificador do contrato para todos os tipos de operação de
            crédito.
          name: contractId
          in: path
        - schema:
            type: string
            description: >-
              Cabeçalho HTTP padrão. Permite que as credenciais sejam fornecidas
              dependendo do tipo de recurso solicitado.
          required: true
          description: >-
            Cabeçalho HTTP padrão. Permite que as credenciais sejam fornecidas
            dependendo do tipo de recurso solicitado.
          name: Authorization
          in: header
        - schema:
            type: string
            format: uuid
            description: UUID RFC4122 usado como ID de correlação entre request e response.
          required: true
          description: UUID RFC4122 usado como ID de correlação entre request e response.
          name: x-fapi-interaction-id
          in: header
        - schema:
            type: string
          required: false
          name: x-fapi-auth-date
          in: header
        - schema:
            type: string
          required: false
          name: x-fapi-customer-ip-address
          in: header
        - schema:
            type: string
          required: false
          name: x-customer-user-agent
          in: header
      responses:
        '200':
          description: Payload com os dados de elegibilidade do contrato.
          content:
            application/jwt:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      contractId:
                        type: string
                        minLength: 1
                        maxLength: 100
                        pattern: ^[a-zA-Z0-9][a-zA-Z0-9-]{0,99}$
                        example: '92792126019929279212650822221989319252576'
                      portability:
                        type: object
                        properties:
                          isEligible:
                            type: boolean
                          ineligible:
                            type: object
                            properties:
                              reasonType:
                                type: string
                                enum:
                                  - CONTRATO_LIQUIDADO
                                  - CLIENTE_COM_ACAO_JUDICIAL
                                  - MODALIDADE_OPERACAO_INCOMPATIVEL
                                  - FLUXO_COM_PARCELA_IRREGULAR
                                  - TIPO_PESSOA_INVALIDO
                                  - OUTROS
                                example: CLIENTE_COM_ACAO_JUDICIAL
                              reasonTypeAdditionalInfo:
                                type: string
                            required:
                              - reasonType
                            description: >-
                              [RESTRIÇÃO] Obrigatório quando isEligible for
                              false
                          status:
                            type: string
                            enum:
                              - DISPONIVEL
                              - EM_ANDAMENTO
                            description: '[RESTRIÇÃO] Obrigatório quando isEligible for true'
                          statusUpdateDateTime:
                            type: string
                            pattern: >-
                              ^(\d{4})-(1[0-2]|0?[1-9])-(3[01]|[12][0-9]|0?[1-9])T(?:[01]\d|2[0123]):(?:[012345]\d):(?:[012345]\d)Z$
                            description: '[RESTRIÇÃO] Obrigatório quando isEligible for true'
                            example: '2020-07-21T08:30:00Z'
                          channel:
                            type: string
                            enum:
                              - OFB
                              - REGISTRADORA
                            description: >-
                              [RESTRIÇÃO] Obrigatório quando status for
                              EM_ANDAMENTO
                          companyName:
                            type: string
                            maxLength: 80
                            pattern: ^(?!\s)[\w\W\s]*[^\s]$
                            description: >-
                              [RESTRIÇÃO] Obrigatório quando status for
                              EM_ANDAMENTO
                            example: Empresa da Organização A
                          companyCnpj:
                            type: string
                            minLength: 14
                            maxLength: 14
                            pattern: ^[0-9A-Z]{12}[0-9]{2}$
                            description: >-
                              [RESTRIÇÃO] Obrigatório quando status for
                              EM_ANDAMENTO
                            example: '21128159000166'
                        required:
                          - isEligible
                    required:
                      - contractId
                      - portability
                  links:
                    type: object
                    properties:
                      self:
                        type: string
                        maxLength: 2000
                        format: uri
                        example: https://api.banco.com.br/open-banking/api/v1/resource
                    required:
                      - self
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - data
        '400':
          description: A requisição foi malformada, omitindo atributos obrigatórios.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '401':
          description: Cabeçalho de autenticação ausente/inválido ou token inválido.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '403':
          description: >-
            O token tem escopo incorreto ou uma política de segurança foi
            violada.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '404':
          description: O recurso solicitado não existe ou não foi implementado.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '405':
          description: O consumidor tentou acessar o recurso com um método não suportado.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '406':
          description: >-
            A solicitação continha um cabeçalho Accept diferente dos tipos de
            mídia permitidos.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '422':
          description: >-
            A sintaxe da requisição está correta, mas não foi possível processar
            as instruções presentes.
          content:
            application/jwt:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '500':
          description: Ocorreu um erro no gateway da API ou no microsserviço.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '504':
          description: A requisição não foi atendida dentro do tempo limite estabelecido.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '529':
          description: O site está sobrecarregado e a operação foi recusada.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        default:
          description: Erro inesperado.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
  /portabilities:
    post:
      summary: >-
        Realiza pedido de portabilidade de crédito para um determinado contrato
        junto a instituição credora.
      description: Solicitação de portabilidade de crédito consignado via OFB.
      operationId: payrollCreditPortabilityPostPortabilities
      tags:
        - Credit Portability
      parameters:
        - schema:
            type: string
            description: >-
              Cabeçalho HTTP padrão. Permite que as credenciais sejam fornecidas
              dependendo do tipo de recurso solicitado.
          required: true
          description: >-
            Cabeçalho HTTP padrão. Permite que as credenciais sejam fornecidas
            dependendo do tipo de recurso solicitado.
          name: Authorization
          in: header
        - schema:
            type: string
            format: uuid
            description: UUID RFC4122 usado como ID de correlação entre request e response.
          required: true
          description: UUID RFC4122 usado como ID de correlação entre request e response.
          name: x-fapi-interaction-id
          in: header
        - schema:
            type: string
            description: >-
              Identificador de solicitação exclusivo para suportar a
              idempotência.
          required: true
          description: Identificador de solicitação exclusivo para suportar a idempotência.
          name: x-idempotency-key
          in: header
        - schema:
            type: string
          required: false
          name: x-fapi-auth-date
          in: header
        - schema:
            type: string
          required: false
          name: x-fapi-customer-ip-address
          in: header
        - schema:
            type: string
          required: false
          name: x-customer-user-agent
          in: header
      requestBody:
        description: Payload para o pedido de portabilidade de crédito.
        required: true
        content:
          application/jwt:
            schema:
              type: object
              properties:
                data:
                  type: object
                  properties:
                    customerContact:
                      type: array
                      items:
                        type: object
                        properties:
                          type:
                            type: string
                            enum:
                              - TELEFONE
                              - EMAIL
                          value:
                            type: string
                            pattern: >-
                              ^([1-9]{2}(?:[2-8]|9[0-9])[0-9]{3}[0-9]{4})|([a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,})$
                            example: '11999999999'
                        required:
                          - type
                          - value
                      minItems: 0
                    institution:
                      type: object
                      properties:
                        creditor:
                          type: object
                          properties:
                            companyName:
                              type: string
                              maxLength: 80
                              pattern: ^[^\s](?:.*[^\s])?$
                              example: Instituição Credora
                            companyCnpj:
                              type: string
                              minLength: 14
                              maxLength: 14
                              pattern: ^[0-9A-Z]{12}[0-9]{2}$
                              example: '21128159000166'
                          required:
                            - companyName
                            - companyCnpj
                        proposing:
                          type: object
                          properties:
                            companyName:
                              type: string
                              maxLength: 80
                              pattern: ^[^\s](?:.*[^\s])?$
                              example: Instituição Proponente
                            companyCnpj:
                              type: string
                              minLength: 14
                              maxLength: 14
                              pattern: ^[0-9A-Z]{12}[0-9]{2}$
                              example: '21128159000166'
                            contact:
                              type: array
                              items:
                                type: object
                                properties:
                                  type:
                                    type: string
                                    enum: &ref_0
                                      - EMAIL
                                      - TELEFONE
                                  value:
                                    type: string
                                    pattern: >-
                                      ^([1-9]{2}(?:[2-8]|9[0-9])[0-9]{3}[0-9]{4})|([a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,})$
                                    example: contato@instituicaoproponente.com.br
                              minItems: 1
                          required:
                            - companyName
                            - companyCnpj
                      required:
                        - creditor
                        - proposing
                    contractIdentification:
                      type: object
                      properties:
                        contractId:
                          type: string
                          minLength: 1
                          maxLength: 100
                          pattern: ^[a-zA-Z0-9][a-zA-Z0-9-]{0,99}$
                          example: '92792126019929279212650822221989319252576'
                        contractNumber:
                          type: string
                          minLength: 1
                          maxLength: 100
                          pattern: ^[\w\W]{1,100}$
                          example: '1324926521496'
                        ipocCode:
                          type: string
                          minLength: 22
                          maxLength: 67
                          pattern: ^[\w\W]{22,67}$
                          example: '92792126019929279212650822221989319252576'
                      required:
                        - contractId
                        - contractNumber
                        - ipocCode
                    proposedContract:
                      type: object
                      properties:
                        interestRates:
                          type: array
                          items:
                            type: object
                            properties:
                              taxType:
                                type: string
                                enum: &ref_1
                                  - NOMINAL
                                  - EFETIVA
                              interestRateType:
                                type: string
                                enum: &ref_2
                                  - SIMPLES
                                  - COMPOSTO
                              taxPeriodicity:
                                type: string
                                enum: &ref_3
                                  - AM
                                  - AA
                              calculation:
                                type: string
                                enum: &ref_4
                                  - 21/252
                                  - 30/360
                                  - 30/365
                              referentialRateIndexerType:
                                type: string
                                enum: &ref_5
                                  - SEM_TIPO_INDEXADOR
                                  - PRE_FIXADO
                                  - POS_FIXADO
                                  - FLUTUANTES
                                  - INDICES_PRECOS
                                  - CREDITO_RURAL
                                  - OUTROS_INDEXADORES
                              referentialRateIndexerSubType:
                                type: string
                                enum: &ref_6
                                  - SEM_SUB_TIPO_INDEXADOR
                                  - PRE_FIXADO
                                  - TR_TBF
                                  - TJLP
                                  - LIBOR
                                  - TLP
                                  - OUTRAS_TAXAS_POS_FIXADAS
                                  - CDI
                                  - SELIC
                                  - OUTRAS_TAXAS_FLUTUANTES
                                  - IGPM
                                  - IPCA
                                  - IPCC
                                  - OUTROS_INDICES_PRECO
                                  - TCR_PRE
                                  - TCR_POS
                                  - TRFC_PRE
                                  - TRFC_POS
                                  - OUTROS_INDEXADORES
                              referentialRateIndexerAdditionalInfo:
                                type: string
                                maxLength: 140
                              preFixedRate:
                                type: string
                                minLength: 8
                                maxLength: 9
                                pattern: ^\d{1,2}\.\d{6}$
                                example: '0.600000'
                              postFixedRate:
                                type: string
                                minLength: 8
                                maxLength: 9
                                pattern: ^\d{1,2}\.\d{6}$
                                example: '0.550000'
                              additionalInfo:
                                type: string
                                maxLength: 1200
                            required:
                              - taxType
                              - interestRateType
                              - taxPeriodicity
                              - calculation
                              - referentialRateIndexerType
                              - preFixedRate
                              - postFixedRate
                          minItems: 0
                        contractedFees:
                          type: array
                          items:
                            type: object
                            properties:
                              feeName:
                                type: string
                                maxLength: 140
                                pattern: ^(?!\s)[\w\W\s]*[^\s]$
                                example: Renovação de cadastro
                              feeCode:
                                type: string
                                maxLength: 140
                                pattern: ^(?!\s)[\w\W\s]*[^\s]$
                                example: CADASTRO
                              feeChargeType:
                                type: string
                                enum: &ref_7
                                  - UNICA
                                  - POR_PARCELA
                              feeCharge:
                                type: string
                                enum: &ref_8
                                  - MINIMO
                                  - MAXIMO
                                  - FIXO
                                  - PERCENTUAL
                              feeAmount:
                                type: object
                                properties:
                                  amount:
                                    type: string
                                    minLength: 4
                                    maxLength: 20
                                    pattern: ^\d{1,15}\.\d{2,4}$
                                    example: '1000.0400'
                                  currency:
                                    type: string
                                    pattern: ^\w{3}$
                                    example: BRL
                                required:
                                  - amount
                                  - currency
                              feeRate:
                                type: string
                                minLength: 8
                                maxLength: 8
                                pattern: ^\d{1}\.\d{6}$
                                example: '0.062000'
                            required:
                              - feeName
                              - feeCode
                              - feeChargeType
                              - feeCharge
                          minItems: 0
                        contractedFinanceCharges:
                          type: array
                          items:
                            type: object
                            properties:
                              chargeType:
                                type: string
                                enum: &ref_9
                                  - JUROS_REMUNERATORIOS_POR_ATRASO
                                  - MULTA_ATRASO_PAGAMENTO
                                  - JUROS_MORA_ATRASO
                                  - IOF_CONTRATACAO
                                  - IOF_POR_ATRASO
                                  - SEM_ENCARGO
                                  - OUTROS
                              chargeAdditionalInfo:
                                type: string
                                maxLength: 140
                              chargeRate:
                                type: string
                                minLength: 8
                                maxLength: 8
                                pattern: ^\d{1}\.\d{6}$
                                example: '0.070000'
                            required:
                              - chargeType
                          minItems: 0
                        digitalSignatureProof:
                          type: object
                          properties:
                            documentId:
                              type: string
                              minLength: 1
                              maxLength: 100
                              pattern: >-
                                ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
                              example: 54d5348c-1a3f-4ff4-a8a8-d0724fb806c6
                            signatureDateTime:
                              type: string
                              pattern: >-
                                ^(\d{4})-(1[0-2]|0?[1-9])-(3[01]|[12][0-9]|0?[1-9])T(?:[01]\d|2[0123]):(?:[012345]\d):(?:[012345]\d)Z$
                              example: '2020-07-21T08:30:00Z'
                          required:
                            - documentId
                            - signatureDateTime
                        CET:
                          type: string
                          minLength: 8
                          maxLength: 13
                          pattern: ^\d{1,6}\.\d{6}$
                          example: '0.290000'
                        amortizationScheduled:
                          type: string
                          enum: &ref_10
                            - SAC
                            - PRICE
                            - SAM
                            - SEM_SISTEMA_AMORTIZACAO
                            - OUTROS
                        amortizationScheduledAdditionalInfo:
                          type: string
                          maxLength: 200
                        instalmentPeriodicity:
                          type: string
                          enum: &ref_11
                            - SEM_PERIODICIDADE_REGULAR
                            - DIARIO
                            - SEMANAL
                            - QUINZENAL
                            - MENSAL
                            - BIMESTRAL
                            - TRIMESTRAL
                            - SEMESTRAL
                            - ANUAL
                        totalNumberOfInstalments:
                          type: number
                          maximum: 999999999
                        instalmentAmount:
                          type: object
                          properties:
                            amount:
                              type: string
                              minLength: 4
                              maxLength: 20
                              pattern: ^\d{1,15}\.\d{2,4}$
                              example: '1000.0400'
                            currency:
                              type: string
                              minLength: 3
                              maxLength: 3
                              pattern: ^\w{3}$
                              example: BRL
                          required:
                            - amount
                            - currency
                        dueDate:
                          type: string
                          minLength: 20
                          maxLength: 20
                          pattern: >-
                            ^(\d{4})-(1[0-2]|0?[1-9])-(3[01]|[12][0-9]|0?[1-9])T(?:[01]\d|2[0123]):(?:[012345]\d):(?:[012345]\d)Z$
                          example: '2020-07-21T08:30:00Z'
                        contractAmount:
                          type: object
                          properties:
                            amount:
                              type: string
                              minLength: 4
                              maxLength: 20
                              pattern: ^\d{1,15}\.\d{2,4}$
                              example: '1000.0400'
                            currency:
                              type: string
                              minLength: 3
                              maxLength: 3
                              pattern: ^\w{3}$
                              example: BRL
                          required:
                            - amount
                            - currency
                      required:
                        - interestRates
                        - contractedFees
                        - contractedFinanceCharges
                        - digitalSignatureProof
                        - CET
                        - amortizationScheduled
                        - instalmentPeriodicity
                        - totalNumberOfInstalments
                        - instalmentAmount
                        - dueDate
                        - contractAmount
                    creationDateTime:
                      type: string
                      minLength: 20
                      maxLength: 20
                      pattern: >-
                        ^(\d{4})-(1[0-2]|0?[1-9])-(3[01]|[12][0-9]|0?[1-9])T(?:[01]\d|2[0123]):(?:[012345]\d):(?:[012345]\d)Z$
                      example: '2020-07-21T08:30:00Z'
                  required:
                    - customerContact
                    - institution
                    - contractIdentification
                    - proposedContract
                    - creationDateTime
              required:
                - data
      responses:
        '202':
          description: Dados da solicitação de portabilidade de crédito.
          content:
            application/jwt:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      portabilityId:
                        type: string
                        minLength: 36
                        maxLength: 36
                        pattern: >-
                          ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
                        example: 54d5348c-1a3f-4ff4-a8a8-d0724fb806c6
                      status:
                        type: string
                        enum:
                          - RECEIVED
                          - PENDING
                          - CANCELLED
                      creationDateTime:
                        type: string
                        minLength: 20
                        maxLength: 20
                        pattern: >-
                          ^(\d{4})-(1[0-2]|0?[1-9])-(3[01]|[12][0-9]|0?[1-9])T(?:[01]\d|2[0123]):(?:[012345]\d):(?:[012345]\d)Z$
                        example: '2020-07-21T08:30:00Z'
                    required:
                      - portabilityId
                      - status
                      - creationDateTime
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - data
        '400':
          description: A requisição foi malformada, omitindo atributos obrigatórios.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '401':
          description: Cabeçalho de autenticação ausente/inválido ou token inválido.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '403':
          description: >-
            O token tem escopo incorreto ou uma política de segurança foi
            violada.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '404':
          description: O recurso solicitado não existe ou não foi implementado.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '405':
          description: O consumidor tentou acessar o recurso com um método não suportado.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '406':
          description: >-
            A solicitação continha um cabeçalho Accept diferente dos tipos de
            mídia permitidos.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '422':
          description: >-
            A sintaxe da requisição está correta, mas não foi possível processar
            as instruções presentes.
          content:
            application/jwt:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          enum:
                            - EM_ANDAMENTO
                            - PRAZO_ACIMA_LIMITE
                            - CONTRATO_INVALIDO
                            - CONTRATO_NAO_ELEGIVEL
                            - ERRO_IDEMPOTENCIA
                            - SEM_EVIDENCIA_ASSINATURA
                            - PERIODICIDADE_INVALIDA
                            - CAMPO_INCONSISTENTE
                            - VALOR_DIVERGENTE
                            - PARAMETRO_NAO_INFORMADO
                            - PARAMETRO_INVALIDO
                            - NAO_INFORMADO
                        title:
                          type: string
                          maxLength: 255
                        detail:
                          type: string
                          maxLength: 2048
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '500':
          description: Ocorreu um erro no gateway da API ou no microsserviço.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '504':
          description: A requisição não foi atendida dentro do tempo limite estabelecido.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '529':
          description: O site está sobrecarregado e a operação foi recusada.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        default:
          description: Erro inesperado.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
  /portabilities/{portabilityId}:
    get:
      summary: Consulta portabilidade de crédito através da propriedade portabilityId.
      description: >-
        Endpoint responsável por consultar pedidos de portabilidade de crédito
        consignado.
      operationId: payrollCreditPortabilityGetPortabilitiesByPortabilityId
      tags:
        - Credit Portability
      parameters:
        - schema:
            type: string
            minLength: 36
            maxLength: 36
            pattern: >-
              ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
            description: Identificador do pedido de portabilidade de crédito.
          required: true
          description: Identificador do pedido de portabilidade de crédito.
          name: portabilityId
          in: path
        - schema:
            type: string
            description: >-
              Cabeçalho HTTP padrão. Permite que as credenciais sejam fornecidas
              dependendo do tipo de recurso solicitado.
          required: true
          description: >-
            Cabeçalho HTTP padrão. Permite que as credenciais sejam fornecidas
            dependendo do tipo de recurso solicitado.
          name: Authorization
          in: header
        - schema:
            type: string
            format: uuid
            description: UUID RFC4122 usado como ID de correlação entre request e response.
          required: true
          description: UUID RFC4122 usado como ID de correlação entre request e response.
          name: x-fapi-interaction-id
          in: header
        - schema:
            type: string
          required: false
          name: x-fapi-auth-date
          in: header
        - schema:
            type: string
          required: false
          name: x-fapi-customer-ip-address
          in: header
        - schema:
            type: string
          required: false
          name: x-customer-user-agent
          in: header
      responses:
        '200':
          description: Dados dos contratos de empréstimo obtidos com sucesso.
          content:
            application/jwt:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      portabilityId:
                        type: string
                        minLength: 36
                        maxLength: 36
                        pattern: >-
                          ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
                        example: 54d5348c-1a3f-4ff4-a8a8-d0724fb806c6
                      customerContact:
                        type: array
                        items:
                          type: object
                          properties:
                            type:
                              type: string
                              enum:
                                - TELEFONE
                                - EMAIL
                            value:
                              type: string
                              pattern: >-
                                ^([1-9]{2}(?:[2-8]|9[0-9])[0-9]{3}[0-9]{4})|([a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,})$
                              example: '11999999999'
                          required:
                            - type
                            - value
                        minItems: 0
                      institution:
                        type: object
                        properties:
                          creditor:
                            type: object
                            properties:
                              companyName:
                                type: string
                                maxLength: 80
                                pattern: ^[^\s](?:.*[^\s])?$
                                example: Instituição Credora
                              companyCnpj:
                                type: string
                                minLength: 14
                                maxLength: 14
                                pattern: ^[0-9A-Z]{12}[0-9]{2}$
                                example: '21128159000166'
                            required:
                              - companyName
                              - companyCnpj
                          proposing:
                            type: object
                            properties:
                              companyName:
                                type: string
                                maxLength: 80
                                pattern: ^[^\s](?:.*[^\s])?$
                                example: Instituição Proponente
                              companyCnpj:
                                type: string
                                minLength: 14
                                maxLength: 14
                                pattern: ^[0-9A-Z]{12}[0-9]{2}$
                                example: '21128159000166'
                              contact:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum: *ref_0
                                    value:
                                      type: string
                                      pattern: >-
                                        ^([1-9]{2}(?:[2-8]|9[0-9])[0-9]{3}[0-9]{4})|([a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,})$
                                      example: contato@instituicaoproponente.com.br
                                minItems: 1
                            required:
                              - companyName
                              - companyCnpj
                        required:
                          - creditor
                          - proposing
                      contractIdentification:
                        type: object
                        properties:
                          contractId:
                            type: string
                            minLength: 1
                            maxLength: 100
                            pattern: ^[a-zA-Z0-9][a-zA-Z0-9-]{0,99}$
                            example: '92792126019929279212650822221989319252576'
                          contractNumber:
                            type: string
                            minLength: 1
                            maxLength: 100
                            pattern: ^[\w\W]{1,100}$
                            example: '1324926521496'
                          ipocCode:
                            type: string
                            minLength: 22
                            maxLength: 67
                            pattern: ^[\w\W]{22,67}$
                            example: '92792126019929279212650822221989319252576'
                        required:
                          - contractId
                          - contractNumber
                          - ipocCode
                      proposedContract:
                        type: object
                        properties:
                          interestRates:
                            type: array
                            items:
                              type: object
                              properties:
                                taxType:
                                  type: string
                                  enum: *ref_1
                                interestRateType:
                                  type: string
                                  enum: *ref_2
                                taxPeriodicity:
                                  type: string
                                  enum: *ref_3
                                calculation:
                                  type: string
                                  enum: *ref_4
                                referentialRateIndexerType:
                                  type: string
                                  enum: *ref_5
                                referentialRateIndexerSubType:
                                  type: string
                                  enum: *ref_6
                                referentialRateIndexerAdditionalInfo:
                                  type: string
                                  maxLength: 140
                                preFixedRate:
                                  type: string
                                  minLength: 8
                                  maxLength: 9
                                  pattern: ^\d{1,2}\.\d{6}$
                                  example: '0.600000'
                                postFixedRate:
                                  type: string
                                  minLength: 8
                                  maxLength: 9
                                  pattern: ^\d{1,2}\.\d{6}$
                                  example: '0.550000'
                                additionalInfo:
                                  type: string
                                  maxLength: 1200
                              required:
                                - taxType
                                - interestRateType
                                - taxPeriodicity
                                - calculation
                                - referentialRateIndexerType
                                - preFixedRate
                                - postFixedRate
                            minItems: 0
                          contractedFees:
                            type: array
                            items:
                              type: object
                              properties:
                                feeName:
                                  type: string
                                  maxLength: 140
                                  pattern: ^(?!\s)[\w\W\s]*[^\s]$
                                  example: Renovação de cadastro
                                feeCode:
                                  type: string
                                  maxLength: 140
                                  pattern: ^(?!\s)[\w\W\s]*[^\s]$
                                  example: CADASTRO
                                feeChargeType:
                                  type: string
                                  enum: *ref_7
                                feeCharge:
                                  type: string
                                  enum: *ref_8
                                feeAmount:
                                  type: object
                                  properties:
                                    amount:
                                      type: string
                                      minLength: 4
                                      maxLength: 20
                                      pattern: ^\d{1,15}\.\d{2,4}$
                                      example: '1000.0400'
                                    currency:
                                      type: string
                                      pattern: ^\w{3}$
                                      example: BRL
                                  required:
                                    - amount
                                    - currency
                                feeRate:
                                  type: string
                                  minLength: 8
                                  maxLength: 8
                                  pattern: ^\d{1}\.\d{6}$
                                  example: '0.062000'
                              required:
                                - feeName
                                - feeCode
                                - feeChargeType
                                - feeCharge
                            minItems: 0
                          contractedFinanceCharges:
                            type: array
                            items:
                              type: object
                              properties:
                                chargeType:
                                  type: string
                                  enum: *ref_9
                                chargeAdditionalInfo:
                                  type: string
                                  maxLength: 140
                                chargeRate:
                                  type: string
                                  minLength: 8
                                  maxLength: 8
                                  pattern: ^\d{1}\.\d{6}$
                                  example: '0.070000'
                              required:
                                - chargeType
                            minItems: 0
                          digitalSignatureProof:
                            type: object
                            properties:
                              documentId:
                                type: string
                                minLength: 1
                                maxLength: 100
                                pattern: >-
                                  ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
                                example: 54d5348c-1a3f-4ff4-a8a8-d0724fb806c6
                              signatureDateTime:
                                type: string
                                pattern: >-
                                  ^(\d{4})-(1[0-2]|0?[1-9])-(3[01]|[12][0-9]|0?[1-9])T(?:[01]\d|2[0123]):(?:[012345]\d):(?:[012345]\d)Z$
                                example: '2020-07-21T08:30:00Z'
                            required:
                              - documentId
                              - signatureDateTime
                          CET:
                            type: string
                            minLength: 8
                            maxLength: 13
                            pattern: ^\d{1,6}\.\d{6}$
                            example: '0.290000'
                          amortizationScheduled:
                            type: string
                            enum: *ref_10
                          amortizationScheduledAdditionalInfo:
                            type: string
                            maxLength: 200
                          instalmentPeriodicity:
                            type: string
                            enum: *ref_11
                          totalNumberOfInstalments:
                            type: number
                            maximum: 999999999
                          instalmentAmount:
                            type: object
                            properties:
                              amount:
                                type: string
                                minLength: 4
                                maxLength: 20
                                pattern: ^\d{1,15}\.\d{2,4}$
                                example: '1000.0400'
                              currency:
                                type: string
                                minLength: 3
                                maxLength: 3
                                pattern: ^\w{3}$
                                example: BRL
                            required:
                              - amount
                              - currency
                          dueDate:
                            type: string
                            minLength: 20
                            maxLength: 20
                            pattern: >-
                              ^(\d{4})-(1[0-2]|0?[1-9])-(3[01]|[12][0-9]|0?[1-9])T(?:[01]\d|2[0123]):(?:[012345]\d):(?:[012345]\d)Z$
                            example: '2020-07-21T08:30:00Z'
                          contractAmount:
                            type: object
                            properties:
                              amount:
                                type: string
                                minLength: 4
                                maxLength: 20
                                pattern: ^\d{1,15}\.\d{2,4}$
                                example: '1000.0400'
                              currency:
                                type: string
                                minLength: 3
                                maxLength: 3
                                pattern: ^\w{3}$
                                example: BRL
                            required:
                              - amount
                              - currency
                        required:
                          - interestRates
                          - contractedFees
                          - contractedFinanceCharges
                          - digitalSignatureProof
                          - CET
                          - amortizationScheduled
                          - instalmentPeriodicity
                          - totalNumberOfInstalments
                          - instalmentAmount
                          - dueDate
                          - contractAmount
                      status:
                        type: string
                        enum:
                          - RECEIVED
                          - PENDING
                          - ACCEPTED_SETTLEMENT_IN_PROGRESS
                          - ACCEPTED_SETTLEMENT_COMPLETED
                          - AWAITING_CONTRACT_DISCHARGE
                          - PORTABILITY_COMPLETED
                          - REJECTED
                          - CANCELLED
                          - PAYMENT_ISSUE
                        description: >-
                          RECEIVED: Estado inicial. PENDING: Fase de
                          contraproposta. ACCEPTED_SETTLEMENT_IN_PROGRESS:
                          Proponente deve quitar o contrato.
                          ACCEPTED_SETTLEMENT_COMPLETED: Proponente liquidou,
                          credora validando. AWAITING_CONTRACT_DISCHARGE:
                          Pendente de desaverbação junto ao SERPRO.
                          PORTABILITY_COMPLETED: Portabilidade concluída.
                          REJECTED: Pedido rejeitado. CANCELLED: Cancelado pelo
                          cliente. PAYMENT_ISSUE: Inconsistência na liquidação.
                      statusUpdateDateTime:
                        type: string
                        pattern: >-
                          ^(\d{4})-(1[0-2]|0?[1-9])-(3[01]|[12][0-9]|0?[1-9])T(?:[01]\d|2[0123]):(?:[012345]\d):(?:[012345]\d)Z$
                        example: '2020-07-21T08:30:00Z'
                      statusReason:
                        type: object
                        properties:
                          reasonType:
                            type: string
                            enum: &ref_12
                              - CANCELADO_PELO_CLIENTE
                              - >-
                                SALDO_DEVEDOR_ATUALIZADO_SUBSTANCIALMENTE_DIVERGENTE
                              - POLITICA_DE_CREDITO
                              - RETENCAO_DO_CLIENTE
                              - CONTRATO_JA_LIQUIDADO
                              - DIVERGENCIA_DE_PAGAMENTO_EFETUADO
                              - DECURSO_DO_PRAZO_PARA_PAGAMENTO
                              - PORTABILIDADE_CANCELADA_POR_FALTA_DE_LIQUIDACAO
                              - PORTABILIDADE_EM_ANDAMENTO
                              - CLIENTE_COM_ACAO_JUDICIAL
                              - MODALIDADE_DA_OPERACAO_INCOMPATIVEL
                              - RESERVA_DA_MARGEM
                              - OUTROS
                          reasonTypeAdditionalInfo:
                            type: string
                            maxLength: 144
                            pattern: ^[^\s](?:.*[^\s])?$
                            example: Informações Adicionais
                          digitalSignatureProof:
                            type: object
                            properties:
                              documentId:
                                type: string
                                minLength: 1
                                maxLength: 100
                                pattern: >-
                                  ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
                                example: 54d5348c-1a3f-4ff4-a8a8-d0724fb806c6
                              signatureDateTime:
                                type: string
                                pattern: >-
                                  ^(\d{4})-(1[0-2]|0?[1-9])-(3[01]|[12][0-9]|0?[1-9])T(?:[01]\d|2[0123]):(?:[012345]\d):(?:[012345]\d)Z$
                                example: '2020-07-21T08:30:00Z'
                            required:
                              - documentId
                              - signatureDateTime
                      creationDateTime:
                        type: string
                        minLength: 20
                        maxLength: 20
                        pattern: >-
                          ^(\d{4})-(1[0-2]|0?[1-9])-(3[01]|[12][0-9]|0?[1-9])T(?:[01]\d|2[0123]):(?:[012345]\d):(?:[012345]\d)Z$
                        example: '2020-07-21T08:30:00Z'
                      rejection:
                        type: object
                        properties:
                          rejectedBy:
                            type: string
                            enum:
                              - PROPONENTE
                              - USUARIO
                              - CREDORA
                          reason:
                            type: object
                            properties:
                              type:
                                type: string
                                enum: *ref_12
                              typeAdditionalInfo:
                                type: string
                                maxLength: 144
                                pattern: ^[^\s](?:.*[^\s])?$
                                example: Informações Adicionais
                            required:
                              - type
                        required:
                          - rejectedBy
                          - reason
                      loanSettlementInstruction:
                        type: object
                        properties:
                          settlementDateTime:
                            type: string
                            minLength: 20
                            maxLength: 20
                            pattern: >-
                              ^(\d{4})-(1[0-2]|0?[1-9])-(3[01]|[12][0-9]|0?[1-9])T(?:[01]\d|2[0123]):(?:[012345]\d):(?:[012345]\d)Z$
                            example: '2020-07-21T08:30:00Z'
                          settlementAmount:
                            type: object
                            properties:
                              amount:
                                type: string
                                minLength: 4
                                maxLength: 20
                                pattern: ^\d{1,15}\.\d{2,4}$
                                example: '1000.0400'
                              currency:
                                type: string
                                minLength: 3
                                maxLength: 3
                                pattern: ^\w{3}$
                                example: BRL
                            required:
                              - amount
                              - currency
                          transactionId:
                            type: string
                            minLength: 1
                            maxLength: 20
                            pattern: ^[a-zA-Z0-9][a-zA-Z0-9-]{1,20}$
                            example: STR20181108000000013
                        required:
                          - settlementDateTime
                          - settlementAmount
                          - transactionId
                        description: >-
                          [RESTRIÇÃO] Obrigatório quando status for
                          PORTABILITY_COMPLETED ou AWAITING_CONTRACT_DISCHARGE
                    required:
                      - portabilityId
                      - customerContact
                      - institution
                      - contractIdentification
                      - proposedContract
                      - status
                      - statusUpdateDateTime
                      - creationDateTime
                  links:
                    type: object
                    properties:
                      self:
                        type: string
                        maxLength: 2000
                        format: uri
                        example: https://api.banco.com.br/open-banking/api/v1/resource
                    required:
                      - self
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - data
                  - links
                  - meta
        '400':
          description: A requisição foi malformada, omitindo atributos obrigatórios.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '401':
          description: Cabeçalho de autenticação ausente/inválido ou token inválido.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '403':
          description: >-
            O token tem escopo incorreto ou uma política de segurança foi
            violada.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '404':
          description: O recurso solicitado não existe ou não foi implementado.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '405':
          description: O consumidor tentou acessar o recurso com um método não suportado.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '406':
          description: >-
            A solicitação continha um cabeçalho Accept diferente dos tipos de
            mídia permitidos.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '422':
          description: >-
            A sintaxe da requisição está correta, mas não foi possível processar
            as instruções presentes.
          content:
            application/jwt:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '500':
          description: Ocorreu um erro no gateway da API ou no microsserviço.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '504':
          description: A requisição não foi atendida dentro do tempo limite estabelecido.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '529':
          description: O site está sobrecarregado e a operação foi recusada.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        default:
          description: Erro inesperado.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
  /portabilities/{portabilityId}/cancel:
    patch:
      summary: >-
        Comunica a Instituição Credora a respeito do cancelamento da
        portabilidade de crédito.
      description: >-
        Comunica a Instituição Credora a respeito do cancelamento da
        portabilidade de crédito.
      operationId: payrollCreditPortabilityPatchPortabilitiesPortabilityIdCancel
      tags:
        - Credit Portability
      parameters:
        - schema:
            type: string
            minLength: 36
            maxLength: 36
            pattern: >-
              ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
            description: Identificador do pedido de portabilidade de crédito.
          required: true
          description: Identificador do pedido de portabilidade de crédito.
          name: portabilityId
          in: path
        - schema:
            type: string
            description: >-
              Cabeçalho HTTP padrão. Permite que as credenciais sejam fornecidas
              dependendo do tipo de recurso solicitado.
          required: true
          description: >-
            Cabeçalho HTTP padrão. Permite que as credenciais sejam fornecidas
            dependendo do tipo de recurso solicitado.
          name: Authorization
          in: header
        - schema:
            type: string
            format: uuid
            description: UUID RFC4122 usado como ID de correlação entre request e response.
          required: true
          description: UUID RFC4122 usado como ID de correlação entre request e response.
          name: x-fapi-interaction-id
          in: header
        - schema:
            type: string
          required: false
          name: x-fapi-auth-date
          in: header
        - schema:
            type: string
          required: false
          name: x-fapi-customer-ip-address
          in: header
        - schema:
            type: string
          required: false
          name: x-customer-user-agent
          in: header
      requestBody:
        description: Payload para comunicar o cancelamento da portabilidade de crédito.
        required: true
        content:
          application/jwt:
            schema:
              type: object
              properties:
                data:
                  type: object
                  properties:
                    rejectedBy:
                      type: string
                      enum:
                        - PROPONENTE
                        - USUARIO
                    reason:
                      type: object
                      properties:
                        type:
                          type: string
                          enum:
                            - CANCELADO_PELO_CLIENTE
                            - >-
                              SALDO_DEVEDOR_ATUALIZADO_SUBSTANCIALMENTE_DIVERGENTE
                            - POLITICA_DE_CREDITO
                            - RESERVA_DA_MARGEM
                            - OUTROS
                        typeAdditionalInfo:
                          type: string
                          maxLength: 144
                          pattern: ^[^\s](?:.*[^\s])?$
                          example: Informações Adicionais
                      required:
                        - type
                  required:
                    - rejectedBy
                    - reason
              required:
                - data
      responses:
        '200':
          description: Dados da confirmação do cancelamento da portabilidade de crédito.
          content:
            application/jwt:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      rejectedBy:
                        type: string
                        enum:
                          - PROPONENTE
                          - USUARIO
                      reason:
                        type: object
                        properties:
                          type:
                            type: string
                            enum:
                              - CANCELADO_PELO_CLIENTE
                              - >-
                                SALDO_DEVEDOR_ATUALIZADO_SUBSTANCIALMENTE_DIVERGENTE
                              - POLITICA_DE_CREDITO
                              - RESERVA_DA_MARGEM
                              - OUTROS
                          typeAdditionalInfo:
                            type: string
                            maxLength: 144
                            pattern: ^[^\s](?:.*[^\s])?$
                            example: Informações Adicionais
                        required:
                          - type
                    required:
                      - rejectedBy
                      - reason
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - data
        '400':
          description: A requisição foi malformada, omitindo atributos obrigatórios.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '401':
          description: Cabeçalho de autenticação ausente/inválido ou token inválido.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '403':
          description: >-
            O token tem escopo incorreto ou uma política de segurança foi
            violada.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '404':
          description: O recurso solicitado não existe ou não foi implementado.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '405':
          description: O consumidor tentou acessar o recurso com um método não suportado.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '406':
          description: >-
            A solicitação continha um cabeçalho Accept diferente dos tipos de
            mídia permitidos.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '422':
          description: >-
            A sintaxe da requisição está correta, mas não foi possível processar
            as instruções presentes.
          content:
            application/jwt:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          enum:
                            - CANCELAMENTO_NAO_EFETUADO
                        title:
                          type: string
                          maxLength: 255
                        detail:
                          type: string
                          maxLength: 2048
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '500':
          description: Ocorreu um erro no gateway da API ou no microsserviço.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '504':
          description: A requisição não foi atendida dentro do tempo limite estabelecido.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '529':
          description: O site está sobrecarregado e a operação foi recusada.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        default:
          description: Erro inesperado.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
  /credit-operations/{contractId}/registering-entity:
    get:
      summary: >-
        Obtém os dados necessários para identificar o contrato a ser portado
        junto a averbadora.
      description: >-
        Obtém os dados do contrato consignado junto ao SERPRO. Deve ser
        utilizado momentos antes da consulta da proposta do cliente para validar
        o consentimento.
      operationId: payrollCreditPortabilityGetCreditOperationsContractIdRegisteringEntity
      tags:
        - Registering Entity
      parameters:
        - schema:
            type: string
            maxLength: 100
            pattern: ^[a-zA-Z0-9][a-zA-Z0-9-]{0,99}$
            description: >-
              Identificador do contrato para todos os tipos de operação de
              crédito.
          required: true
          description: >-
            Identificador do contrato para todos os tipos de operação de
            crédito.
          name: contractId
          in: path
        - schema:
            type: string
            description: >-
              Cabeçalho HTTP padrão. Permite que as credenciais sejam fornecidas
              dependendo do tipo de recurso solicitado.
          required: true
          description: >-
            Cabeçalho HTTP padrão. Permite que as credenciais sejam fornecidas
            dependendo do tipo de recurso solicitado.
          name: Authorization
          in: header
        - schema:
            type: string
            format: uuid
            description: UUID RFC4122 usado como ID de correlação entre request e response.
          required: true
          description: UUID RFC4122 usado como ID de correlação entre request e response.
          name: x-fapi-interaction-id
          in: header
        - schema:
            type: string
          required: false
          name: x-fapi-auth-date
          in: header
        - schema:
            type: string
          required: false
          name: x-fapi-customer-ip-address
          in: header
        - schema:
            type: string
          required: false
          name: x-customer-user-agent
          in: header
      responses:
        '200':
          description: >-
            Dados para auxiliar a identificação do contrato a ser portado junto
            a averbadora.
          content:
            application/jwt:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      payrollData:
                        type: object
                        properties:
                          payrollContractNumber:
                            type: string
                            minLength: 1
                            maxLength: 20
                            pattern: ^[a-zA-Z0-9][a-zA-Z0-9-]{0,19}$
                            description: >-
                              Número do contrato dado pela instituição
                              contratante no sistema da averbadora.
                            example: 12346579841058798Asq
                          relatedPayrollContractNumbers:
                            type: array
                            items:
                              type: string
                              minLength: 1
                              maxLength: 20
                              pattern: ^[a-zA-Z0-9][a-zA-Z0-9-]{0,19}$
                            minItems: 0
                            description: >-
                              Lista de números de contratos relacionados ao
                              contrato principal na averbadora.
                          registeringEntity:
                            type: string
                            enum:
                              - SERPRO
                            description: Nome da averbadora do empréstimo consignado.
                        required:
                          - payrollContractNumber
                          - registeringEntity
                    required:
                      - payrollData
                  links:
                    type: object
                    properties:
                      self:
                        type: string
                        maxLength: 2000
                        format: uri
                        example: https://api.banco.com.br/open-banking/api/v1/resource
                    required:
                      - self
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - data
                  - links
                  - meta
        '400':
          description: A requisição foi malformada, omitindo atributos obrigatórios.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '401':
          description: Cabeçalho de autenticação ausente/inválido ou token inválido.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '403':
          description: >-
            O token tem escopo incorreto ou uma política de segurança foi
            violada.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '404':
          description: O recurso solicitado não existe ou não foi implementado.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '405':
          description: O consumidor tentou acessar o recurso com um método não suportado.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '406':
          description: >-
            A solicitação continha um cabeçalho Accept diferente dos tipos de
            mídia permitidos.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '422':
          description: >-
            A sintaxe da requisição está correta, mas não foi possível processar
            as instruções presentes.
          content:
            application/jwt:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '500':
          description: Ocorreu um erro no gateway da API ou no microsserviço.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '504':
          description: A requisição não foi atendida dentro do tempo limite estabelecido.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '529':
          description: O site está sobrecarregado e a operação foi recusada.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        default:
          description: Erro inesperado.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
  /portabilities/{portabilityId}/payment:
    post:
      summary: >-
        Comunica a Instituição Credora a respeito da liquidação da portabilidade
        de crédito.
      description: >-
        Comunica a Instituição Credora a respeito da liquidação da portabilidade
        de crédito.
      operationId: payrollCreditPortabilityGetPortabilitiesPortabilityIdPayment
      tags:
        - Payments
      parameters:
        - schema:
            type: string
            minLength: 36
            maxLength: 36
            pattern: >-
              ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
            description: Identificador do pedido de portabilidade de crédito.
          required: true
          description: Identificador do pedido de portabilidade de crédito.
          name: portabilityId
          in: path
        - schema:
            type: string
            description: >-
              Cabeçalho HTTP padrão. Permite que as credenciais sejam fornecidas
              dependendo do tipo de recurso solicitado.
          required: true
          description: >-
            Cabeçalho HTTP padrão. Permite que as credenciais sejam fornecidas
            dependendo do tipo de recurso solicitado.
          name: Authorization
          in: header
        - schema:
            type: string
            format: uuid
            description: UUID RFC4122 usado como ID de correlação entre request e response.
          required: true
          description: UUID RFC4122 usado como ID de correlação entre request e response.
          name: x-fapi-interaction-id
          in: header
        - schema:
            type: string
          required: false
          name: x-fapi-auth-date
          in: header
        - schema:
            type: string
          required: false
          name: x-fapi-customer-ip-address
          in: header
        - schema:
            type: string
          required: false
          name: x-customer-user-agent
          in: header
      requestBody:
        description: >-
          Payload para comunicar a liquidação efetuada pela proponente a
          credora.
        required: true
        content:
          application/jwt:
            schema:
              type: object
              properties:
                data:
                  type: object
                  properties:
                    paymentDateTime:
                      type: string
                      maxLength: 20
                      pattern: >-
                        ^(\d{4})-(1[0-2]|0?[1-9])-(3[01]|[12][0-9]|0?[1-9])T(?:[01]\d|2[0123]):(?:[012345]\d):(?:[012345]\d)Z$
                      example: '2020-07-21T08:30:00Z'
                    paymentAmount:
                      type: object
                      properties:
                        amount:
                          type: string
                          minLength: 4
                          maxLength: 20
                          pattern: ^\d{1,15}\.\d{2,4}$
                          example: '1000.0400'
                        currency:
                          type: string
                          minLength: 3
                          maxLength: 3
                          pattern: ^\w{3}$
                          example: BRL
                      required:
                        - amount
                        - currency
                    transactionId:
                      type: string
                      minLength: 1
                      maxLength: 20
                      pattern: ^[^\s](?:.*[^\s])?$
                      example: STR20181108000000013
                  required:
                    - paymentDateTime
                    - paymentAmount
                    - transactionId
              required:
                - data
      responses:
        '202':
          description: >-
            Payload com os dados da comunicação do pagamento efetuado a
            instituição credora.
          content:
            application/jwt:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      paymentDateTime:
                        type: string
                        maxLength: 20
                        pattern: >-
                          ^(\d{4})-(1[0-2]|0?[1-9])-(3[01]|[12][0-9]|0?[1-9])T(?:[01]\d|2[0123]):(?:[012345]\d):(?:[012345]\d)Z$
                        example: '2020-07-21T08:30:00Z'
                      paymentAmount:
                        type: object
                        properties:
                          amount:
                            type: string
                            minLength: 4
                            maxLength: 20
                            pattern: ^\d{1,15}\.\d{2,4}$
                            example: '1000.0400'
                          currency:
                            type: string
                            minLength: 3
                            maxLength: 3
                            pattern: ^\w{3}$
                            example: BRL
                        required:
                          - amount
                          - currency
                      transactionId:
                        type: string
                        minLength: 1
                        maxLength: 20
                        pattern: ^[^\s](?:.*[^\s])?$
                        example: STR20181108000000013
                    required:
                      - paymentDateTime
                      - paymentAmount
                      - transactionId
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - data
        '400':
          description: A requisição foi malformada, omitindo atributos obrigatórios.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '401':
          description: Cabeçalho de autenticação ausente/inválido ou token inválido.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '403':
          description: >-
            O token tem escopo incorreto ou uma política de segurança foi
            violada.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '404':
          description: O recurso solicitado não existe ou não foi implementado.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '405':
          description: O consumidor tentou acessar o recurso com um método não suportado.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '406':
          description: >-
            A solicitação continha um cabeçalho Accept diferente dos tipos de
            mídia permitidos.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '422':
          description: >-
            A sintaxe da requisição está correta, mas não foi possível processar
            as instruções presentes.
          content:
            application/jwt:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          enum:
                            - PAGAMENTO_EFETUADO_FORA_PRAZO
                        title:
                          type: string
                          maxLength: 255
                        detail:
                          type: string
                          maxLength: 2048
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '500':
          description: Ocorreu um erro no gateway da API ou no microsserviço.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '504':
          description: A requisição não foi atendida dentro do tempo limite estabelecido.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '529':
          description: O site está sobrecarregado e a operação foi recusada.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        default:
          description: Erro inesperado.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
  /portabilities/{portabilityId}/request-discharge:
    post:
      summary: >-
        Endpoint usado para relembrar a instituição credora que a desaverbação
        do contrato ainda está pendente.
      description: >-
        Relembra a instituição credora que a desaverbação do contrato junto ao
        SERPRO ainda está pendente.
      operationId: payrollCreditPortabilityPostPortabilitiesPortabilityIdRequestDischarge
      tags:
        - Payments
      parameters:
        - schema:
            type: string
            minLength: 36
            maxLength: 36
            pattern: >-
              ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
            description: Identificador do pedido de portabilidade de crédito.
          required: true
          description: Identificador do pedido de portabilidade de crédito.
          name: portabilityId
          in: path
        - schema:
            type: string
            description: >-
              Cabeçalho HTTP padrão. Permite que as credenciais sejam fornecidas
              dependendo do tipo de recurso solicitado.
          required: true
          description: >-
            Cabeçalho HTTP padrão. Permite que as credenciais sejam fornecidas
            dependendo do tipo de recurso solicitado.
          name: Authorization
          in: header
        - schema:
            type: string
            format: uuid
            description: UUID RFC4122 usado como ID de correlação entre request e response.
          required: true
          description: UUID RFC4122 usado como ID de correlação entre request e response.
          name: x-fapi-interaction-id
          in: header
        - schema:
            type: string
          required: false
          name: x-fapi-auth-date
          in: header
        - schema:
            type: string
          required: false
          name: x-fapi-customer-ip-address
          in: header
        - schema:
            type: string
          required: false
          name: x-customer-user-agent
          in: header
      requestBody:
        description: >-
          Payload para relembrar a instituição credora que a desaverbação ainda
          está pendente.
        required: true
        content:
          application/jwt:
            schema:
              type: object
              properties:
                data:
                  type: object
                  properties:
                    transactionId:
                      type: string
                      minLength: 1
                      maxLength: 20
                      pattern: ^[^\s](?:.*[^\s])?$
                      description: >-
                        Identificador da transação utilizada para proponente
                        liquidar a portabilidade de crédito com a credora.
                      example: STR20181108000000013
                    payrollData:
                      type: object
                      properties:
                        contractId:
                          type: string
                          minLength: 1
                          maxLength: 20
                          pattern: ^[a-zA-Z0-9][a-zA-Z0-9-]{0,19}$
                          description: >-
                            Número do contrato dado pela instituição contratante
                            no sistema da averbadora.
                          example: 12346579841058798Asq
                        registeringEntity:
                          type: string
                          enum:
                            - SERPRO
                          description: Nome da averbadora do empréstimo consignado.
                      required:
                        - contractId
                        - registeringEntity
                  required:
                    - transactionId
                    - payrollData
              required:
                - data
      responses:
        '202':
          description: Dados da solicitação de desaverbação do contrato consignado.
          content:
            application/jwt:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      payrollData:
                        type: object
                        properties:
                          contractId:
                            type: string
                            minLength: 1
                            maxLength: 20
                            pattern: ^[a-zA-Z0-9][a-zA-Z0-9-]{0,19}$
                            example: 12346579841058798Asq
                          registeringEntity:
                            type: string
                            enum:
                              - SERPRO
                        required:
                          - contractId
                          - registeringEntity
                    required:
                      - payrollData
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - data
                  - meta
        '400':
          description: A requisição foi malformada, omitindo atributos obrigatórios.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '401':
          description: Cabeçalho de autenticação ausente/inválido ou token inválido.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '403':
          description: >-
            O token tem escopo incorreto ou uma política de segurança foi
            violada.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '404':
          description: O recurso solicitado não existe ou não foi implementado.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '405':
          description: O consumidor tentou acessar o recurso com um método não suportado.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '406':
          description: >-
            A solicitação continha um cabeçalho Accept diferente dos tipos de
            mídia permitidos.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '422':
          description: >-
            A sintaxe da requisição está correta, mas não foi possível processar
            as instruções presentes.
          content:
            application/jwt:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          enum:
                            - SOLICITACAO_NAO_EFETUADA
                            - CAMPO_INCONSISTENTE
                        title:
                          type: string
                          maxLength: 255
                        detail:
                          type: string
                          maxLength: 2048
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '500':
          description: Ocorreu um erro no gateway da API ou no microsserviço.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '504':
          description: A requisição não foi atendida dentro do tempo limite estabelecido.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        '529':
          description: O site está sobrecarregado e a operação foi recusada.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
        default:
          description: Erro inesperado.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          maxLength: 255
                          example: string
                        title:
                          type: string
                          maxLength: 255
                          example: string
                        detail:
                          type: string
                          maxLength: 2048
                          example: string
                      required:
                        - code
                        - title
                        - detail
                    minItems: 0
                    maxItems: 13
                  meta:
                    type: object
                    properties:
                      requestDateTime:
                        type: string
                        maxLength: 20
                        example: '2021-05-21T08:30:00Z'
                    required:
                      - requestDateTime
                required:
                  - errors
