Salary and absenceList absence codes available to the caller

List absence codes available to the caller

Lists the absence codes the calling user can register absence on, optionally by active status, favourites or a search text.

Returns the absence codes attached (through their salary account) to the caller's salary group, where that salary account is active. status filters on the code's own active flag (-1 all, 0 inactive, 1 active; default all). The result is per caller: two users can get different lists, and the IsFavourite flag is the caller's. Limited-licence users, the Time product and PSA Starter plans get an empty list. Each entity carries hypermedia actions pointing at the create endpoint matching the code's format.

Use it to:

  • Populate an absence-code picker in an employee self-service app.
  • Map an HR system's leave types to TimeLog AbsenceCodeIDs (call as a user in the relevant salary group).

Not for:

  • A account-wide catalogue of every absence code — the list is filtered by the caller's salary group.

Behaviour:

  • Idempotent.
  • Safe to retry.
  • Changes are visible to the next read immediately.

Next: POST /v1/absence-code/registration-by-hours, POST /v1/absence-code/registration-by-half-day, POST /v1/absence-code/registration-by-full-day, POST /v1/absence-code/time-tracker

See also: GET /v1/absence-code/get-recently-registered

Not yet documented: request → path params → status (names); request → query params → searchText (empty).

curl -X GET "https://app3.timelog.com/your-account/api/v1/absence-code/-1?includeFavouriteOnly=false&searchText=example_string&$page=1&$pagesize=10" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
{
  "Properties": {
    "TotalRecord": "10",
    "TotalPage": "1",
    "PageNumber": "1"
  },
  "Entities": [
    {
      "Properties": {
        "AbsenceCodeID": 2,
        "AbsenceCode": "30",
        "Name": "Illnes",
        "Description": "Registration of ilnes",
        "IsActive": true,
        "FlexPositiveFactor": 1,
        "SalaryAccountFactor": 1,
        "SalaryAccountFactorEffect": 1,
        "SalaryAccountID": 2,
        "AbsenceCodeTypeID": 1,
        "DeductCapacity": false,
        "TimeTrackingFormat": 0,
        "RequireApproval": false,
        "IsPublicVisible": false,
        "IsFavourite": true,
        "ID": "84982c1c-634a-425c-abf3-82c465a610a2"
      },
      "Actions": [
        {
          "Name": "add-registration",
          "Title": "Add Registration",
          "Method": "Post",
          "Href": "https://app{server-number}.timelog.com/{account}/api/v1/absence-code/registration-by-hours",
          "Type": "application/json",
          "Fields": [
            {
              "Name": "Hours",
              "Type": "Number"
            },
            {
              "Name": "Minutes",
              "Type": "Number"
            },
            {
              "Name": "AbsenceID",
              "Type": "Number"
            },
            {
              "Name": "Date",
              "Type": "DateTime"
            },
            {
              "Name": "Comment",
              "Type": "Text"
            }
          ]
        },
        {
          "Name": "time-tracker",
          "Title": "Create Time Tracker",
          "Method": "Post",
          "Href": "https://app{server-number}.timelog.com/{account}/api/v1/absence-code/time-tracker",
          "Type": "application/json",
          "Fields": [
            {
              "Name": "AbsenceCodeID",
              "Type": "Number",
              "Value": "2"
            },
            {
              "Name": "Comment",
              "Type": "Text"
            },
            {
              "Name": "Minute",
              "Type": "Number"
            },
            {
              "Name": "TimeRegistrationID",
              "Type": "Number"
            }
          ]
        }
      ]
    },
    "… 9 more"
  ],
  "Links": [
    {
      "Href": "https://app{server-number}.timelog.com/{account}/api/v1/absence-code/1",
      "Rel": "self"
    }
  ]
}
GET
/v1/absence-code/{status}
GET
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token
Bearer Tokenstring
Required

OAuth 2.0 bearer token, sent as Authorization: Bearer <token>. JWT and reference tokens are both accepted. The token must carry the required scope (default tlp). The token's sub claim is the acting user. A token WITHOUT sub (client-credentials) acts as the system service user. If the sub user cannot log in (inactive, locked, deleted), the request is rejected with 401 — it is no longer let through without a user. > Not yet documented: how to obtain a token. > Not yet documented: token lifetime.

OAuth 2.0 bearer token, sent as Authorization: Bearer <token>. JWT and reference tokens are both accepted. The token must carry the required scope (default tlp). The token's sub claim is the acting user. A token WITHOUT sub (client-credentials) acts as the system service user. If the sub user cannot log in (inactive, locked, deleted), the request is rejected with 401 — it is no longer let through without a user. > Not yet documented: how to obtain a token. > Not yet documented: token lifetime.
path
statusinteger
Required

Any other integer is treated as Active (non-zero → true). Filters on AbsenceCodeRead.IsActive (eq). Allowed values: | Value | Name | Meaning | |---|---|---| | -1 | All | Active and inactive codes (no filter). | | 0 | Inactive | Only inactive codes. | | 1 | Active | Only active codes. |

Options: -1, 0, 1
query
includeFavouriteOnlyboolean

true → only the caller's favourite codes. Filters on AbsenceCodeRead.IsFavourite (eq).

query
searchTextstring

Substring match on Name OR AbsenceCode. Filters on AbsenceCodeRead.Name (contains).

query
$pageinteger

Page number.

query
$pagesizeinteger

Page size. No maximum enforced in the API layer.

Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token. OAuth 2.0 bearer token, sent as Authorization: Bearer <token>. JWT and reference tokens are both accepted. The token must carry the required scope (default tlp).

The token's sub claim is the acting user. A token WITHOUT sub (client-credentials) acts as the system service user. If the sub user cannot log in (inactive, locked, deleted), the request is rejected with 401 — it is no longer let through without a user.

Not yet documented: how to obtain a token.

Not yet documented: token lifetime.

Path Parameters

statusinteger
Required

Any other integer is treated as Active (non-zero → true).

Filters on AbsenceCodeRead.IsActive (eq).

Allowed values:

ValueNameMeaning
-1AllActive and inactive codes (no filter).
0InactiveOnly inactive codes.
1ActiveOnly active codes.
Allowed values:-101

Query Parameters

includeFavouriteOnlyboolean

true → only the caller's favourite codes.

Filters on AbsenceCodeRead.IsFavourite (eq).

searchTextstring

Substring match on Name OR AbsenceCode.

Filters on AbsenceCodeRead.Name (contains).

$pageinteger

Page number.

$pagesizeinteger

Page size. No maximum enforced in the API layer.

Responses

Propertiesobject

Paging values. They are returned as STRINGS, for example "TotalRecord": "12".

Entitiesarray

Omitted (not []) when the list is empty.

Linksarray