Global searchSave my search categories

Save my search categories

Saves which global-search categories are switched on for the calling user.

Replaces the caller's MainSearchCategory user default with the sum of the flag values of the entries sent with IsSelected true. Categories not in the body are switched off. Only the caller's own preference changes (user ID from the token). The preference is what GET /v2/search/categories reports; GET /v2/search does not read it.

Use it to:

  • Persist the search-box checkboxes.

Behaviour:

  • Idempotent.
  • Safe to retry.
  • Side effect: Raises event UserSettingConfigurationUpdated.
  • Changes are visible to the next read immediately.

Call first: GET /v2/search/categories

Not yet documented: examples (success).

curl -X PUT "https://app3.timelog.com/your-account/api/v2/search/categories" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
  "Categories": [
    "null"
  ],
  "Categories[].Name": "John Doe",
  "Categories[].IsSelected": true
}'
"null"
PUT
/v2/search/categories
PUT
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.
Content-Typestring
Required

The media type of the request body

Options: application/json
Categoriesarray

The category entries. Omitted / null → 500 (the loop dereferences it). Duplicates are not rejected and are counted twice.

Categories[].Namestring

Category (MainSearchCategory). Bit flags — values combine. | Value | Name | Meaning | |---|---|---| | 0 | None | No category; adds nothing. | | 1 | Customer | Customers. | | 2 | Contact | Contact persons. | | 4 | Project | Projects. | | 8 | Invoice | Invoices and vouchers. | | 16 | Employee | Employees. | | -1 | All | All categories as a filter value; ADDED (not OR-ed) to the stored sum, so combined with other entries it corrupts the value. |

Categories[].IsSelectedboolean

True to switch the category on. false and omitted are the same (not counted).

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.

Body

application/json
Categoriesarray

The category entries. Omitted / null → 500 (the loop dereferences it). Duplicates are not rejected and are counted twice.

Categories[].Namestring

Category (MainSearchCategory).

Bit flags — values combine.

ValueNameMeaning
0NoneNo category; adds nothing.
1CustomerCustomers.
2ContactContact persons.
4ProjectProjects.
8InvoiceInvoices and vouchers.
16EmployeeEmployees.
-1AllAll categories as a filter value; ADDED (not OR-ed) to the stored sum, so combined with other entries it corrupts the value.
Categories[].IsSelectedboolean

True to switch the category on. false and omitted are the same (not counted).

Responses

Success without content: HTTP 200 with the literal JSON body null. Literal JSON null (TafSuccessResult).