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

# Complete a Claim

> Use this endpoint to complete a claim by the claimer. As a result, the
link between the key and the claiming party is created.


**Notes:**

- For ownership claim, status must be CONFIRMED and deadline defined by
field CompletionPeriodEnd must have passed.

- For portability, status must be CONFIRMED.

- This operation finalizes the key transfer and creates the entry in
DICT.



## OpenAPI

````yaml /en/openapi/v3-current/indirect-pix.yaml post /v1/dict/claims/{claim_id}/complete
openapi: 3.0.3
info:
  title: Plugin BR Pix Indirect - Complete API
  description: |
    Complete API for Brazilian Pix instant payment system including
    Pix key dictionary operations, QR code generation/decoding, transactions and
    transaction limits.
  version: 1.0.0
servers:
  - url: https://plugin-pix-indirect.api.lerian.net
security:
  - bearerAuth: []
paths:
  /v1/dict/claims/{claim_id}/complete:
    post:
      tags:
        - Claims API
      summary: Complete a Claim
      description: |-
        Use this endpoint to complete a claim by the claimer. As a result, the
        link between the key and the claiming party is created.


        **Notes:**

        - For ownership claim, status must be CONFIRMED and deadline defined by
        field CompletionPeriodEnd must have passed.

        - For portability, status must be CONFIRMED.

        - This operation finalizes the key transfer and creates the entry in
        DICT.
      parameters:
        - $ref: '#/components/parameters/ClaimId'
        - $ref: '#/components/parameters/XAccountId'
        - $ref: '#/components/parameters/XRequestId'
      responses:
        '200':
          description: Claim completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClaimObject'
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
              examples:
                ErrorPIX0001:
                  $ref: '#/components/examples/ErrorPIX0001'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
              examples:
                ErrorPIX0147:
                  $ref: '#/components/examples/ErrorPIX0147'
        '404':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
              examples:
                ErrorPIX0113:
                  $ref: '#/components/examples/ErrorPIX0113'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
              examples:
                ErrorPIX0160:
                  $ref: '#/components/examples/ErrorPIX0160'
                ErrorPIX0161:
                  $ref: '#/components/examples/ErrorPIX0161'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
              examples:
                ErrorPIX0146:
                  $ref: '#/components/examples/ErrorPIX0146'
                ErrorPIX0148:
                  $ref: '#/components/examples/ErrorPIX0148'
                ErrorPIX0149:
                  $ref: '#/components/examples/ErrorPIX0149'
                ErrorPIX0162:
                  $ref: '#/components/examples/ErrorPIX0162'
                ErrorPIX0163:
                  $ref: '#/components/examples/ErrorPIX0163'
                ErrorPIX0164:
                  $ref: '#/components/examples/ErrorPIX0164'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
              examples:
                ErrorPIX0000:
                  $ref: '#/components/examples/ErrorPIX0000'
        '502':
          description: Bad Gateway
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
              examples:
                ErrorPIX1000:
                  $ref: '#/components/examples/ErrorPIX1000'
                ErrorPIX1007:
                  $ref: '#/components/examples/ErrorPIX1007'
                ErrorPIX1099:
                  $ref: '#/components/examples/ErrorPIX1099'
      deprecated: false
      security:
        - bearerAuth: []
components:
  parameters:
    ClaimId:
      name: claim_id
      in: path
      description: Unique identifier of the claim (UUID format).
      required: true
      example: 019c96a0-0bc7-7958-9d05-82bef1f200f1
      schema:
        type: string
    XAccountId:
      name: X-Account-Id
      in: header
      description: Unique identifier of the Midaz Ledger Account (UUID format).
      required: true
      example: 019c96a0-0a98-7287-9a31-786e0809c769
      schema:
        type: string
    XRequestId:
      name: X-Request-Id
      in: header
      description: Request ID for idempotency (UUID format).
      required: false
      example: 019c96a0-0be2-790e-ac41-8d2ad09c1c7f
      schema:
        type: string
  schemas:
    ClaimObject:
      type: object
      properties:
        id:
          type: string
          description: Internal UUID of the claim.
          example: 019c96a0-0c3e-77b5-8321-4807058a67bb
        bacenClaimId:
          type: string
          description: BACEN DICT identifier for this claim.
          example: 019c96a0-0d16-7184-ad7f-38545eeb671c
        key:
          type: string
          description: The Pix key value being claimed.
          example: '+5561988887777'
        keyType:
          type: string
          description: Type of Pix key.
          example: PHONE
        type:
          type: string
          description: Type of claim.
          enum:
            - OWNERSHIP
            - PORTABILITY
          example: OWNERSHIP
        status:
          type: string
          description: Current status of the claim.
          enum:
            - OPEN
            - WAITING_RESOLUTION
            - CONFIRMED
            - CANCELLED
            - COMPLETED
          example: OPEN
        donorParticipant:
          type: string
          description: ISPB of the donor PSP.
          example: '30306294'
        resolutionPeriodEnd:
          type: string
          format: date-time
          description: Deadline for donor response (D+7 from creation).
          example: '2024-01-22T10:30:00Z'
        completionPeriodEnd:
          type: string
          format: date-time
          description: Deadline for claim completion (D+14 from creation).
          example: '2024-01-29T10:30:00Z'
        createdAt:
          type: string
          format: date-time
          description: Timestamp when the claim was created.
          example: '2024-01-15T10:30:00Z'
        updatedAt:
          type: string
          format: date-time
          description: Timestamp when the claim was last updated.
          example: '2024-01-15T10:30:00Z'
    ErrorFormat:
      type: object
      description: The response message error.
      required:
        - code
        - title
        - message
      properties:
        code:
          type: string
          description: A unique, stable identifier for the error.
        title:
          type: string
          description: A brief summary of the issue.
        message:
          type: string
          description: Detailed guidance for resolving the error.
  examples:
    ErrorPIX0001:
      summary: Missing Headers in Request
      value:
        code: PIX-0001
        title: Missing Headers in Request
        message: >-
          Your request is missing one or more required header params. Please
          refer to the documentation to ensure all necessary header params are
          included in your request.
    ErrorPIX0147:
      summary: Must Be Claimer Participant
      value:
        code: PIX-0147
        title: Must Be Claimer Participant
        message: Only the claimer participant can complete a claim.
    ErrorPIX0113:
      summary: Claim Not Found
      value:
        code: PIX-0113
        title: Claim Not Found
        message: The claim was not found.
    ErrorPIX0160:
      summary: Claim Already Completed
      value:
        code: PIX-0160
        title: Claim Already Completed
        message: The claim has already been completed.
    ErrorPIX0161:
      summary: Claim Is Cancelled
      value:
        code: PIX-0161
        title: Claim Is Cancelled
        message: The claim has been cancelled and cannot be completed.
    ErrorPIX0146:
      summary: Claim Not Confirmed
      value:
        code: PIX-0146
        title: Claim Not Confirmed
        message: The claim must be in CONFIRMED status.
    ErrorPIX0148:
      summary: Ownership Completion Period Not Ended
      value:
        code: PIX-0148
        title: Ownership Completion Period Not Ended
        message: >-
          Ownership claims can only be completed after the completion period has
          ended.
    ErrorPIX0149:
      summary: Claim Not Acknowledgeable
      value:
        code: PIX-0149
        title: Claim Not Acknowledgeable
        message: >-
          The claim does not meet acknowledgement preconditions (must be OPEN
          status and caller must be the donor participant).
    ErrorPIX0162:
      summary: Claim Cannot Be Completed
      value:
        code: PIX-0162
        title: Claim Cannot Be Completed
        message: The claim cannot be completed in its current status.
    ErrorPIX0163:
      summary: Completion Period Not Set
      value:
        code: PIX-0163
        title: Completion Period Not Set
        message: The completion period is not set for this claim.
    ErrorPIX0164:
      summary: Completion Period Expired
      value:
        code: PIX-0164
        title: Completion Period Expired
        message: The completion period has expired for this claim.
    ErrorPIX0000:
      summary: Internal Server Error
      value:
        code: PIX-0000
        title: Internal Server Error
        message: The server encountered an unexpected error. Please try again later.
    ErrorPIX1000:
      summary: Provider Connection Error
      value:
        code: PIX-1000
        title: Provider Connection Error
        message: Failed to connect to provider.
    ErrorPIX1007:
      summary: Provider Internal Error
      value:
        code: PIX-1007
        title: Provider Internal Error
        message: Provider returned an internal error.
    ErrorPIX1099:
      summary: Provider Unmapped Error
      value:
        code: PIX-1099
        title: Provider Unmapped Error
        message: Provider returned an unmapped error.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````