/incomingfile

Details:  Incoming Files (IAS Job Load)

URL:  https://yourlibrary.caiasoft.com/api/incomingfile/v1

HTTP Verb:  POST

Content-Type:  multipart/form-data

Authorization Required:  

NameValueRequiredNotes
X-API-KeystringYessend in header

Parameters:  

NameValueRequiredNotes
incomingfilefileYesfile prefix must match ‘begins’ value in file layout setup for correct layout match (multiple layouts accepted)

Return Response:  

NameValueNotes
successtrue/false
errorstringStandard 404/403/File upload errors only.
Any errors from the file contents will be displayed on the ERQ job in the Circulation Module.
fileidintFile Upload Identifier
flayidintFile Layout Utilized in Load

Examples:  
Sample CURL code at linux prompt/script:

curl -H "X-API-Key:" -F "incomingfile=@"
https://yourlibrary.caiasoft.com/api/incomingfile/v1


Sample CURL code in php:
$postfields = [ 'incomingfile' => '@' . realpath('')
        ];
$headerfields = [
 'Content-Type: multipart/form-data;',
 'host: yourlibrary.caiasoft.com',
 'X-API-Key: '
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_HTTPHEADER, $headerfields);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_URL, 'https://yourlibrary.caiasoft.com/api/incomingfile/v1');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
$response = curl_exec($ch);



API Return:

{"success":true,"error":"","fileid":"105","flayid":"7"}