Saltar al contingut principal
POST
Logs time against a ticket.

Autoritzacions

X-API-Key
string
header
requerit

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.

Cos

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.

Exemple:

"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.

Exemple:

"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.

Exemple:

"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.

Exemple:

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.

Exemple:

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.

Exemple:

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.

Exemple:

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.

Exemple:

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.

Exemple:

4720

Comment
string | null

Free-text note describing the work.

Exemple:

"Replaced faulty NIC"

Distance
number<double> | null

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

Exemple:

12.5

Attachments
object[] | null

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

Resposta

OK

StatusCode
enum<integer>
Opcions disponibles:
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
Exemple:

null

Notifications
object[]