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

# File Upload

> Learn how to upload identity, credential and supporting documents via the Gcashier Pay file upload API, including request parameters, request examples, response parsing and error troubleshooting.

```
POST https://{baseUrl}/api/sp1100
```

### Request Parameters

<ParamField body="flowNo" type="string" required>
  Your unique order reference for this application. Max 32 characters.
</ParamField>

### Response Body

<ResponseField name="fileName" type="string" required />

<ResponseField name="code" type="string" required>
  S00000: File uploaded success.
</ResponseField>

<ResponseField name="message" type="string" required />

<Note>
  All document fields accept HTTPS URLs pointing to pre-uploaded files. Ensure each URL is publicly accessible by Gcashier Pay's servers at review time. Files must be in PDF, JPG, or PNG format and must not exceed 10 MB each.
</Note>

<RequestExample>
  ```json Request theme={null}
  {
  	"flowNo": "1734276289299"
  }
  ```

  ```json Http Example theme={null}
    Content-Type: multipart/form-data
    cryptoPayload:
    {
      "jsonEnc": Encrypted message body,
      "keyEnc": Encrypted key,
      "sign": Encrypted signature,
      "merchantNo": Merchant number
    }
    file: File stream
  ```

  ```java Java theme={null}
  JSONObject object = new JSONObject();
  object.put("merchantNo", merchantNo);
  object.put("jsonEnc", hexJsonEnc);
  object.put("keyEnc", hexKeyEnc);
  object.put("sign", hexSign);

  MultipartEntityBuilder builder = MultipartEntityBuilder.create();
  builder.addPart("cryptoPayload", new StringBody(object.toJSONString(), ContentType.APPLICATION_JSON));
  builder.addPart("file", new FileBody(file));
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
  	"fileName": "invite/000959100493/260617174313900001.jpg",
  	"code": "S00000",
  	"message": "File uploaded success."
  }
  ```
</ResponseExample>

## File Upload Result Code

| Response `code` | Meaning                            |
| --------------- | ---------------------------------- |
| `S00000`        | `File upload success`              |
| `AE0080`        | `File upload failed`               |
| `ER8888`        | `File extension format is invalid` |

<Warning>
  If the response code is not S00000, the file upload request will be deemed failed.
</Warning>
