Services
Update a service
Updates a service (send only the fields to change).
services:writeservices:write- 120/min
- Server annotation: Idempotent
Result
generated from the schema
It includes the rate, the travel times and the expenses passed on by default —of which only the PRICE goes in, not the cost—. Lists replace the existing one. Returns the updated service.
Arguments
Service identifier.
Limits: min length 1
Customer-facing service name.
Limits: min length 2
Service description; null clears it.
Service type.
Available options: crew, fleet, general
Whether it appears as a plannable service.
Default quantity.
Limits: min 1
Break deducted from the work day, in minutes.
Limits: min 0
Information printed on the order and on the delivery note.
Service rate.
Show child attributesHide child attributes
Price per hour.
Limits: min 0
Fixed price per service.
Limits: min 0
Price per kilometre.
Limits: min 0
Whether its amount counts towards the document total.
How the billable distance is calculated.
Travel time before, in minutes.
Limits: min 0
Travel time after, in minutes.
Limits: min 0
Window in which it is used.
Show child attributesHide child attributes
"order" inherits the dates of the order; "custom" uses the offsets below.
Available options: order, custom
Minutes before the order start.
Limits: min 0
Minutes after the order end.
Limits: min 0
Window in which it is planned.
Show child attributesHide child attributes
"order" inherits the dates of the order; "custom" uses the offsets below.
Available options: order, custom
Minutes before the order start.
Limits: min 0
Minutes after the order end.
Limits: min 0
Expenses passed on by default. Only the price, not the cost. Merged with the stored ones: categories you omit are left unchanged, and each category keeps its stored cost.
Show child attributesHide child attributes
Meal allowances.
Show child attributesHide child attributes
What the customer is charged for this concept.
Travel.
Show child attributesHide child attributes
What the customer is charged for this concept.
Accommodation.
Show child attributesHide child attributes
What the customer is charged for this concept.
Other expenses.
Show child attributesHide child attributes
What the customer is charged for this concept.
Required resources. Replaces the whole list.
Show child attributesHide child attributes
What is needed to provide it: personnel or vehicle.
Available options: personnel, vehicle
How many are needed.
Limits: min 1
Tags the assigned resource must have. E.g.: "Carné C".
Limits: max 20 items, each max length 100
Collection it belongs to.
Service image URLs.
Idempotency key chosen by the client (a UUID is recommended). Repeating the same key with the same arguments within 24 h returns the stored response without executing again; with different arguments it responds 422. It is the safe way to retry after a network failure.
Limits: min length 1, max length 255
Optimistic locking: the meta.etag you got from the detail read of this resource (or "*"). If the resource changed since, the call fails with 412 precondition_failed before writing anything; read it again and retry. Omit it to write unconditionally.
Limits: min length 1
Result
On success the result carries structuredContent with data and meta. These are the attributes of data.
Show the attributes of data
Unique service identifier.
Service name as the customer sees it.
Type: crew (personnel), fleet (vehicles) or general.
Description; null if it has none.
Quantity added to an order by default.
Whether it appears as a plannable service.
Whether its amount counts towards the document total.
Path of the collection it belongs to; null if it is in none.
Resources needed to provide it.
Show child attributesHide child attributes
What is needed to provide it: personnel or vehicle.
Available options: personnel, vehicle
How many are needed.
Limits: min 1
Tags the assigned resource must have. E.g.: "Carné C".
Limits: max 20 items, each max length 100
Creation date in ISO 8601 UTC; null if not recorded.
Last modification date in ISO 8601 UTC; null if not recorded.
An error is a result with isError: true and the problem in content[0].; there is no structuredContent. See Errors.
The same operation by REST
This tool runs PATCH /api/v1/services/{serviceId}.
Related pages
Link to this section: Related pagesServices
Update a service
Updates a service (send only the fields to change).
Guides
Safe writes
An assistant that can write can also write the wrong thing. Decide which tools need a person, retry without duplicating, and know what a write sets in motion.
Guides
Errors
A tool error is a result with
isError: trueand the problem in the first text block. Branch on itscode.
Was this page helpful?