POST
Upload file
Use this endpoint to upload a file for Embedded Finance scenarios. Submit the request as
multipart/form-data.Request
apiKeyAPI key assigned for Embedded Finance API access.
Example:
replace_with_api_keyContent-TypeRequest content type for the file upload.
Example:
multipart/form-dataConstraints
- Rule
- Submit this request as
multipart/form-databecause the request includes a binary file stream.
fileNameFile name submitted with the upload request.
Example:
back.pngConstraints
- Range
64characters- Rule
- Use the original file name or a merchant-generated file name that preserves the file extension.
fileBinary file stream to upload.
Example:
@"/path/to/back.png"Constraints
- Range
15MBMaximum file size.- Rule
- Send the actual binary file stream in this form-data part. Do not submit a file path string as the field value.
curl -X POST 'https://sandbox-baas.onerway.com/embedded-finance/api/v2/upload/file' \
-H 'apiKey: replace_with_api_key' \
-H 'Content-Type: multipart/form-data' \
--data-raw '{
"fileName": "back.png",
"file": "@\"/path/to/back.png\""
}'Response
respCodeResponse code returned by Onerway.
20000 means the file upload succeeded.Example:
20000respMsgHuman-readable response message.
Example:
Successdata{ merchantNo, fileId }Uploaded file metadata returned after the file is uploaded successfully.
{
"respCode": "20000",
"respMsg": "Success",
"data": {
"merchantNo": "800***",
"fileId": 987654321
}
}No error responses are documented for this endpoint.