POST
/
unified
/
hris
/
employees
/
{id}
/
work_eligibility
curl --request POST \
  --url https://api.stackone.com/unified/hris/employees/{id}/work_eligibility \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --header 'x-account-id: <x-account-id>' \
  --data '{
  "document": {
    "id": "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
    "remote_id": "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
    "name": "My Document",
    "path": "/path/to/file",
    "category": "templates, forms, backups, etc.",
    "contents": [
      {
        "url": "https://example.com/file.pdf",
        "unified_url": "https://api.stackone.com/unified/hris/employees/12345/documents/67890/download",
        "file_format": {
          "value": "pdf",
          "source_value": "abc"
        }
      }
    ],
    "category_id": "6530",
    "created_at": "2021-01-01T01:01:01.000Z",
    "updated_at": "2021-01-02T01:01:01.000Z",
    "remote_url": "https://example.com/file.pdf",
    "file_format": {
      "value": "pdf",
      "source_value": "abc"
    }
  },
  "issued_by": {
    "value": "US",
    "source_value": "<string>"
  },
  "number": "1234567890",
  "sub_type": "H1B",
  "type": "visa",
  "valid_from": "2021-01-01T00:00.000Z",
  "valid_to": "2021-01-01T00:00.000Z",
  "passthrough": {
    "other_known_names": "John Doe"
  }
}'
{
  "statusCode": 201,
  "message": "Record created successfully.",
  "timestamp": "2021-01-01T01:01:01.000Z",
  "data": {
    "id": "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
    "remote_id": "8187e5da-dc77-475e-9949-af0f1fa4e4e3"
  }
}

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
document
object
issued_by
object

The country code of the issued by authority

number
string | null
Example:

"1234567890"

sub_type
string | null
Example:

"H1B"

type
object
Example:

"visa"

valid_from
string | null
Example:

"2021-01-01T00:00.000Z"

valid_to
string | null
Example:

"2021-01-01T00:00.000Z"

passthrough
object | null

Value to pass through to the provider

Example:
{ "other_known_names": "John Doe" }

Response

201
application/json
Record created successfully.
statusCode
number
required
Example:

201

message
string
required
Example:

"Record created successfully."

timestamp
string
required
Example:

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

data
object
required