HRIS
cURL
curl --request POST \ --url https://api.stackone.com/unified/hris/employees/{id}/documents/upload/batch \ --header 'Authorization: Basic <encoded-value>' \ --header 'Content-Type: application/json' \ --header 'x-account-id: <x-account-id>' \ --data '{ "items": [ { "name": "weather-forecast", "file_format": { "value": "pdf", "source_value": "application/pdf" }, "content": "VGhpcyBpc24ndCByZWFsbHkgYSBzYW1wbGUgZmlsZSwgYnV0IG5vIG9uZSB3aWxsIGV2ZXIga25vdyE", "category_id": "6530", "path": "/path/to/file", "confidential": { "value": "true", "source_value": "public" }, "category": { "name": "reports", "id": "550e8400-e29b-41d4-a716-446655440000" } } ] }'
{ "statusCode": 202, "message": "Batch operation accepted", "timestamp": "2021-01-01T01:01:01.000Z", "errors": [ [ "Missing field: name" ], [], [] ] }
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Basic <encoded-value>
<encoded-value>
username:password
The account identifier
Batch operation accepted
The response is of type object.
object
Was this page helpful?