document-categories

Get document category

Retrieve a single document category.

Document categories are split into two types:

COMPANY: Documents that are shared across the organization. By default they are visible to everyone in the company. They can optionally be linked to one or more teams via the teams array — when teams are set, only members and leads of those teams can see the category and its documents.

PERSONAL: Documents that belong to individual users (contracts, payslips, etc.). The teams field is never present on personal categories.

get/document-categories/{id}

Request

  • Base URL: https://api.hoorayhr.io
  • URL: https://api.hoorayhr.io/document-categories/{id}
  • Auth: API key in header authorization

Path parameters

idinteger required

ID of document-categories to return

Response

success

idinteger

ID of the document category

namestring

Name of the category

color'BLUE' | 'CYAN' | 'GREEN' | 'ORANGE' | 'YELLOW' | 'RED'

Display color of the category

iconstring

Icon identifier

type'COMPANY' | 'PERSONAL'

Category type. COMPANY categories hold shared documents (optionally scoped to teams). PERSONAL categories hold per-user documents.

teamsinteger[]

Team IDs linked to this category. Only present on COMPANY categories. An empty array means the category is visible to the whole company.

createdAtstring date-time

Creation date

updatedAtstring date-time

Last updated date

Example response

{
  "id": 1,
  "name": "Contracts",
  "color": "CYAN",
  "icon": "company",
  "type": "PERSONAL",
  "teams": [
    1,
    2
  ],
  "createdAt": "2024-03-23T08:55:02.000Z",
  "updatedAt": "2024-03-23T08:55:02.000Z"
}

Changes

No recorded changes to this operation across all 1 revision of this API.