# supplyDefenseDocument

> Use this API to defend a dispute by uploading the necessary evidence within the specified time limit.

`POST /v1/payments/supplyDefenseDocument`

Use this API to defend a dispute by uploading the necessary evidence within the specified time limit.

# Structure

A message consists of a header and body. The following sections are focused on the body structure. For the header structure, see： 

-   [Request header](https://docs.antom.com/ac/ams/api_fund.md#ML5ur)
-   [Response header](https://docs.antom.com/ac/ams/api_fund.md#WWH90)

> **Note**: Set the data type of each field (except array) as String. This means that you must use double quotation marks (" ") to enclose the field value. Examples:
>
> -   If the data type of a field is Integer and its value is `20`, set it as "`20`". 
> -   If the data type of a field is Boolean and its value is `true`, set it as "`true`".

## Request parameters

#### disputeId (string, REQUIRED)

The unique ID assigned by Antom to identify a dispute.

More information:

- Maximum length: 64 characters

#### disputeEvidence (string, REQUIRED)

The dispute defense document that you prepare for defending the dispute, which is encoded in the Base64 format.

More information:

- Maximum length: 1000000 characters

## Response parameters

#### result (Result, REQUIRED)

The result of the API call.

##### resultCode (string, REQUIRED)

The result code. The possible result codes are listed in the **Result/Error codes** table on this page.

More information:

- Maximum length: 64 characters

##### resultStatus (string, REQUIRED)

The result status. Valid values are:

-   `S`: indicates that the API call succeeds.
-   `F`: indicates that the API call fails.
-   `U`: indicates that the API call might be successful, in process, or failed. For more details, see Result process logic.

More information:

- Maximum length: 1 character

##### resultMessage (string, REQUIRED)

The result message that explains the result code.

More information:

- Maximum length: 256 characters

#### disputeId (string)

The unique ID assigned by Antom to identify a dispute.

> Note: This prameter is returned when the value of _resultCode_ is `SUCCESS`.

More information:

- Maximum length: 64 characters

#### disputeResolutionTime (string)

The time when you upload the dispute defense document.

> Note: This prameter is returned when the value of _resultCode_ is `SUCCESS`.

More information:

- Maximum length: 64 characters

## Result/Error codes

| Code | Value | Message | Further action |
| --- | --- | --- | --- |
| SUCCESS | S | Success. | No further action is needed. |
| DEFENSE_EXCEED_LIMIT	 | F | The defense is greater than the maximum times allowed. This error code applies only to compliance request. | Contact Antom Technical Support to know the specific limitation. |
| NOT_ALLOW_IN_CURRENT_STATUS | F | The merchant repeated the upload after submitting the rebuttal materials without having received the verification result. This error code applies only to compliance request. | Contact Antom Technical Support to check the reason. |
| PARAM_ILLEGAL | F | Illegal parameters. For example, non-numeric input, invalid date. | Check and verify whether the required request fields (including the header fields and body fields) of the current API are correctly passed and valid. |
| REPEAT_REQUEST | F | Repeated request. | Contact Antom Technical Support to check the dispute status. |
| TIME_EXCEEDS_LIMIT | F | Your defense is overdue and you cannot accept or defend the dispute.  | Contact Antom Technical Support. |
| UNKNOWN_EXCEPTION | U | API failed due to unknown reason. | Call the interface again to resolve the issue. If not resolved, contact Antom Technical Support. |

## Request

```json
{
  "disputeId": "202401012501310115730104****",
  "disputeEvidence": "Base64 Encoded File"
}
```

## Response

```json
{
  "result": {
    "resultCode": "SUCCESS",
    "resultStatus": "S",
    "resultMessage": "success"
  },
  "disputeId": "2024010121013101637705928564",
  "disputeResolutionTime": "2024-01-01T18:25:00+00:00"
}
```