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

# Retrieve a dispute

> Retrieves one of your disputes by its processor's id (Stripe `du_...`, PayPal `PP-D-...`), the `dispute.processor_id` a chargeback carries. COPE publishes no id of its own for a dispute. Any other id answers 404.

Requires the `payments` permission at `read`. An API key holds a permission at the lower of its own level (`read` for a read-only key) and its holder's role; a key without it is refused with 403.



## OpenAPI

````yaml /api-reference/commerce-v1.openapi.json get /v1/commerce/disputes/{id}
openapi: 3.0.3
info:
  description: >-
    Public REST API for COPE vendor integrations. Authenticate with a COPE API
    key and call the endpoints described below.
  title: COPE Public API
  version: v1
servers:
  - description: Production
    url: https://api.cope.com
security:
  - cope_sk: []
paths:
  /v1/commerce/disputes/{id}:
    get:
      tags:
        - Disputes
      summary: Retrieve a dispute
      description: >-
        Retrieves one of your disputes by its processor's id (Stripe `du_...`,
        PayPal `PP-D-...`), the `dispute.processor_id` a chargeback carries.
        COPE publishes no id of its own for a dispute. Any other id answers 404.


        Requires the `payments` permission at `read`. An API key holds a
        permission at the lower of its own level (`read` for a read-only key)
        and its holder's role; a key without it is refused with 403.
      operationId: commerce.disputes.retrieve
      parameters:
        - description: id public identifier.
          example: du_1QeXampLeDisPute
          in: path
          name: id
          required: true
          schema:
            description: >-
              The processor's dispute id: Stripe `du_...` or `dp_...`, PayPal
              `PP-D-...`.
            example: du_1QeXampLeDisPute
            pattern: ^[A-Za-z0-9_-]{1,100}$
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  data:
                    additionalProperties: false
                    properties:
                      amount_minor_units:
                        description: >-
                          The disputed amount in minor units of `currency`,
                          positive.
                        type: integer
                      chargeback:
                        additionalProperties: false
                        description: >-
                          The chargeback recorded when the funds were taken:
                          `GET /v1/commerce/chargebacks/{id}`. Null until then.
                        nullable: true
                        properties:
                          id:
                            example: py_A1b2C3d4E5f6
                            pattern: ^py_[A-Za-z0-9]{8,32}$
                            type: string
                          object:
                            enum:
                              - chargeback
                            type: string
                        required:
                          - object
                          - id
                        type: object
                      chargeback_reversal:
                        additionalProperties: false
                        description: >-
                          The reversal recorded when a won dispute returned the
                          funds. Null otherwise.
                        nullable: true
                        properties:
                          id:
                            example: py_A1b2C3d4E5f6
                            pattern: ^py_[A-Za-z0-9]{8,32}$
                            type: string
                          object:
                            enum:
                              - chargeback
                            type: string
                        required:
                          - object
                          - id
                        type: object
                      created_at:
                        description: When COPE recorded the dispute.
                        format: date-time
                        type: string
                      currency:
                        type: string
                      evidence_due_by:
                        description: When evidence is due with the processor.
                        format: date-time
                        nullable: true
                        type: string
                      network_reason_code:
                        description: >-
                          The card network's reason code, when the processor
                          reported one.
                        nullable: true
                        type: string
                      object:
                        enum:
                          - dispute
                        type: string
                      order:
                        additionalProperties: false
                        description: The order of the disputed sale.
                        properties:
                          id:
                            example: ord_A1b2C3d4E5f6
                            pattern: ^ord_[A-Za-z0-9]{8,32}$
                            type: string
                          object:
                            enum:
                              - order
                            type: string
                        required:
                          - object
                          - id
                        type: object
                      payment:
                        additionalProperties: false
                        description: The disputed sale.
                        properties:
                          id:
                            example: py_A1b2C3d4E5f6
                            pattern: ^py_[A-Za-z0-9]{8,32}$
                            type: string
                          object:
                            enum:
                              - payment
                            type: string
                        required:
                          - object
                          - id
                        type: object
                      processor:
                        enum:
                          - stripe
                          - paypal
                        type: string
                      processor_id:
                        description: >-
                          The processor's dispute id: Stripe `du_...` or
                          `dp_...`, PayPal `PP-D-...`.
                        pattern: ^[A-Za-z0-9_-]{1,100}$
                        type: string
                      reason:
                        description: The reason the processor reported.
                        nullable: true
                        type: string
                      state:
                        description: >-
                          `open` while the dispute is undecided, `won` or `lost`
                          once the processor closed it.
                        enum:
                          - open
                          - won
                          - lost
                        type: string
                    required:
                      - object
                      - processor_id
                      - processor
                      - state
                      - amount_minor_units
                      - currency
                      - reason
                      - network_reason_code
                      - evidence_due_by
                      - created_at
                      - payment
                      - order
                      - chargeback
                      - chargeback_reversal
                    type: object
                required:
                  - data
                type: object
          description: Successful response
        '400':
          content:
            application/problem+json:
              examples:
                unparsable_request:
                  summary: Unparsable request
                  value:
                    code: invalid_request
                    detail: >-
                      The request could not be parsed. Check the query string
                      and the request body.
                    request_id: 0b6e3f2a-8c4d-4f1e-9a7b-5d2c8e1f4a90
                    status: 400
                    title: Invalid Request
                    type: https://docs.cope.com/errors/invalid_request
              schema:
                $ref: '#/components/schemas/PublicProblemDetail'
          description: Invalid request
        '401':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/PublicProblemDetail'
          description: Missing or invalid bearer token
        '403':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/PublicProblemDetail'
          description: Bearer token is not authorized for this route
        '404':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/PublicProblemDetail'
          description: Resource not found
        '503':
          content:
            application/problem+json:
              examples:
                user_not_ready:
                  summary: The key's user is not available yet
                  value:
                    code: user_not_ready
                    detail: Retry after 2 seconds
                    errors:
                      - code: user_not_ready
                        detail: Retry after 2 seconds
                    request_id: 0b6e3f2a-8c4d-4f1e-9a7b-5d2c8e1f4a90
                    status: 503
                    title: User Not Ready
                    type: https://docs.cope.com/errors/user_not_ready
                tenant_not_ready:
                  summary: The key's business is not available yet
                  value:
                    code: tenant_not_ready
                    detail: Retry after 2 seconds
                    errors:
                      - code: tenant_not_ready
                        detail: Retry after 2 seconds
                    request_id: 0b6e3f2a-8c4d-4f1e-9a7b-5d2c8e1f4a90
                    status: 503
                    title: Tenant Not Ready
                    type: https://docs.cope.com/errors/tenant_not_ready
              schema:
                $ref: '#/components/schemas/PublicProblemDetail'
          description: >-
            The API key is valid but its user or business is not available to
            this API yet (`user_not_ready`, `tenant_not_ready`). Retry after the
            `Retry-After` seconds.
      security:
        - cope_sk: []
components:
  schemas:
    PublicProblemDetail:
      additionalProperties: false
      properties:
        code:
          type: string
        detail:
          nullable: true
          type: string
        errors:
          items:
            additionalProperties: false
            properties:
              code:
                type: string
              detail:
                type: string
              param:
                type: string
            required:
              - code
              - detail
            type: object
          type: array
        request_id:
          description: >-
            Correlates this response with COPE's logs; the response also carries
            it as `X-Request-Id`. It is the `X-Request-Id` you sent when that is
            1-128 letters, digits, `_`, `@` or `-`, and otherwise one COPE
            generated. Quote it when you contact support.
          type: string
        status:
          type: integer
        title:
          type: string
        type:
          type: string
      required:
        - type
        - title
        - status
        - code
        - request_id
      type: object
  securitySchemes:
    cope_sk:
      description: >-
        Bearer credential for the public API: a live COPE API key (`ck_live_*`;
        keys issued earlier as `cope_sk_live_*` keep working). Dashboard sign-in
        tokens are not accepted.
      scheme: bearer
      type: http

````

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