---
title: "Submit representment plan evidences"
method: POST
path: "/dispute/disputes/{disputeId}/evidences/submit-plan"
tags: ["Disputes"]
---

# Submit representment plan evidences

`POST /dispute/disputes/{disputeId}/evidences/submit-plan`

## Request

- Base URL: `https://api.staging.payrails.io`
- URL: `https://api.staging.payrails.io/dispute/disputes/{disputeId}/evidences/submit-plan`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/payrails/apis/payrails-api-reference/docs/dispute/disputes/:disputeId/evidences/submit-plan/post.ts> (a function with typed inputs; its response is checked against the schema)

Confirm your evidence selections for the representment plan and trigger generation of the written representment sections. Returns the generated sections along with a timeline of key events for review.

## Path parameters

- `disputeId` string, uuid, required

## Headers

- `x-idempotency-key` string, uuid, required

## Request body

- object
  - `selectedDefenseReasonCode` string: The provider reason code the merchant wants to defend with. If omitted, the LLM-suggested code from plan generation remains in effect.
  - `evidences` object[], required: List of selected representment plan evidence items and target positions. Each position must be unique.
    - `evidenceId` string, uuid, required: Unique identifier of an uploaded evidence linked to this dispute.
    - `position` integer, required: Target representment plan evidence position to associate with evidenceId.
    - `labels` string[]: Labels to assign to this evidence for the dispute, used to categorise the document during representment.
  - `userPrompt` string: Additional user prompt to generate representment sections. If not provided, the system will use a default prompt.

## Response `200`

Evidence selections saved and representment sections generated.

- object
  - `representmentPlan` object, required: Updated representment plan after selected evidences were stored.
    - `disputeId` string, uuid, required: Unique identifier of the dispute in Payrails.
    - `providerResponseId` string: Provider response identifier for representment plan generation.
    - `createdAt` string, date-time, required: Date and time when the representment plan was created in Payrails.
    - `updatedAt` string, date-time, required: Date and time when the representment plan was last updated in Payrails.
    - `status` 'GeneratingPlan' | 'PlanReady' | 'StoringEvidences' | 'LabelingEvidences' | 'EvidencesReady' | 'GeneratingRepresentment' | 'RepresentmentReady' | 'Submitted', required: Status of the representment plan lifecycle.
    - `recommendation` string: Recommended action for the merchant (e.g. "defend" or "accept").
    - `rationale` string: Explanation supporting the recommendation.
    - `defenseReasons` object[]: Defense reason codes with evidence options, grouped by provider reason code.
      - `code` string, required: Adyen defense document type code.
      - `title` string, required: Human-readable name for this defense document type.
      - `description` string, required: Explanation of what this defense document type covers.
      - `selected` boolean, required: Whether this defense type is the recommended selection.
      - `options` object[], required: Evidence suggestions within this defense type.
        - `position` integer, required: Ordering position of this option within the defense type.
        - `slug` string: Machine-readable identifier for the evidence type.
        - `title` string, required: Suggested title for this evidence.
        - `description` string, required: Suggested details to include for this evidence.
        - `required` boolean, required: Whether this evidence is mandatory for the defense.
        - `evidenceInfo` object: Display metadata for the already-uploaded evidence file, present when evidenceId is set.
          - `displayTitle` string: Human-readable file name or title of the uploaded evidence.
          - `contentType` string: MIME type of the uploaded evidence file.
          - `contentLength` integer: Size of the uploaded evidence file in bytes.
  - `representmentSections` object[], required: Generated ordered representment sections based on selected evidences (Timeline sections excluded).
    - `id` string, uuid, required: Unique identifier of the representment section in Payrails.
    - `disputeId` string, uuid, required: Unique identifier of the dispute in Payrails.
    - `createdAt` string, date-time, required: Date and time when the representment section was created in Payrails.
    - `updatedAt` string, date-time, required: Date and time when the representment section was last updated in Payrails.
    - `position` integer, required: Position of the section in the representment.
    - `indent` integer, required: Indentation level of the section in the representment.
    - `sectionType` 'Text' | 'Picture' | 'Timeline', required: Type of representment section.
    - `textSectionTitle` string: Title of the text section when sectionType is Text.
    - `textSectionContent` string: Content of the text section when sectionType is Text.
    - `pictureSectionEvidenceId` string, uuid: Linked evidence identifier when sectionType is Picture.
    - `pictureSectionLabel` string: Label for the picture section when sectionType is Picture.
    - `pictureSectionEvidenceLinks` object: Links for downloading the picture section evidence file when sectionType is Picture.
      - `download` union
        - string
        - object: Link related information.
          - `href` string, required
          - `method` 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE': HTTP method that should be used to call the `href`.
  - `timeline` object[]: Deserialized timeline events extracted from the Timeline section, when present.
    - `date` string, date, required: Date of the timeline event in ISO 8601 format (YYYY-MM-DD).
    - `message` string, required: Concise plain-text description of the timeline event (1-2 sentences, no HTML).

## Other responses

- `400`: Bad Request.
- `401`: Unauthorized.
- `403`: Forbidden.
- `404`: Not Found.
- `409`: Conflict.
- `429`: Too Many Requests.
- `500`: Internal Server Error.

---

[API](https://skmtc.dev/payrails/apis/payrails-api-reference.md) - [All operations](https://skmtc.dev/payrails/apis/payrails-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/payrails/apis/payrails-api-reference/revisions/9dd2f0158582?raw)
