Update your preferences
const url = 'https://invoicing-api.eddish.app/api/me/preferences';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"liveAmounts":true,"workdayStartsAt":"example","workingHours":[{"day":1,"start":"example","end":"example"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://invoicing-api.eddish.app/api/me/preferences \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "liveAmounts": true, "workdayStartsAt": "example", "workingHours": [ { "day": 1, "start": "example", "end": "example" } ] }'Updates the caller’s own display preferences.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”The new display preferences.
object
Whether money figures that a running timer changes count its time as it runs.
Older clients only: the time the work day starts, on a quarter hour. Ignored when WorkingHours is sent.
When the person usually works: at most one line for each day of the week, each ending after it starts, on quarter hours. Leave out to keep what is saved; send an empty list for no working days.
One working day: when the person usually starts and finishes.
object
The day of the week, 0 for Sunday to 6 for Saturday.
When the day starts, as HH:mm:ss on a quarter hour.
When the day ends, as HH:mm:ss on a quarter hour, after the start. The end of the day is 23:59:59.
Example generated
{ "liveAmounts": true, "workdayStartsAt": "example", "workingHours": [ { "day": 1, "start": "example", "end": "example" } ]}Responses
Section titled “Responses”OK
Shorthand for the overwhelmingly common ServiceResponse<TData, ErrorResponse>.
C# cannot alias an open generic, so this is expressed as a subclass rather than a using alias.
object
True when the call succeeded and TData? ServiceResponse<TData, TError>.Data is populated.
Payload on success; default on failure.
object
Whether money figures that a running timer changes count its time as it runs. Off, they count what the timer had saved at its last start or stop.
The earliest start across the working days, as HH:mm:ss, kept for older clients. Read WorkingHours instead.
When the person usually works: one line for each working day of the week. A day with no line is a day off. Monday to Friday, 09:00 to 17:00, until they choose.
One working day: when the person usually starts and finishes.
object
The day of the week, 0 for Sunday to 6 for Saturday.
When the day starts, as HH:mm:ss on a quarter hour.
When the day ends, as HH:mm:ss on a quarter hour, after the start. The end of the day is 23:59:59.
Error on failure; default on success. Always serialized, per TData? ServiceResponse<TData, TError>.Data.
object
Stable, machine-readable error identifier (for example account.not_found).
Clients branch on this, never on string ErrorResponse.Message.
Human-readable description of what went wrong. Safe to surface to a User.
Optional per-field validation failures, keyed by field name. Null (and omitted from JSON) for errors that are not validation failures.
Optional machine-readable facts about the failure that a client renders rather than parses
out of string ErrorResponse.Message — e.g. plan.limit_reached’s limit, count and
planName. Null (and omitted from JSON) for errors that carry none.
Example generated
{ "success": true, "data": { "liveAmounts": true, "workdayStartsAt": "example", "workingHours": [ { "day": 1, "start": "example", "end": "example" } ] }, "error": { "code": "example", "message": "example", "fieldErrors": "example", "details": "example" }}Not signed in, or the credential isn’t recognised, has expired or was revoked: auth.missing_credential, auth.invalid_credential, auth.expired_credential, auth.revoked_credential.
Shorthand for the overwhelmingly common ServiceResponse<TData, ErrorResponse>.
C# cannot alias an open generic, so this is expressed as a subclass rather than a using alias.
object
True when the call succeeded and TData? ServiceResponse<TData, TError>.Data is populated.
Payload on success; default on failure.
The Framework’s default error shape, used as the TError of
ServiceResponse<TData, TError> unless an App genuinely needs its own.
object
Stable, machine-readable error identifier (for example account.not_found).
Clients branch on this, never on string ErrorResponse.Message.
Human-readable description of what went wrong. Safe to surface to a User.
Optional per-field validation failures, keyed by field name. Null (and omitted from JSON) for errors that are not validation failures.
Optional machine-readable facts about the failure that a client renders rather than parses
out of string ErrorResponse.Message — e.g. plan.limit_reached’s limit, count and
planName. Null (and omitted from JSON) for errors that carry none.
Example generated
{ "success": true, "data": "example", "error": { "code": "example", "message": "example", "fieldErrors": "example", "details": "example" }}Not allowed. error.code says why: auth.role_not_permitted (your role doesn’t allow it), auth.read_only_token (the token can only read), app.no_seat (no seat in this App), auth.api_access_not_in_plan (the plan doesn’t include API access), auth.not_a_member (no longer a member of the Account), auth.insufficient_scope (an Account API key without the scope).
Shorthand for the overwhelmingly common ServiceResponse<TData, ErrorResponse>.
C# cannot alias an open generic, so this is expressed as a subclass rather than a using alias.
object
True when the call succeeded and TData? ServiceResponse<TData, TError>.Data is populated.
Payload on success; default on failure.
The Framework’s default error shape, used as the TError of
ServiceResponse<TData, TError> unless an App genuinely needs its own.
object
Stable, machine-readable error identifier (for example account.not_found).
Clients branch on this, never on string ErrorResponse.Message.
Human-readable description of what went wrong. Safe to surface to a User.
Optional per-field validation failures, keyed by field name. Null (and omitted from JSON) for errors that are not validation failures.
Optional machine-readable facts about the failure that a client renders rather than parses
out of string ErrorResponse.Message — e.g. plan.limit_reached’s limit, count and
planName. Null (and omitted from JSON) for errors that carry none.
Example generated
{ "success": true, "data": "example", "error": { "code": "example", "message": "example", "fieldErrors": "example", "details": "example" }}Too many requests: rate_limit.exceeded. Wait the number of seconds in the Retry-After header.
Shorthand for the overwhelmingly common ServiceResponse<TData, ErrorResponse>.
C# cannot alias an open generic, so this is expressed as a subclass rather than a using alias.
object
True when the call succeeded and TData? ServiceResponse<TData, TError>.Data is populated.
Payload on success; default on failure.
The Framework’s default error shape, used as the TError of
ServiceResponse<TData, TError> unless an App genuinely needs its own.
object
Stable, machine-readable error identifier (for example account.not_found).
Clients branch on this, never on string ErrorResponse.Message.
Human-readable description of what went wrong. Safe to surface to a User.
Optional per-field validation failures, keyed by field name. Null (and omitted from JSON) for errors that are not validation failures.
Optional machine-readable facts about the failure that a client renders rather than parses
out of string ErrorResponse.Message — e.g. plan.limit_reached’s limit, count and
planName. Null (and omitted from JSON) for errors that carry none.
Example generated
{ "success": true, "data": "example", "error": { "code": "example", "message": "example", "fieldErrors": "example", "details": "example" }}Headers
Section titled “Headers”Seconds to wait before trying again.