POST
/
unified
/
hris
/
employees
/
{id}
/
documents
/
upload
/
batch
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": "abc"
      },
      "content": "VGhpcyBpc24ndCByZWFsbHkgYSBzYW1wbGUgZmlsZSwgYnV0IG5vIG9uZSB3aWxsIGV2ZXIga25vdyE",
      "category_id": "6530",
      "path": "/path/to/file",
      "category": {
        "name": "reports",
        "id": "550e8400-e29b-41d4-a716-446655440000"
      },
      "confidential": {
        "value": "true",
        "source_value": "public"
      }
    }
  ]
}'
{
  "statusCode": 202,
  "message": "Batch operation accepted",
  "timestamp": "2021-01-01T01:01:01.000Z",
  "errors": [
    [
      "Missing field: name"
    ],
    [],
    []
  ]
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Headers

x-account-id
string
required

The account identifier

Path Parameters

id
string
required

Body

application/json
items
object[]
required

The batch of items to create

Response

202
application/json
Batch operation accepted
statusCode
number | null
Example:

202

message
string | null
Example:

"Batch operation accepted"

timestamp
string | null
Example:

"2021-01-01T01:01:01.000Z"

errors
array | null
Example:
[["Missing field: name"], [], []]