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

# Actualizar el estado

Este endpoint admite dos tipos de estado de reclamación: `APPROVED` y `REJECTED`. El estado de la reclamación se actualiza en función del tipo de estado que se envíe en el cuerpo de la solicitud.
En el caso de que la reclamación se encuentre en la etapa de colaboración se aceptará o rechazará la colaboración en función del estado que se envíe en el cuerpo de la solicitud.

Puedes ver más sobre los estados de un reclamo [aquí](../../disputes/status).


## OpenAPI

````yaml PUT /claims/{claimId}/status
openapi: 3.0.0
info:
  version: 4.7.6
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  title: Kausanna API
  description: >
    Bienvenido a Kausanna, el servicio ofrecido por SONQO, dedicado a procesar
    los contracargos de tus clientes en tiempo real,

    brindando una solución integral que te permite concentrarte en tu negocio
    sin preocuparte por la complejidad de las redes de

    Visa y Mastercard.


    En el mundo de los negocios, los contracargos pueden ser una preocupación
    constante para los comercios y las empresas.

    La necesidad de enfrentar disputas de pagos, desconocimientos o
    reclamaciones de clientes puede ser un desafío significativo,

    especialmente cuando se trabaja con múltiples proveedores de tarjetas y
    redes de pago.

    Es en este punto donde Kausanna se convierte en tu mejor aliado.


    Nuestra plataforma Kausanna se ha desarrollado pensando en la simplicidad y
    eficiencia,

    ofreciendo un sistema escalable y seguro que te permitirá manejar los
    contracargos de manera rápida y efectiva.

    Olvídate de la complejidad técnica y los detalles burocráticos, Kausanna se
    encarga de abstraer toda la

    complejidad de las redes de Visa y Mastercard para que puedas enfocarte en
    lo que realmente importa: hacer crecer tu negocio.


    Verificá el estado de nuestras APIs en [Kausanna
    Status](https://kausanna.instatus.com/)
  contact:
    email: ongoing-processes-sonqo@naranjax.com
  x-logo:
    url: https://www.naranjax.com/assets/images/navbar-isologo-naranjax.png
    altText: NaranjaX Logo
    backgroundColor: '#ffffff'
    href: https://www.naranjax.com/
servers:
  - url: https://e3-kausanna.sonqo.io
    description: Sandbox
  - url: https://kausanna.sonqo.io
    description: Entorno de producción
security:
  - bearerAuth: []
paths:
  /claims/{claimId}/status:
    put:
      tags:
        - claims > {claimId}
      summary: Actualizar el estado de una reclamación
      operationId: putStatusByClaimId
      parameters:
        - name: claimId
          in: path
          schema:
            type: integer
          required: true
          example: '200002031927'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                status:
                  type: string
                  example: REJECTED
                  enum:
                    - ACCEPTED
                    - REJECTED
              example:
                status: REJECTED
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: Indica si la operación fue exitosa
                  transitionedTo:
                    type: string
                    description: El estado al que se ha cambiado la reclamación
                  data:
                    $ref: '#/components/schemas/Claim'
                    type: object
              example:
                success: true
                transitionedTo: COLLABORATION_REJECTED
                data: {}
        '400':
          description: Bad Request
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  exception:
                    type: string
                    example: Bad Request
                  code:
                    type: string
                    example: VALIDATION_ERROR
                  message:
                    type: string
                    example: Validation error
                  issues:
                    type: array
                    items:
                      type: object
                      properties:
                        received:
                          type: string
                          example: ACCEPTED-1
                        code:
                          type: string
                          example: invalid_enum_value
                        options:
                          type: array
                          items:
                            type: string
                            example: ACCEPTED
                        path:
                          type: array
                          items:
                            type: string
                            example: status
                        message:
                          type: string
                          example: >-
                            Invalid enum value. Expected 'ACCEPTED' |
                            'REJECTED', received 'ACCEPTED-1'
              examples:
                example-0:
                  summary: '400: Validation Error'
                  value:
                    success: false
                    exception: Bad Request
                    code: VALIDATION_ERROR
                    message: Validation error
                    issues:
                      - received: ACCEPTED-1
                        code: invalid_enum_value
                        options:
                          - ACCEPTED
                          - REJECTED
                        path:
                          - status
                        message: >-
                          Invalid enum value. Expected 'ACCEPTED' | 'REJECTED',
                          received 'ACCEPTED-1'
                example-1:
                  summary: '400: Not pending action'
                  value:
                    success: false
                    exception: Bad Request
                    code: KAUSANA.CLAIM_NOT_PENDING_MERCHANT_ACTION
                    message: Claim is not pending merchant action
        '404':
          $ref: '#/components/responses/ClaimNotFound'
components:
  schemas:
    Claim:
      type: object
      properties:
        id:
          type: string
          example: '207779219414'
          description: Unique identifier for the claim.
        primaryAccountNumber:
          type: string
          example: 5450********6048
          description: Primary account number for the transaction.
        rrn:
          type: string
          example: '08032054026003400006298'
          description: Retrieval reference number for the transaction.
        status:
          type: string
          example: SECOND_PRESENTATION_STARTED
          description: The current status of the claim.
          enum:
            - PENDING_REVIEW
            - COLLABORATION_ACCEPTED
            - COLLABORATION_REJECTED
            - SECOND_PRESENTATION_STARTED
            - SECOND_PRESENTATION_COMPLETED
            - SECOND_PRESENTATION_ACCEPTED
            - COMPLETED
        isOpen:
          type: boolean
          example: true
          description: Indicates if the claim is open or closed.
        createdAt:
          type: string
          format: date-time
          example: '2024-03-05T19:51:58.202Z'
          description: Date and time when the claim was created.
        updatedAt:
          type: string
          format: date-time
          example: '2024-03-05T19:54:01.709Z'
          description: Date and time when the claim was last updated.
        merchantId:
          type: string
          example: '000000000010377'
          description: Unique identifier for the merchant.
        amount:
          type: number
          example: 1000
        currency:
          type: string
          example: ARS
          description: ISO 4217 currency code.
        outcome:
          type: string
          example: in_progress
          description: >-
            The current outcome. Indicates the current status of the claim. If
            the merchant won or lost the claim.
          enum:
            - in_progress
            - won
            - lost
        transactionId:
          type: string
          example: >-
            TI:FIEaEgnM3bwPijwZgjc3Te+Y0ieLbN9ijUugqNSvJmVbO1xs6Jh5iIlmpOpkbax79L8Yj1rBOWBACx+Vj17rzvOepWobpgWNJNdsgHB4ag=#hqCnaMDqmto4wnL+BSUKSdzROqGJ7YELoKhEvluycwKNg3XTzSfaIJhFDkl9hW081B5tTqFFiAwCpcocPdB2My4t7DtSTk63VXDl1CySA8Y=
          description: >-
            Unique identifier for the transaction. For Mastercard, the
            transaction ID contains 2 parts separated by a `#`. The first part
            is the clearing transaction ID and the second part is the
            authorization transaction ID.
        issuerId:
          type: string
          example: 6195
          description: Identifier for the issuer of the chargeback.
        acquirerId:
          type: string
          example: 6355
          description: Identifier for the acquirer of the chargeback.
        partnerId:
          type: string
          example: 01HNBCE7RY395G62BCQFYDCV46
          description: Kausanna partner identifier.
        seen:
          type: boolean
          example: false
          description: >-
            Indicates if the claim has been seen by the merchant / partner
            service.
        events:
          type: array
          description: Array of events related to the claim.
          items:
            type: object
            properties:
              name:
                type: string
                description: Name of the event.
              timestamp:
                type: string
                format: date-time
        origin:
          type: string
          example: mastercard
          description: >-
            The origin of the claim. Indicates if the claim was originated from
            Visa, Mastercard or other network.
        authCode:
          type: string
          example: ab3285c5
          description: Authorization code for the transaction.
        flow:
          type: object
          properties:
            currentStep:
              type: string
              example: PENDING_REVIEW
              description: The current step in the claim flow.
        payment:
          $ref: '#/components/schemas/PaymentMethod'
        merchant:
          $ref: '#/components/schemas/Merchant'
    PaymentMethod:
      type: object
      description: Contains all details about the payment method used.
      properties:
        id:
          type: string
          description: The Ranty payment method identifier.
        data_privacy:
          type: object
          properties:
            encrypted:
              $ref: '#/components/schemas/PaymentDataPrivacyEncrypted'
          description: Details about the privacy and encryption of payment data.
        card_method_type:
          type: string
          description: Type of card method used.
          example: encrypted
        card_holder_name:
          type: string
          description: Name of the card holder.
          example: Test
        card_holder_doc_type:
          type: string
          description: Type of document of the card holder.
          example: DNI
        type:
          type: string
          description: Type of payment.
          example: card_payment
        expiration_date:
          type: string
          description: Expiration date of the card.
          example: 04/2029
        card_type:
          type: string
          description: Type of card used.
          example: DEBIT
        card_holder_email:
          type: string
          description: Email of the card holder.
          example: Test@google.com
        expiration_year:
          type: string
          description: Expiration year of the card.
          example: '2029'
        product_id:
          type: string
          description: Product identifier.
          example: MASTERCARD
        expiration_month:
          type: string
          description: Expiration month of the card.
          example: '04'
        name:
          type: string
          description: Name of the payment product.
          example: MASTERCARD
        pan:
          type: string
          description: Partially masked PAN number.
          example: 553771******3011
        card_holder_doc_number:
          type: string
          description: Document number of the card holder.
          example: '002839234234'
        wallet_name:
          type: string
          description: Name of the wallet used.
          example: galicia
        QRName:
          type: string
          description: QR name.
          example: bb22707a-457e-4695-a29d-8ed76d4bbe85
    Merchant:
      type: object
      description: >-
        Contains all the information related to a merchant, including payment
        and contact details.
      properties:
        storeId:
          type: string
          description: Unique identifier of the store.
          example: 6546e6b2-b0ce-4159-addf-f0147ce08bc4
        ownerId:
          type: string
          description: Unique identifier of the owner.
          example: c6efebfb-b5ba-4e17-8ece-c8c47d27ddf8
        name:
          type: string
          description: Name of the merchant.
          example: Catdog
        mcc:
          type: string
          description: Merchant category code.
          example: '7311'
        taxId:
          type: string
          description: Tax identification number of the merchant.
          example: '23395567659'
        taxIdType:
          type: string
          description: Type of tax identification number.
          example: arg.cuit
        externalPaymentId:
          type: string
          description: External identifier for the payment.
          example: '8524623'
        contact:
          $ref: '#/components/schemas/Contact'
        address:
          $ref: '#/components/schemas/Address'
    PaymentDataPrivacyEncrypted:
      type: object
      description: Contains details about the data privacy and encryption.
      properties:
        data:
          type: string
          description: Encrypted data content.
          example: test
        origin:
          type: string
          description: Origin of the data encryption.
          example: non_present
    Contact:
      type: object
      description: Contact details for the merchant.
      properties:
        email:
          type: string
          description: Contact email address.
          example: No data
        phone:
          type: string
          description: Contact phone number.
          example: No data
        businessName:
          type: string
          description: Business name of the contact.
          example: EZEQUIEL CALONGE
        country:
          type: string
          description: Country of the contact.
          example: ARG
    Address:
      type: object
      description: Address details of the merchant.
      properties:
        country:
          type: string
          description: Country of the address.
          example: ARG
        address:
          type: object
          properties:
            number:
              type: string
              description: Street number of the address.
              example: '135'
            notes:
              type: string
              description: Additional notes about the address.
              example: '-'
            street:
              type: string
              description: Street name of the address.
              example: Luis piedra buena
          description: Detailed street address.
        city:
          type: string
          description: City of the address.
          example: CHIVILCOY
        name:
          type: string
          description: Name associated with the address.
          example: LINK DE PAGO
        id:
          type: string
          description: Identifier of the address.
          example: c231a73b-b1f5-4b1a-b049-675876938605
        state:
          type: string
          description: State or province of the address.
          example: B
        zip_code:
          type: string
          description: ZIP or postal code of the address.
          example: B6620AAA
  responses:
    ClaimNotFound:
      description: Not Found
      headers:
        Content-Type:
          schema:
            type: string
            example: application/json
      content:
        application/json:
          schema:
            type: object
            properties:
              success:
                type: boolean
                example: false
              exception:
                type: string
                example: Not Found
              code:
                type: string
                example: KAUSANA.CLAIM_NOT_FOUND
              message:
                type: string
                example: Claim not found
          example:
            success: false
            exception: Not Found
            code: KAUSANA.CLAIM_NOT_FOUND
            message: Claim not found
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API Token generated for your account. The token must be prefixed with
        `Bearer `.

````