Skip to main content
POST
Get Employee Details
  • Send employee_id to get a single employee.
  • Leave out employee_id to get a paginated list of employees.
  • If you leave out both page and size, pagination is turned off and all employees are returned.

Request payload

The request body is an encrypted payload, sent as encrypted_payload. Before encryption, the payload is this JSON:

Encryption

To build encrypted_payload:
  1. Build the payload JSON above.
  2. Sign it as a JWT (JWS) using RS256 with your private key (alg: RS256, typ: JWT).
  3. Encrypt the signed JWT as a JWE using Tartan’s public key (alg: RSA-OAEP-256, enc: A256GCM, cty: JWT).
  4. Send the compact JWE string: <protected-header>.<encrypted-key>.<iv>.<ciphertext>.<auth-tag>.
Tartan decrypts the request with its private key and verifies the signature with your registered public key. If your organization has a public key registered with Tartan, the data in the response is encrypted the same way and must be decrypted with your private key. Otherwise data is returned as plain JSON.

Status codes

Some outcomes return HTTP 200 with the real result in the body’s status_code: 404 when the employee is not found, and 428 when your public key is not configured. Always check status and status_code in the body.
A request ID is returned in the X-Request-ID response header. This endpoint is rate limited to 4 requests per second per user. For field enums, refer the employee directory page.

Authorizations

Authorization
string
header
required

Create a Basic Auth token by base64-encoding username:password

Body

application/json
encrypted_payload
string
required

Compact JWE string containing the signed, encrypted payload.

Example:

"<JWE compact serialization string>"

Response

Request processed. Check status_code in the body: 200 means success, 404 means the employee was not found, 428 means your public key is not configured.

status
enum<string>
Available options:
success,
failed
Example:

"success"

status_code
integer
Example:

200

message
string
Example:

"Data received and encrypted successfully"

data

Encrypted JWE string if your organization has a public key registered, otherwise plain JSON. Once decrypted, it is a single employee object when employee_id was sent, or { "data": [employees], "pageInfo": {...} } for a list. null when status is failed.

Example:

"eyJfdfasdfasdfasdfaIjoiQUl6YVN5QmJHc0t3bVZ6SUU5a2VnPT0iLCJkYXRhIjoiU2FtcGxlIEVuY3J5cHRlZCBTdHJpbmcifQ=="