Switch a account feature on or off
Turns one account-wide feature flag on or off (internal client only).
ACCOUNT-WIDE CONFIGURATION WRITE. A feature is an on/off switch that changes TimeLog's behaviour for every user of the account. Examples: CurrencyMatrix (whether amounts are converted through the currency matrix, Settings service), UniqueCustomerNumber (customer-number uniqueness on customer create / update, CRM), ContractTypeIsRequired (contract creates, ProjectManagement), MandatoryComment (registration / absence comments, TimeRegistration and Salary), InvoiceMultilingual / OIOXML (customer invoice settings, CRM), MultiLegalEntities / Departments (user create rules, Organization), BillableOnTime (registration billable flag, TimeRegistration), AllocationDates (allocation dates, ProjectManagement). Only callable with a JWT issued to the OAuth client 'uitestmobile'. Setting a feature to its current value does nothing and still returns 200. A real change is validated, written, and then triggers the feature's side effects — some of which rewrite account data (see behaviour).
Use it to:
- Internal UI / test automation (client 'uitestmobile') switching features on a test account
Not for:
- Integrations: the operation rejects every other OAuth client (400).
- Changing a typed account setting (number, date, enum) →
PUT /v1/setting
Behaviour:
- Idempotent.
- Safe to retry.
- Duplicates: Same value again = no write, no events, 200.
- Side effect: Feature-specific pre / post actions, e.g.: StopwatchTimeTracking (pre-change handling of running timers); SalaryAccounts / approval features; SalaryGroups / SalarySpecification (may switch further features and change the system salary group's salary type); AllocationDates OFF (rewrites the dates of EVERY allocation to its task's dates — not reversible by switching back); CopyWeek (menus); NewResourcePlanner ON (publishes the Resource Planner onboarding event).
- Side effect: Dependent settings / templates updated, e.g. export types (Pdf / Xml / MSExcel / MSWord / TextFile), invoice print-template recipient fields (CustomerSalutation / Initials / ProfessionalTitle1-2), password rules (AdvancedPasswordSecurity), project sub-contract features.
- Side effect: Post actions run TWICE per call — e.g. the onboarding event is published twice.
See also: PUT /v1/setting
Not yet documented: behaviour → consistency; behaviour → side effects; examples (success).
curl -X PUT "https://app3.timelog.com/your-account/api/v1/feature" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"ID": 123,
"Value": true
}'
import requests
import json
url = "https://app3.timelog.com/your-account/api/v1/feature"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
data = {
"ID": 123,
"Value": true
}
response = requests.put(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://app3.timelog.com/your-account/api/v1/feature", {
method: "PUT",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
},
body: JSON.stringify({
"ID": 123,
"Value": true
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"ID": 123,
"Value": true
}`)
req, err := http.NewRequest("PUT", "https://app3.timelog.com/your-account/api/v1/feature", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://app3.timelog.com/your-account/api/v1/feature')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Put.new(uri)
request['Content-Type'] = 'application/json'
request['Authorization'] = 'Bearer YOUR_API_TOKEN'
request.body = '{
"ID": 123,
"Value": true
}'
response = http.request(request)
puts response.body
"null"
{
"error": "Bad Request",
"message": "The request contains invalid parameters or malformed data",
"code": 400,
"details": [
{
"field": "email",
"message": "Invalid email format"
}
]
}
{
"error": "Unauthorized",
"message": "Authentication required. Please provide a valid API token",
"code": 401
}
{
"error": "Internal Server Error",
"message": "An unexpected error occurred on the server",
"code": 500,
"requestId": "req_1234567890"
}
/v1/feature
Target server for requests. Edit to use your own host.
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.
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.The media type of the request body
The feature to change, as a FeatureIdentifier member (integer in REST v1, e.g. 426 = CurrencyMatrix, 352 = UniqueCustomerNumber, 213 = AllocationDates). The enum has several hundred members; there is no REST v1 operation that lists them with their current values. - omitted — Binds to 0 = InvoiceDefaultValue_UseProjectContactForInvoiceContact — no model validation catches it. > Not yet documented: values → lookup op. > Not yet documented: values.
true = switch the feature on, false = switch it off. - omitted — false — an omitted Value switches the feature OFF. - equal to the current value — No write, no validation, no events; 200.
Request Preview
Response
Response will appear here after sending the request
Authentication
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
The feature to change, as a FeatureIdentifier member (integer in REST v1, e.g. 426 = CurrencyMatrix, 352 = UniqueCustomerNumber, 213 = AllocationDates). The enum has several hundred members; there is no REST v1 operation that lists them with their current values.
- omitted — Binds to 0 = InvoiceDefaultValue_UseProjectContactForInvoiceContact — no model validation catches it.
Not yet documented: values → lookup op.
Not yet documented: values.
true = switch the feature on, false = switch it off.
-
omitted — false — an omitted Value switches the feature OFF.
-
equal to the current value — No write, no validation, no events; 200.
Responses
Success without content: HTTP 200 with the literal JSON body null. Literal JSON null — also when the value was already set (no-op).