Hr

Human resources — the employee roster and its employment records (a Counterparty extension), employment terms, leave and employee master data. Carries employee PII; excludes compensation, which is `payroll`.

24 endpoints·Scopes: hr:read, hr:write
GET/api/employees#

List employees

scope · hr:read

Lists employees the caller can see. Results are filtered by the caller's accessible organizations; many routes paginate via page and limit.

Scope: hr:read
Endpoint: GET /api/employees

Example request

curl "https://app.guliel.com/api/employees?organizationId=value" \
  -H "Authorization: Bearer $GULIEL_API_KEY"

Query parameters

  • organizationIdreq
    string
  • searchreq
    string
  • includeInactive
    enum<2>
    true · false

Response (200/201)

  • employeesreq
    array<object>
    • idreq
      stringThe Counterparty id — an employee is a Counterparty edge.
    • individualIdreq
      string | null
    • namereq
      string
    • emailreq
      string | null
    • dateOfBirthreq
      string | null
    • employmentStartreq
      string | nullFirst day of the earliest employment term.
    • employmentEndreq
      string | nullThe LAST EMPLOYED DAY; null while any term is open (law 2b).
    • activereq
      booleanSome employment term covers today.
    • currentTermreq
      object | nullThe open term, else the most recent closed one.
    • employeeCodereq
      string | nullThis tenant's employee number — unique per org, never reassigned (law 30).
    • genderreq
      enum<3> | nullStatutory eligibility input; MANAGER write, member read.
    • probationEndsOnreq
      string | nullProbation end (exclusive).
    • inProbationreq
      booleanFold: employmentStart ≤ today < probationEndsOn.
    • maskedNationalIdreq
      string | nullThe DEFAULT projection of the national identifier (law 32) — the mask, on every surface including lists, exports, MCP and the admin panel.
    • nationalId
      string
    • personData
      object
    • photoAssetIdreq
      string | null
    • selfServiceActivereq
      boolean

Error responses

400Validation
401Unauthenticated
403Forbidden
500Internal
POST/api/employees#

Create an employee

scope · hr:writerole · CONTRIBUTOR+

Creates a new employee in the target organization. Returns the created record on success.

Scope: hr:write
Min role: CONTRIBUTOR or higher
Endpoint: POST /api/employees

Example request

curl -X POST "https://app.guliel.com/api/employees" \
  -H "Authorization: Bearer $GULIEL_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
  "organizationId": "abc123",
  "name": "Sample"
}'

Request body

  • organizationIdreq
    string
  • namereq
    string
  • email
    string | string
  • dateOfBirth
    string | null
  • employeeCode
    string
  • probationEndsOn
    string | null
  • gender
    enum<3> | null
  • nationalId
    string | null
  • personData
    object
  • title
    string | nullJob title of the first position.
  • basis
    enum<2>Pay basis; defaults to MONTHLY.
    MONTHLY · HOURLY
  • startDate
    string | null
  • lastDay
    string | null
  • rate
    number | nullMonthly wage, or hourly wage when `basis` is HOURLY.
  • currency
    string
  • employmentData
    object

Response (200/201)

  • idreq
    stringThe Counterparty id — an employee is a Counterparty edge.
  • individualIdreq
    string | null
  • namereq
    string
  • emailreq
    string | null
  • dateOfBirthreq
    string | null
  • employmentStartreq
    string | nullFirst day of the earliest employment term.
  • employmentEndreq
    string | nullThe LAST EMPLOYED DAY; null while any term is open (law 2b).
  • activereq
    booleanSome employment term covers today.
  • currentTermreq
    object | nullThe open term, else the most recent closed one.
  • employeeCodereq
    string | nullThis tenant's employee number — unique per org, never reassigned (law 30).
  • genderreq
    enum<3> | nullStatutory eligibility input; MANAGER write, member read.
  • probationEndsOnreq
    string | nullProbation end (exclusive).
  • inProbationreq
    booleanFold: employmentStart ≤ today < probationEndsOn.
  • maskedNationalIdreq
    string | nullThe DEFAULT projection of the national identifier (law 32) — the mask, on every surface including lists, exports, MCP and the admin panel.
  • nationalId
    string
  • personData
    object
  • photoAssetIdreq
    string | null
  • selfServiceActivereq
    boolean

Error responses

400Validation
401Unauthenticated
403Forbidden
429RateLimit
500Internal
DELETE/api/employees/{id}#

Delete an employee

scope · hr:write

Deletes the employee. Some endpoints hard-delete the row, others soft-revoke (set revokedAt). Check the response shape.

Scope: hr:write
Endpoint: DELETE /api/employees/{id}

Example request

curl -X DELETE "https://app.guliel.com/api/employees/abc123?id=value" \
  -H "Authorization: Bearer $GULIEL_API_KEY"

Query parameters

  • idreq
    string
  • lastDay
    string
  • purge
    enum<2>MANAGER only — permanently delete a deactivated employee with no ledger history.
    true · false

Response (200/201)

  • idreq
    stringThe Counterparty id — an employee is a Counterparty edge.
  • individualIdreq
    string | null
  • namereq
    string
  • emailreq
    string | null
  • dateOfBirthreq
    string | null
  • employmentStartreq
    string | nullFirst day of the earliest employment term.
  • employmentEndreq
    string | nullThe LAST EMPLOYED DAY; null while any term is open (law 2b).
  • activereq
    booleanSome employment term covers today.
  • currentTermreq
    object | nullThe open term, else the most recent closed one.
  • employeeCodereq
    string | nullThis tenant's employee number — unique per org, never reassigned (law 30).
  • genderreq
    enum<3> | nullStatutory eligibility input; MANAGER write, member read.
  • probationEndsOnreq
    string | nullProbation end (exclusive).
  • inProbationreq
    booleanFold: employmentStart ≤ today < probationEndsOn.
  • maskedNationalIdreq
    string | nullThe DEFAULT projection of the national identifier (law 32) — the mask, on every surface including lists, exports, MCP and the admin panel.
  • nationalId
    string
  • personData
    object
  • photoAssetIdreq
    string | null
  • selfServiceActivereq
    boolean

Error responses

400Validation
401Unauthenticated
403Forbidden
429RateLimit
500Internal
GET/api/employees/{id}#

Get an employee

scope · hr:read

Fetches a single employee by id. Returns 404 if the employee isn't in the caller's accessible organizations.

Scope: hr:read
Endpoint: GET /api/employees/{id}

Example request

curl "https://app.guliel.com/api/employees/abc123?id=value" \
  -H "Authorization: Bearer $GULIEL_API_KEY"

Query parameters

  • idreq
    string
  • reveal
    enum<2>MANAGER only — return the unmasked national identifier (law 32).
    true · false

Response (200/201)

  • idreq
    stringThe Counterparty id — an employee is a Counterparty edge.
  • individualIdreq
    string | null
  • namereq
    string
  • emailreq
    string | null
  • dateOfBirthreq
    string | null
  • employmentStartreq
    string | nullFirst day of the earliest employment term.
  • employmentEndreq
    string | nullThe LAST EMPLOYED DAY; null while any term is open (law 2b).
  • activereq
    booleanSome employment term covers today.
  • currentTermreq
    object | nullThe open term, else the most recent closed one.
  • employeeCodereq
    string | nullThis tenant's employee number — unique per org, never reassigned (law 30).
  • genderreq
    enum<3> | nullStatutory eligibility input; MANAGER write, member read.
  • probationEndsOnreq
    string | nullProbation end (exclusive).
  • inProbationreq
    booleanFold: employmentStart ≤ today < probationEndsOn.
  • maskedNationalIdreq
    string | nullThe DEFAULT projection of the national identifier (law 32) — the mask, on every surface including lists, exports, MCP and the admin panel.
  • nationalId
    string
  • personData
    object
  • photoAssetIdreq
    string | null
  • selfServiceActivereq
    boolean

Error responses

400Validation
401Unauthenticated
403Forbidden
500Internal
PATCH/api/employees/{id}#

Update an employee

scope · hr:write

Updates an existing employee. Only the fields present in the request body are changed; omitted fields stay as-is.

Scope: hr:write
Endpoint: PATCH /api/employees/{id}

Example request

curl -X PATCH "https://app.guliel.com/api/employees/abc123" \
  -H "Authorization: Bearer $GULIEL_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
  "id": "abc123"
}'

Request body

  • idreq
    string
  • name
    string
  • email
    string | string
  • dateOfBirth
    string | null
  • employeeCode
    string | null
  • probationEndsOn
    string | null
  • gender
    enum<3> | null
  • nationalId
    string | null
  • personData
    object
  • startDate
    string
  • lastDay
    string
  • rate
    number | null
  • currency
    string
  • employmentData
    object
  • rehireFrom
    string

Response (200/201)

  • idreq
    stringThe Counterparty id — an employee is a Counterparty edge.
  • individualIdreq
    string | null
  • namereq
    string
  • emailreq
    string | null
  • dateOfBirthreq
    string | null
  • employmentStartreq
    string | nullFirst day of the earliest employment term.
  • employmentEndreq
    string | nullThe LAST EMPLOYED DAY; null while any term is open (law 2b).
  • activereq
    booleanSome employment term covers today.
  • currentTermreq
    object | nullThe open term, else the most recent closed one.
  • employeeCodereq
    string | nullThis tenant's employee number — unique per org, never reassigned (law 30).
  • genderreq
    enum<3> | nullStatutory eligibility input; MANAGER write, member read.
  • probationEndsOnreq
    string | nullProbation end (exclusive).
  • inProbationreq
    booleanFold: employmentStart ≤ today < probationEndsOn.
  • maskedNationalIdreq
    string | nullThe DEFAULT projection of the national identifier (law 32) — the mask, on every surface including lists, exports, MCP and the admin panel.
  • nationalId
    string
  • personData
    object
  • photoAssetIdreq
    string | null
  • selfServiceActivereq
    boolean

Error responses

400Validation
401Unauthenticated
403Forbidden
429RateLimit
500Internal
DELETE/api/employees/{id}/photo#

Detach photo from an employee

scope · hr:write

Removes the association without deleting the underlying record.

Scope: hr:write
Endpoint: DELETE /api/employees/{id}/photo

Example request

curl -X DELETE "https://app.guliel.com/api/employees/abc123/photo?id=value" \
  -H "Authorization: Bearer $GULIEL_API_KEY"

Query parameters

  • idreq
    string

Response (200/201)

  • successreq
    boolean

Error responses

400Validation
401Unauthenticated
403Forbidden
429RateLimit
500Internal
GET/api/employees/{id}/photo#

List photo for an employee

scope · hr:read

Returns every photo row associated with the given employee.

Scope: hr:read
Endpoint: GET /api/employees/{id}/photo

Example request

curl "https://app.guliel.com/api/employees/abc123/photo?id=value" \
  -H "Authorization: Bearer $GULIEL_API_KEY"

Query parameters

  • idreq
    string
  • asset
    stringThe asset id; the URL is immutable per asset.

Response (200/201)

JSON object. The exact response shape is being progressively documented — call the endpoint with a real access token to see the live structure, or check the type definitions exposed by the official client libraries.

Error responses

400Validation
401Unauthenticated
403Forbidden
500Internal
POST/api/employees/{id}/photo#

Attach photo to an employee

scope · hr:write

Creates a new photo attached to the given employee.

Scope: hr:write
Endpoint: POST /api/employees/{id}/photo

Example request

curl -X POST "https://app.guliel.com/api/employees/abc123/photo" \
  -H "Authorization: Bearer $GULIEL_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
  "id": "abc123"
}'

Request body

  • idreq
    string

Response (200/201)

  • photoAssetIdreq
    string
  • urlreq
    stringSame-origin URL where the freshly-uploaded photo can be fetched.

Error responses

400Validation
401Unauthenticated
403Forbidden
429RateLimit
500Internal
DELETE/api/hr/employee-events#

Delete an employee event

scope · hr:writerole · MANAGER+

Deletes the employee event. Some endpoints hard-delete the row, others soft-revoke (set revokedAt). Check the response shape.

Scope: hr:write
Min role: MANAGER or higher
Endpoint: DELETE /api/hr/employee-events

Example request

curl -X DELETE "https://app.guliel.com/api/hr/employee-events?organizationId=value" \
  -H "Authorization: Bearer $GULIEL_API_KEY"

Query parameters

  • organizationIdreq
    string
  • idreq
    string

Response (200/201)

  • successreq
    boolean

Error responses

400Validation
401Unauthenticated
403Forbidden
429RateLimit
500Internal
GET/api/hr/employee-events#

List employee events

scope · hr:readrole · MANAGER+

Lists employee events the caller can see. Results are filtered by the caller's accessible organizations; many routes paginate via page and limit.

Scope: hr:read
Min role: MANAGER or higher
Endpoint: GET /api/hr/employee-events

Example request

curl "https://app.guliel.com/api/hr/employee-events?organizationId=value" \
  -H "Authorization: Bearer $GULIEL_API_KEY"

Query parameters

  • organizationIdreq
    string
  • counterpartyIdreq
    string
  • cursor
    stringThe id of the last row of the previous page.
  • limit
    integer

Response (200/201)

  • notesreq
    array<object>
    • idreq
      string
    • createdAtreq
      string
    • bodyreq
      string
    • actorUserIdreq
      string | null
    • actorNamereq
      string | null
  • nextCursorreq
    string | null

Error responses

400Validation
401Unauthenticated
403Forbidden
500Internal
POST/api/hr/employee-events#

Create an employee event

scope · hr:writerole · MANAGER+

Creates a new employee event in the target organization. Returns the created record on success.

Scope: hr:write
Min role: MANAGER or higher
Endpoint: POST /api/hr/employee-events

Example request

curl -X POST "https://app.guliel.com/api/hr/employee-events" \
  -H "Authorization: Bearer $GULIEL_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
  "organizationId": "abc123",
  "counterpartyId": "abc123",
  "body": "string"
}'

Request body

  • organizationIdreq
    string
  • counterpartyIdreq
    string
  • bodyreq
    string

Response (200/201)

  • idreq
    string

Error responses

400Validation
401Unauthenticated
403Forbidden
429RateLimit
500Internal
GET/api/hr/leaves#

List leave requests

scope · hr:read

Lists leave requests the caller can see. Results are filtered by the caller's accessible organizations; many routes paginate via page and limit.

Scope: hr:read
Endpoint: GET /api/hr/leaves

Example request

curl "https://app.guliel.com/api/hr/leaves?organizationId=value" \
  -H "Authorization: Bearer $GULIEL_API_KEY"

Query parameters

  • organizationIdreq
    string
  • counterpartyId
    string
  • status
    enum<4>
    REQUESTED · APPROVED · REJECTED · CANCELLED
  • from
    string
  • to
    string

Response (200/201)

  • leavesreq
    array<object>
    • idreq
      string
    • counterpartyIdreq
      string
    • employeeNamereq
      string
    • kindreq
      string
    • startDatereq
      string
    • lastDayreq
      string
    • daysreq
      number
    • hoursreq
      number | null
    • statusreq
      enum<4>
      REQUESTED · APPROVED · REJECTED · CANCELLED
    • notereq
      string | null
    • decidedAtreq
      string | null
    • decisionNotereq
      string | null
    • data
      object

Error responses

400Validation
401Unauthenticated
403Forbidden
500Internal
POST/api/hr/leaves#

Create a leave request

scope · hr:writerole · CONTRIBUTOR+

Creates a new leave request in the target organization. Returns the created record on success.

Scope: hr:write
Min role: CONTRIBUTOR or higher
Endpoint: POST /api/hr/leaves

Example request

curl -X POST "https://app.guliel.com/api/hr/leaves" \
  -H "Authorization: Bearer $GULIEL_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
  "organizationId": "abc123",
  "counterpartyId": "abc123",
  "kind": "string",
  "startDate": "string",
  "lastDay": "string",
  "days": 0
}'

Request body

  • organizationIdreq
    string
  • counterpartyIdreq
    string
  • kindreq
    string
  • startDatereq
    string
  • lastDayreq
    string
  • daysreq
    number
  • hours
    number
  • note
    string | null
  • data
    object

Response (200/201)

  • idreq
    string

Error responses

400Validation
401Unauthenticated
403Forbidden
429RateLimit
500Internal
GET/api/hr/leaves/{id}#

Get a leave request

scope · hr:read

Fetches a single leave request by id. Returns 404 if the leave request isn't in the caller's accessible organizations.

Scope: hr:read
Endpoint: GET /api/hr/leaves/{id}

Example request

curl "https://app.guliel.com/api/hr/leaves/abc123?organizationId=value" \
  -H "Authorization: Bearer $GULIEL_API_KEY"

Query parameters

  • organizationIdreq
    string
  • idreq
    string

Response (200/201)

  • idreq
    string
  • counterpartyIdreq
    string
  • employeeNamereq
    string
  • kindreq
    string
  • startDatereq
    string
  • lastDayreq
    string
  • daysreq
    number
  • hoursreq
    number | null
  • statusreq
    enum<4>
    REQUESTED · APPROVED · REJECTED · CANCELLED
  • notereq
    string | null
  • decidedAtreq
    string | null
  • decisionNotereq
    string | null
  • data
    object

Error responses

400Validation
401Unauthenticated
403Forbidden
500Internal
PATCH/api/hr/leaves/{id}#

Update a leave request

scope · hr:writerole · CONTRIBUTOR+

Updates an existing leave request. Only the fields present in the request body are changed; omitted fields stay as-is.

Scope: hr:write
Min role: CONTRIBUTOR or higher
Endpoint: PATCH /api/hr/leaves/{id}

Example request

curl -X PATCH "https://app.guliel.com/api/hr/leaves/abc123" \
  -H "Authorization: Bearer $GULIEL_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
  "organizationId": "abc123",
  "id": "abc123"
}'

Request body

  • organizationIdreq
    string
  • idreq
    string
  • startDate
    string
  • lastDay
    string
  • days
    number
  • hours
    number | null
  • note
    string | null
  • data
    object

Response (200/201)

  • idreq
    string

Error responses

400Validation
401Unauthenticated
403Forbidden
429RateLimit
500Internal
POST/api/hr/leaves/{id}/cancel#

Attach cancel to a leave request

scope · hr:writerole · CONTRIBUTOR+

Creates a new cancel attached to the given leave request.

Scope: hr:write
Min role: CONTRIBUTOR or higher
Endpoint: POST /api/hr/leaves/{id}/cancel

Example request

curl -X POST "https://app.guliel.com/api/hr/leaves/abc123/cancel" \
  -H "Authorization: Bearer $GULIEL_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
  "organizationId": "abc123",
  "id": "abc123"
}'

Request body

  • organizationIdreq
    string
  • idreq
    string
  • decisionNote
    string | null

Response (200/201)

  • idreq
    string
  • statusreq
    string

Error responses

400Validation
401Unauthenticated
403Forbidden
429RateLimit
500Internal
POST/api/hr/leaves/{id}/decide#

Attach decide to a leave request

scope · hr:writerole · MANAGER+

Creates a new decide attached to the given leave request.

Scope: hr:write
Min role: MANAGER or higher
Endpoint: POST /api/hr/leaves/{id}/decide

Example request

curl -X POST "https://app.guliel.com/api/hr/leaves/abc123/decide" \
  -H "Authorization: Bearer $GULIEL_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
  "organizationId": "abc123",
  "id": "abc123",
  "status": "APPROVED"
}'

Request body

  • organizationIdreq
    string
  • idreq
    string
  • statusreq
    enum<2>
    APPROVED · REJECTED
  • decisionNote
    string | null

Response (200/201)

  • idreq
    string
  • statusreq
    enum<2>
    APPROVED · REJECTED

Error responses

400Validation
401Unauthenticated
403Forbidden
429RateLimit
500Internal
GET/api/hr/leaves/balances#

Get balances (leave requests)

scope · hr:read

Returns the balances data for the leave requests feature.

Scope: hr:read
Endpoint: GET /api/hr/leaves/balances

Example request

curl "https://app.guliel.com/api/hr/leaves/balances?organizationId=value" \
  -H "Authorization: Bearer $GULIEL_API_KEY"

Query parameters

  • organizationIdreq
    string
  • counterpartyIdreq
    string
  • at
    string

Response (200/201)

  • counterpartyIdreq
    string
  • basisreq
    enum<2>
    STATUTORY · COMPANY_POLICY
  • balancesreq
    array<object>
    • kindreq
      string
    • labelreq
      string
    • windowStartreq
      string
    • windowEndreq
      string
    • entitledreq
      number
    • carriedInreq
      number
    • usedreq
      number
    • balancereq
      number
    • cappedreq
      boolean

Error responses

400Validation
401Unauthenticated
403Forbidden
500Internal
GET/api/hr/me#

The signed-in employee's own attendance summary.

scope · hr:readrole · VIEWER+

Lists own employee records the caller can see. Results are filtered by the caller's accessible organizations; many routes paginate via page and limit.

Scope: hr:read
Min role: VIEWER or higher
Endpoint: GET /api/hr/me

Example request

curl "https://app.guliel.com/api/hr/me?organizationId=value" \
  -H "Authorization: Bearer $GULIEL_API_KEY"

Query parameters

  • organizationIdreq
    string
  • from
    string
  • to
    string

Response (200/201)

  • counterpartyIdreq
    string
  • namereq
    string | null
  • employeeCodereq
    string | null
  • openSessionreq
    object | null
  • todayHoursreq
    number
  • periodHoursreq
    number
  • timezonereq
    string

Error responses

400Validation
401Unauthenticated
403Forbidden
500Internal
POST/api/hr/self-service#

Give an employee a self-service login, or revoke it.

scope · hr:writerole · MANAGER+SESSION-only

Creates a new self service in the target organization. Returns the created record on success.

Scope: hr:write
Min role: MANAGER or higher
Auth sources: SESSION only
Endpoint: POST /api/hr/self-service

Example request

curl -X POST "https://app.guliel.com/api/hr/self-service" \
  -H "Authorization: Bearer $GULIEL_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
  "organizationId": "abc123",
  "counterpartyId": "abc123",
  "enabled": false
}'

Request body

  • organizationIdreq
    string
  • counterpartyIdreq
    string
  • enabledreq
    boolean

Response (200/201)

  • enabledreq
    boolean
  • userIdreq
    string | null
  • emailreq
    string | null
  • invitedreq
    boolean

Error responses

400Validation
401Unauthenticated
403Forbidden
429RateLimit
500Internal
GET/api/hr/terms#

List employment terms

scope · hr:read

Lists employment terms the caller can see. Results are filtered by the caller's accessible organizations; many routes paginate via page and limit.

Scope: hr:read
Endpoint: GET /api/hr/terms

Example request

curl "https://app.guliel.com/api/hr/terms?organizationId=value" \
  -H "Authorization: Bearer $GULIEL_API_KEY"

Query parameters

  • organizationIdreq
    string
  • counterpartyIdreq
    string

Response (200/201)

  • termsreq
    array<object>
    • idreq
      string
    • titlereq
      string | null
    • startDatereq
      string
    • lastDayreq
      string | nullThe INCLUSIVE last employed day; null while the term is open (law 2b).
    • basisreq
      enum<2>
      MONTHLY · HOURLY
    • ratereq
      number | nullMonthly wage for MONTHLY, hourly wage for HOURLY.
    • currencyreq
      string
    • employmentDatareq
      object | null
    • leaveGrantsreq
      object | null
  • positionsreq
    array<object>
    • titlereq
      string | null
    • startDatereq
      string
    • lastDayreq
      string | nullLast day held; null while the position is current.
    • currentreq
      boolean
    • termIdsreq
      array<string>The terms coalesced into this position, in order — join against `terms`.
  • careerEventsreq
    array<object>
    • typereq
      enum<6>
      HIRED · REHIRED · TITLE_CHANGE · TRACK_CHANGE · RATE_CHANGE · TERMINATED
    • datereq
      stringThe day the change took effect; for TERMINATED, the last employed day.
    • termIdreq
      string
    • factsreq
      object
      • titlereq
        string | null
      • basisreq
        enum<2>
        MONTHLY · HOURLY
      • ratereq
        number | null
      • currencyreq
        string
    • previousreq
      object | nullThe preceding term's facts; null at HIRED / REHIRED.

Error responses

400Validation
401Unauthenticated
403Forbidden
500Internal
POST/api/hr/terms#

Create an employment term

scope · hr:writerole · MANAGER+

Creates a new employment term in the target organization. Returns the created record on success.

Scope: hr:write
Min role: MANAGER or higher
Endpoint: POST /api/hr/terms

Example request

curl -X POST "https://app.guliel.com/api/hr/terms" \
  -H "Authorization: Bearer $GULIEL_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
  "organizationId": "abc123",
  "counterpartyId": "abc123",
  "startDate": "string"
}'

Request body

  • organizationIdreq
    string
  • counterpartyIdreq
    string
  • startDatereq
    string
  • lastDay
    string | null
  • title
    string | null
  • basis
    enum<2>
    MONTHLY · HOURLY
  • rate
    number | null
  • currency
    string
  • employmentData
    object
  • leaveGrants
    object | null

Response (200/201)

  • termsreq
    array<object>
    • idreq
      string
    • titlereq
      string | null
    • startDatereq
      string
    • lastDayreq
      string | nullThe INCLUSIVE last employed day; null while the term is open (law 2b).
    • basisreq
      enum<2>
      MONTHLY · HOURLY
    • ratereq
      number | nullMonthly wage for MONTHLY, hourly wage for HOURLY.
    • currencyreq
      string
    • employmentDatareq
      object | null
    • leaveGrantsreq
      object | null
  • positionsreq
    array<object>
    • titlereq
      string | null
    • startDatereq
      string
    • lastDayreq
      string | nullLast day held; null while the position is current.
    • currentreq
      boolean
    • termIdsreq
      array<string>The terms coalesced into this position, in order — join against `terms`.
  • careerEventsreq
    array<object>
    • typereq
      enum<6>
      HIRED · REHIRED · TITLE_CHANGE · TRACK_CHANGE · RATE_CHANGE · TERMINATED
    • datereq
      stringThe day the change took effect; for TERMINATED, the last employed day.
    • termIdreq
      string
    • factsreq
      object
      • titlereq
        string | null
      • basisreq
        enum<2>
        MONTHLY · HOURLY
      • ratereq
        number | null
      • currencyreq
        string
    • previousreq
      object | nullThe preceding term's facts; null at HIRED / REHIRED.

Error responses

400Validation
401Unauthenticated
403Forbidden
429RateLimit
500Internal
DELETE/api/hr/terms/{id}#

Delete an employment term

scope · hr:writerole · MANAGER+

Deletes the employment term. Some endpoints hard-delete the row, others soft-revoke (set revokedAt). Check the response shape.

Scope: hr:write
Min role: MANAGER or higher
Endpoint: DELETE /api/hr/terms/{id}

Example request

curl -X DELETE "https://app.guliel.com/api/hr/terms/abc123?id=value" \
  -H "Authorization: Bearer $GULIEL_API_KEY"

Query parameters

  • idreq
    string
  • organizationIdreq
    string

Response (200/201)

  • termsreq
    array<object>
    • idreq
      string
    • titlereq
      string | null
    • startDatereq
      string
    • lastDayreq
      string | nullThe INCLUSIVE last employed day; null while the term is open (law 2b).
    • basisreq
      enum<2>
      MONTHLY · HOURLY
    • ratereq
      number | nullMonthly wage for MONTHLY, hourly wage for HOURLY.
    • currencyreq
      string
    • employmentDatareq
      object | null
    • leaveGrantsreq
      object | null
  • positionsreq
    array<object>
    • titlereq
      string | null
    • startDatereq
      string
    • lastDayreq
      string | nullLast day held; null while the position is current.
    • currentreq
      boolean
    • termIdsreq
      array<string>The terms coalesced into this position, in order — join against `terms`.
  • careerEventsreq
    array<object>
    • typereq
      enum<6>
      HIRED · REHIRED · TITLE_CHANGE · TRACK_CHANGE · RATE_CHANGE · TERMINATED
    • datereq
      stringThe day the change took effect; for TERMINATED, the last employed day.
    • termIdreq
      string
    • factsreq
      object
      • titlereq
        string | null
      • basisreq
        enum<2>
        MONTHLY · HOURLY
      • ratereq
        number | null
      • currencyreq
        string
    • previousreq
      object | nullThe preceding term's facts; null at HIRED / REHIRED.

Error responses

400Validation
401Unauthenticated
403Forbidden
429RateLimit
500Internal
PATCH/api/hr/terms/{id}#

Update an employment term

scope · hr:writerole · MANAGER+

Updates an existing employment term. Only the fields present in the request body are changed; omitted fields stay as-is.

Scope: hr:write
Min role: MANAGER or higher
Endpoint: PATCH /api/hr/terms/{id}

Example request

curl -X PATCH "https://app.guliel.com/api/hr/terms/abc123" \
  -H "Authorization: Bearer $GULIEL_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
  "id": "abc123",
  "organizationId": "abc123"
}'

Request body

  • idreq
    string
  • organizationIdreq
    string
  • startDate
    string
  • lastDay
    string | null
  • title
    string | null
  • basis
    enum<2>
    MONTHLY · HOURLY
  • rate
    number | null
  • currency
    string
  • employmentData
    object
  • leaveGrants
    object | null

Response (200/201)

  • termsreq
    array<object>
    • idreq
      string
    • titlereq
      string | null
    • startDatereq
      string
    • lastDayreq
      string | nullThe INCLUSIVE last employed day; null while the term is open (law 2b).
    • basisreq
      enum<2>
      MONTHLY · HOURLY
    • ratereq
      number | nullMonthly wage for MONTHLY, hourly wage for HOURLY.
    • currencyreq
      string
    • employmentDatareq
      object | null
    • leaveGrantsreq
      object | null
  • positionsreq
    array<object>
    • titlereq
      string | null
    • startDatereq
      string
    • lastDayreq
      string | nullLast day held; null while the position is current.
    • currentreq
      boolean
    • termIdsreq
      array<string>The terms coalesced into this position, in order — join against `terms`.
  • careerEventsreq
    array<object>
    • typereq
      enum<6>
      HIRED · REHIRED · TITLE_CHANGE · TRACK_CHANGE · RATE_CHANGE · TERMINATED
    • datereq
      stringThe day the change took effect; for TERMINATED, the last employed day.
    • termIdreq
      string
    • factsreq
      object
      • titlereq
        string | null
      • basisreq
        enum<2>
        MONTHLY · HOURLY
      • ratereq
        number | null
      • currencyreq
        string
    • previousreq
      object | nullThe preceding term's facts; null at HIRED / REHIRED.

Error responses

400Validation
401Unauthenticated
403Forbidden
429RateLimit
500Internal