POST /api/v1/ExternalBatch/{ExternalBatchRef}/ExternalDocument
This request adds a document to an external batch.
External documents are files which are to be imported by RTS.
Each external document must be uploaded to an existing external batch and have a unique, valid filename within that batch.
Optionally, an index can be assigned to each document allowing for control over the order in which RTS will import the documents.
This method is only applicable to batches at a status less than 20.
The document information and content are uploaded as a multi-part form data request.
Request Endpoint
/api/v1/ExternalBatch/{ExternalBatchRef}/ExternalDocument
Sample Request
POST /api/v1/ExternalBatch/BWB0000000001/ExternalDocument
Header contains: 'Content-Type': 'multipart/form-data; boundary=boundary_
value', 'Authorization': 'bearer ...'}
--boundary_value
Content-Disposition: form-data;
Content-Type:application/json
{
"externalDocumentFileName": "00000473.tif",
"index": 0
}
--boundary_value
Content-Disposition: form-data;
Content-Type: application/octet-stream
... Binary stream of file 00000473.tif...
--boundary_value--
Parameters
| Parameter | Description | Type | Required |
|---|---|---|---|
| documentInformation | External document details |
ExternalDocumentFile { externalDocumentFileName (string):
External document file name , index (integer): External document
index }
Example value { "externalDocumentFileName": "string", "index": 0 } |
Required |
| externalBatchRef | External batch reference | string | Required |
| fileContent | External document file content | file | Required |
Response
Returns a unique reference to the uploaded external document.
Sample Response
{
"reference": "string"
}
Response Codes
| Code | Description |
|---|---|
| 200 | Unique reference to the uploaded external document returned |
| 404 | External batch does not exist. |
| 409 | External document file name exists in this external batch. |
| 422 | External batch reference, document file name, and/or document index is invalid. |
| 423 | External batch is marked "Ready for Import" or RTS processing has already started. |