/attributefile

Details:  Attribute Files (IAT Job Load)
This API imports bibliographic and item information after an item has been accessed. The same file layouts of an incoming accession stream can be used, the item information updated after accession as opposed to pre-loading before.

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

HTTP Verb:  POST

Content-Type:  multipart/form-data

Authorization Required:  

NameValueRequiredNotes
X-API-KeystringYessend in header

Parameters:  

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


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



API Return:

{"success":true,"error":"","fileid":"254","flayid":"9"}