HRIS
- Overview
- Use Cases
Common Guides
API Reference
- Companies
- Custom Field Definitions
- Employees
- GETList Employees
- POSTCreates an employee
- GETGet Employee
- PATCHUpdates an employee
- POSTInvite Employee
- Time Off
- Documents
- Work Eligibility
- Time Off Balances
- Employments
- Skills
- Time Off Policies
- Tasks
- GET
- Documents
- Employments
- Locations
- Time Off
- Time Entries
- Benefits
- Groups
- Jobs
- Time Off Policies
Documents
Upload Employee Document
POST
/
unified
/
hris
/
employees
/
{id}
/
documents
/
upload
curl --request POST \
--url https://api.stackone.com/unified/hris/employees/{id}/documents/upload \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--header 'x-account-id: <x-account-id>' \
--data '{
"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": 201,
"message": "Employee created successfully",
"timestamp": "2021-01-01T01:01:01.000Z",
"provider_errors": [
{
"status": 400,
"url": "https://api.someprovider.com/v1/endpoint",
"raw": {
"error": "Bad Request",
"message": "The supplied data is invalid"
},
"headers": {
"date": "Tue, 02 Apr 2024 13:52:01 GMT",
"content-type": "application/json; charset=utf-8",
"transfer-encoding": "chunked",
"connection": "close"
}
}
],
"unified_warnings": [
{
"message": "The provided field type is not supported in the current model."
}
]
}
Authorizations
Basic authentication header of the form Basic <encoded-value>
, where <encoded-value>
is the base64-encoded string username:password
.
Headers
The account identifier
Path Parameters
Body
application/json
Response
201
application/json
The document related to the employee with the given identifier was uploaded.
The response is of type object
.
Was this page helpful?
curl --request POST \
--url https://api.stackone.com/unified/hris/employees/{id}/documents/upload \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--header 'x-account-id: <x-account-id>' \
--data '{
"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": 201,
"message": "Employee created successfully",
"timestamp": "2021-01-01T01:01:01.000Z",
"provider_errors": [
{
"status": 400,
"url": "https://api.someprovider.com/v1/endpoint",
"raw": {
"error": "Bad Request",
"message": "The supplied data is invalid"
},
"headers": {
"date": "Tue, 02 Apr 2024 13:52:01 GMT",
"content-type": "application/json; charset=utf-8",
"transfer-encoding": "chunked",
"connection": "close"
}
}
],
"unified_warnings": [
{
"message": "The provided field type is not supported in the current model."
}
]
}
Assistant
Responses are generated using AI and may contain mistakes.