Skip to main content
POST
Logs time against a ticket.

Authorizations

X-API-Key
string
header
required

Your Gorelo API key. See Generate API key. If your data is hosted in Australia, click the base URL at the top of this page and select https://api.aue.gorelo.io.

Body

Time entry to create, including the ticket to log it against.

Logs time against a ticket.

TicketId
string<uuid> | null

Ticket to log the time against. Send either this or TaskId, not both and not neither. Validated against the service provider - an unknown ticket is a 404. The entry is billed to the ticket's client; a ticket with no client is rejected with 409.

Example:

"e5fb2939-3bd7-4893-8b47-a287003d5b8a"

TaskId
string<uuid> | null

Task to log the time against, instead of a ticket. Validated the same way - an unknown task is a 404. The entry is billed to the client of the task's project, which is authoritative; the task's own copy of the client can lag behind.

A task carries no billing defaults of its own, so the billing role, work type and billable status fall to the technician's defaults and then the service provider's - the same chain a ticket uses once its own values are absent.

StartedOn
string<date-time> | null

When the work started, as a single UTC instant.

Supply any two of StartedOn, EndedOn and ActualHours and the third is derived. Supplying all three is accepted only when ActualHours agrees with the span between the two instants, to the same four decimal places GET reports it at; a disagreement is rejected rather than resolved by discarding one of the three.

Example:

"2026-04-28T09:00:00.0000000+00:00"

EndedOn
string<date-time> | null

When the work finished, as a single UTC instant. Must be later than StartedOn. See StartedOn for which combinations of the three time fields are accepted.

Example:

"2026-04-28T10:30:00.0000000+00:00"

ActualHours
number<double> | null

Duration worked, in decimal hours. Must be greater than 0.

This is the raw logged duration and is never pre-rounded: the work type's minimum and increment rounding is applied on top of it, and GET reports the rounded figure separately as AdjustedHours. See StartedOn for which combinations of the three time fields are accepted.

Example:

1.5

BillableStatusId
integer<int32> | null

Billable status for this entry: 1 = Billable, 2 = No charge, 3 = Non-billable; any other value is rejected. Optional — omit it and the ticket's own billable status is used, else the work type's, else Billable.

Example:

1

UserId
integer<int64>

User whose time this is. Validated against the service provider. Named UserId rather than TechnicianId because Gorelo uses "user", not "technician", in its own vocabulary.

Example:

8842

BillingRoleId
integer<int64> | null

Billing role to charge at. Optional — omit it and the ticket's own billing role is used, else the user's, else the service provider's first. Get valid ids from GET /v1/billing-roles.

Example:

1742

WorkTypeId
integer<int64> | null

Work type to apply. Determines the rate multiplier and the minimum/increment rounding applied to the logged duration. Optional — omit it and the ticket's own work type is used, else the user's, else the service provider's first. Get valid ids from GET /v1/work-types.

Example:

2432

ServiceLineId
integer<int64> | null

Service line to bill this time against.

Optional. Omit it and the ticket's own service line is used, else the first one whose configured billing roles and work types both cover the resolved role and type, else no contract. Send it as null to decline a contract outright, which suppresses the automatic contract assignment that would otherwise happen when the time is approved.

When supplied, the service line must belong to the ticket's client, and its contract must be active today and cover labour.

Example:

4720

Comment
string | null

Free-text note describing the work.

Example:

"Replaced faulty NIC"

Distance
number<double> | null

Distance travelled for this work, when the service provider bills mileage.

Example:

12.5

Attachments
object[] | null

Files to attach to this entry. The serialised list must be 5000 characters or fewer.

CreatedOn
string<date-time> | null

Backdate the entry's timestamp — for importing time history from another system. Must not be in the future or earlier than the ticket's (or task's) own CreatedOn. Omit to use the current time.

Send only when importing history. An entry with this field set is a historical record:

  • It is stored as already completed for billing, so it never appears in Approve & Invoice and is never invoiced. Its hours still count in reports.
  • It cannot be changed or deleted through this API afterwards; correct it in Gorelo web.
  • It is accepted on a Closed ticket, which a live entry is not.
  • It sends no notifications, including the block-hours balance alert.
  • The ticket's UpdatedOn becomes the later of its current value and this timestamp, so importing older history does not push the ticket to the top of an updatedOn-sorted list.
  • A service line is matched, priced and drawn down as of the day the work started (StartedOn), not today. A supplied ServiceLineId whose contract did not cover that day is rejected; an omitted one is picked from the contracts covering that day, or left unset when none does. Block-hours time still reduces the client's current balance, and limited-hours time uses up the allowance of the period the work fell in.
Example:

"2024-03-14T10:30:00.0000000+00:00"

Response

OK

StatusCode
enum<integer>
Available options:
100,
101,
102,
103,
200,
201,
202,
203,
204,
205,
206,
207,
208,
226,
300,
301,
302,
303,
304,
305,
306,
307,
308,
400,
401,
402,
403,
404,
405,
406,
407,
408,
409,
410,
411,
412,
413,
414,
415,
416,
417,
421,
422,
423,
424,
426,
428,
429,
431,
451,
500,
501,
502,
503,
504,
505,
506,
507,
508,
510,
511
IsSuccess
boolean
Data
object
DataContext
object | null
Example:

null

Notifications
object[]