POST v1/Files/FileUpload
Upload a file stream asynchronously using multipart/form-data
Request Information
URI Parameters
None.
Body Parameters
None.
Request Formats
multipart/form-data
Sample:
This endpoint uploads a file together with a few text fields, so the request body must be sent as multipart/form-data (the same encoding a browser uses for a file-upload form). Do NOT send JSON. In an API client (e.g. Postman): select the Body tab, choose "form-data", then add one row per field below. Set each row's type to "Text" or "File" as shown in the Type column. For the "file" row, switch the type to File and pick the file to upload; the client fills in the rest. Fields: Key | Type | Example Value | Required | Description -----------|------|---------------|----------|------------------------------------------------- ContactID | Text | 12345 | Yes | ID of the contact to associate the uploaded file with. FileName | Text | example.pdf | Yes | Name to store the uploaded file under. PolicyID | Text | 6789,6790 | No | One or more policy IDs to associate, comma-separated. File | File | example.pdf | Yes | The file to upload. Exactly one file part is allowed. Notes: - ContactID must be a whole number; PolicyID accepts a single ID (6789) or several (6789,6790). - Send exactly one "file" part - multiple files in one request are rejected. - On success the response returns the stored file's details (see Response Information below).
Response Information
Resource Description
Action result
ActionResultDTO| Name | Description | Type | Additional information |
|---|---|---|---|
| IsSuccess |
Signifies whether action is successful |
boolean |
None. |
| ErrorCode |
Error code |
string |
None. |
| ErrorMessage |
Error message |
string |
None. |
| InfoMessage |
Information message |
string |
None. |
Response Formats
application/json, text/json
Sample:
{
"IsSuccess": true,
"ErrorCode": "sample string 2",
"ErrorMessage": "sample string 3",
"InfoMessage": "sample string 4"
}
application/xml, text/xml
Sample:
<ActionResultDTO xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/QQSolutions.NextGen.ModelLibrary.DataTransferObjects"> <ErrorCode>sample string 2</ErrorCode> <ErrorMessage>sample string 3</ErrorMessage> <InfoMessage>sample string 4</InfoMessage> <IsSuccess>true</IsSuccess> </ActionResultDTO>