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

# PATCH/Submission

> This API allows you to modify the KYC data of an existing submission. Note that modified data can be further updated but cannot be reverted to its original state.

## 1. Endpoint

```text PATCH/Submission theme={null}
PATCH https://rest-api.argosidentity.com/v3/submission
```

## 2. Authentication

Include the API key in the "x-api-key" header:

```text x-api-key theme={null}
x-api-key: {yourAPIKey}
```

## 3. Request Body

The request body must be in JSON format. Below are the field descriptions:

<ResponseField name="submissionId" type="string" required="true">
  Administrator's email address (must be registered in the dashboard).
</ResponseField>

<ResponseField name="admin" type="string" required="true">
  Administrator's email address (must be registered in the dashboard).
</ResponseField>

Add commentMore actions

<ResponseField name="data" type="object">
  Object containing the fields to be updated.

  <Expandable title="Properties">
    <ResponseField name="kycStatus" type="string">
      KYC result: `approved` or `rejected`.
    </ResponseField>

    <ResponseField name="idType" type="string">
      ID type. Refer to [ID Card Codes](/api-reference/api-reference-guide/en/id-card-types).
    </ResponseField>

    <ResponseField name="issuingCountry" type="string">
      Country of issue. Refer to [Country Codes](/api-reference/api-reference-guide/en/iso-alpha-3-country-codes).
    </ResponseField>

    <ResponseField name="fullName" type="string">
      Full name of the KYC applicant.
    </ResponseField>

    <ResponseField name="firstName" type="string">
      First name of the KYC applicant.
    </ResponseField>

    <ResponseField name="lastName" type="string">
      Last name (family name) of the KYC applicant.
    </ResponseField>

    <ResponseField name="gender" type="string">
      `female` or `male`.
    </ResponseField>

    <ResponseField name="birthDate" type="string">
      Date of birth in `YYYY-MM-DD` format.
    </ResponseField>

    <ResponseField name="nationality" type="string">
      Applicant's nationality. Refer to [Country Codes](/api-reference/api-reference-guide/en/iso-alpha-3-country-codes).
    </ResponseField>

    <ResponseField name="issueDate" type="string">
      ID issue date in `YYYY-MM-DD` format.
    </ResponseField>

    <ResponseField name="expireDate" type="string">
      ID expiration date in `YYYY-MM-DD` format.
    </ResponseField>

    <ResponseField name="documentNumber" type="string">
      Document number of the ID.
    </ResponseField>

    <ResponseField name="identityNumber" type="string">
      Identity number of the applicant.
    </ResponseField>

    <ResponseField name="serialNumber" type="string">
      Driver's license serial number.
    </ResponseField>

    <ResponseField name="memo" type="string">
      Memo for Admin; Record in Memo from Dashboard's Detailed information upon Request
    </ResponseField>
  </Expandable>
</ResponseField>

## 4. Request Example

```curl PATCH/Submission theme={null}
curl --location --request PATCH 'https://rest-api.argosidentity.com/v3/submission' \
--header 'x-api-key: {yourAPIKey}' \
--header 'Content-Type: application/json' \
--data-raw '{
  "submissionId": "6xx28lo115832",
  "admin": "yourAdmin@sample.com",
  "data": {
    "idType": "drivers_license",
    "issuingCountry": "KOR",
    "fullName": "hong kil dong",
    "firstName": "kil dong",
    "lastName": "hong",
    "gender": "male",
    "birthDate": "1999-11-31",
    "nationality": "USA",
    "kycStatus": "approved",
    "issueDate": "2017-10-19",
    "expireDate": "2027-10-18",
    "identityNumber": "991131-1111111",
    "documentNumber": "05-167-U0815",
    "serialNumber": "07PN10",
    "memo": "This is an example for memo"
  }
}'

```

## 5. Response

### 5-1. Success Response

```json result.json theme={null}
{
  "message": "success to edit.",
  "statusCode": 200
}
```

### 5-2. Error Response

If an error occurs, a `400` status code is returned with details in the response body:

```json error.json theme={null}
{
    "errorCode": "invalid_payload",
}
```

### 5-3. Error Codes

| Error Code                                                         | Description                            |
| ------------------------------------------------------------------ | -------------------------------------- |
| `API-Key is required.`                                             | API key is missing.                    |
| `The project is not found.`                                        | Project not found.                     |
| `Decryption is Failed. Please check the api-key.`                  | Data decryption failed.                |
| `Data Processing Error.`                                           | Data encryption failed.                |
| `data parsing error. please check input data.`                     | Data parsing error.                    |
| `submissionId is required.`                                        | `submissionId` is missing.             |
| `projectId or x-api-key is required.`                              | `projectId` or `x-api-key` is missing. |
| `admin is required.`                                               | `admin` information is missing.        |
| `At least one property to modify is required.`                     | No property to modify was provided.    |
| `Invalid idType. Please check the idType.`                         | Invalid ID type.                       |
| `Invalid kyc status. Please check the kycStatus.`                  | Invalid KYC status.                    |
| `Invalid gender. Please check the gender.`                         | Invalid gender value.                  |
| `Invalid issuingCountry. Please enter a valid ISO 3166-1 alpha-3.` | Invalid issuing country code.          |
| `Invalid nationality. Please enter a valid ISO 3166-1 alpha-3.`    | Invalid nationality code.              |
| `Invalid birthDate. Please enter the date as YYYY-MM-DD`           | Invalid birth date format.             |
| `Invalid issueDate. Please enter the date as YYYY-MM-DD`           | Invalid issue date format.             |
| `Invalid expireDate. Please enter the date as YYYY-MM-DD`          | Invalid expiration date format.        |

## 6. Encryption Options

For enhanced security, the request body can be encrypted. When using encryption:

* Encrypt the entire request body object.
* Send the encrypted string as the `data` parameter (not as a `body` field).

### 6-1. Encrypted Request Example

```python patch-encrypted.py theme={null}
encryption = Encryption(api_key, mode='ECB')

payload_data = {
    "admin": "yourAdmin@sample.com", 
    "submissionId": "6xx28lo115832", 
    "data": {
        "kycStatus": "approved",
        "fullName": "hong kil dong"
    }
}

# Encrypt the entire payload
payload_encrypted = encryption.encrypt(payload_data)

# Send the encrypted data as the data parameter
response = requests.patch(
    url,
    headers=headers,
    data=payload_encrypted
)
```

```curl PATCH/Submission (Encrypted) theme={null}
curl --location --request PATCH 'https://rest-api.argosidentity.com/v3/submission' \
--header 'x-api-key: {yourAPIKey}' \
--header 'Content-Type: application/json' \
--data 'N34SNtWaavEfgtg1g%2Bo%2B9JhQ9rp9dGUbyFNxAsHKKGH24aVQTRXYfNpFDHIGJU6Wo0RVpOupAubiDvFDuFyTkw%3D%3D'
```

### 6-2. Encrypted Response

The response will include the `isEncrypted` flag and encrypted data:

```json result.json theme={null}
response : {
   body : {
    "data": "encrypted-string",
    "isEncrypted": true
   }
}
```
