/requestfile

Details:  Request Files (ERQ Job Load)

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

HTTP Verb:  POST

Content-Type:  multipart/form-data

Authorization Required:  

NameValueRequiredNotes
X-API-KeystringYessend in header

Parameters:  

NameValueRequiredNotes
requestfilefileYesfile 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 "requestfile=@"
https://yourlibrary.caiasoft.com/api/requestfile/v1


Sample CURL code in php:
$postfields = [ 'requestfile' => '@' . 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/requestfile/v1');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
$response = curl_exec($ch);



API Return:

{"success":true,"error":"","fileid":"395","flayid":"21"}