Lists the tenant's work orders with cursor pagination (limit defaults to 20, maximum 100; pass next_cursor as after). Filters for order type, priority, status, service area, crew, account and connection combine with AND, and q searches the order text and also matches orders of accounts whose holder matches the search. Requires operations read access.
Parâmetros
limitinteger · consulta · opcional
Maximum resources to return (default 20, maximum 100).
afterstring · consulta · opcional
Opaque cursor returned by the previous page.
account_idstring · consulta · opcional
Only orders raised for this account
connection_idstring · consulta · opcional
Only orders raised for this connection
Devolve
200Work orders
Mostrar atributos
dataarray of WorkOrder · obrigatório
Mostrar atributos filhos
idstring · opcional
tenant_idstring · opcional
order_numberstring · opcional
order_typestring · opcional
prioritystring · opcional
statusstring · opcional
account_idstring · opcional
account_numberstring · opcional
Number of the referenced account, e.g. CTA-000044. Omitted when unknown.
account_holder_namestring · opcional
Display name of the customer who holds the referenced account. Omitted when unknown.
connection_idstring · opcional
connection_holder_namestring · opcional
Display name of the customer who holds the referenced connection. Omitted when unknown.
Create a field work order, with its material lines from a kit or one by one
Materials are planned when the order is created (RFC 0071 section 5.3). kit_id fills the lines from a kit (default picks the kit set for the order type); materials add catalogue items or free-text parts, or adjust a kit line (quantity 0 removes it). Meters are required lines by default on installation and replacement orders. Lines are reserved at the natural source (the crew's van, the service area's warehouse, the main warehouse); a shortage is a warning in the response, never a refusal. Without materials, proposed_kit_id offers the order type's default kit.
Corpo application/json
order_typestring · obrigatório
prioritystring · opcional
asset_idstring · opcional
service_area_idstring · opcional
account_idstring · opcional
crew_idstring · opcional
descriptionstring · obrigatório
scheduled_atstring (date-time) · opcional
connection_idstring · opcional
required_skillstring · opcional
kit_idstring · opcional
A kit (kit_), or default for the order type's default kit
materialsarray of WorkOrderMaterialInput · opcional
Mostrar atributos filhos
item_idstring · opcional
Catalogue item; omit for a free-text part
part_codestring · opcional
descriptionstring · opcional
quantitynumber · obrigatório
Quantity in the item's unit, with at most three decimals (12.5 metres).
unitstring · opcional
requiredboolean · opcional
Blocks dispatch until reserved; defaults to true for meters on installation and replacement orders
source_location_idstring · opcional
Devolve
201Work order created, with each material line's availability and reservation
Mostrar atributos
idstring · obrigatório
tenant_idstring · obrigatório
order_numberstring · obrigatório
order_typestring · obrigatório
prioritystring · obrigatório
statusstring · obrigatório
crew_idstring · opcional
service_area_idstring · opcional
connection_idstring · opcional
connection_holder_namestring · opcional
Display name of the customer who holds the referenced connection. Omitted when unknown.
descriptionstring · obrigatório
created_atstring (date-time) · obrigatório
updated_atstring (date-time) · obrigatório
material_linesarray of WorkOrderMaterialLine · opcional
Mostrar atributos filhos
idstring · obrigatório
wml_ identifier (wmt_ for a legacy free-text material)
tenant_idstring · obrigatório
work_order_idstring · obrigatório
item_idstring · opcional
item_codestring · opcional
part_codestring · opcional
descriptionstring · opcional
unitstring · opcional
plannednumber · obrigatório
Quantity in the item's unit, with at most three decimals (12.5 metres).
reservednumber · obrigatório
Quantity in the item's unit, with at most three decimals (12.5 metres).
issuednumber · obrigatório
Quantity in the item's unit, with at most three decimals (12.5 metres).
usednumber · opcional
Quantity in the item's unit, with at most three decimals (12.5 metres).
returnednumber · obrigatório
Quantity in the item's unit, with at most three decimals (12.5 metres).
requiredboolean · obrigatório
source_location_idstring · opcional
kit_idstring · opcional
needs_mappingboolean · obrigatório
Free text for a stores person to map; touches no stock
legacyboolean · opcional
stock_statusstring · obrigatório
um de reserved, partially_reserved, short, issued, settled, released, unmapped, untracked
serialisedboolean · opcional
is_meterboolean · opcional
cost_minorinteger (int64) · obrigatório
Issues less returns at average cost
availabilityobject · opcional
Mostrar atributos filhos
source_location_idstring · opcional
source_location_namestring · opcional
availablenumber · opcional
Quantity in the item's unit, with at most three decimals (12.5 metres).
shortnumber · opcional
Quantity in the item's unit, with at most three decimals (12.5 metres).
other_locationsarray of object · opcional
Mostrar atributos filhos
location_idstring · opcional
location_namestring · opcional
kindstring · opcional
availablenumber · opcional
Quantity in the item's unit, with at most three decimals (12.5 metres).
reservationsarray of object · opcional
Mostrar atributos filhos
idstring · opcional
location_idstring · opcional
quantitynumber · opcional
Quantity in the item's unit, with at most three decimals (12.5 metres).
serial_idstring · opcional
statusstring · opcional
expires_atstring (date-time) · opcional
created_atstring (date-time) · opcional
suggested_transferobject · opcional
Mostrar atributos filhos
from_location_idstring · opcional
to_location_idstring · opcional
quantitynumber · opcional
Quantity in the item's unit, with at most three decimals (12.5 metres).
created_bystring · opcional
created_atstring (date-time) · obrigatório
updated_atstring (date-time) · obrigatório
material_cost_minorinteger (int64) · opcional
Cost of the materials used, at average cost; per new connection on its installation order
proposed_kit_idstring · opcional
Default kit for the order type, offered when created without materials
# Sem comando CLI equivalente; use cURL ou HTTP directo.
constres=awaitfetch("$BUSINESS_API/work-orders",{method:"POST",headers:{Authorization:"Bearer sk_test_...","Content-Type":"application/json"},body:JSON.stringify({"order_type":"order type","priority":"priority","asset_id":"ass_2IIXBYi79uuRV0QXd685rmSLhO0","service_area_id":"ser_23fmkpfkC17kSVJ2spjyiBbOED9","account_id":"act_2JFioNDgIfvkgflk8RtcqhBaARP","crew_id":"crw_2l1wOJtgejFoQBJcG9bsknLKyxp","description":"Leitura confirmada no local.","scheduled_at":"2026-11-19T09:30:00Z","connection_id":"con_2wuJTWy9FOCTPGA3noGbHegbLaU","required_skill":"required skill","kit_id":"kit_2uWTnksrliq19iiHpycNpyqZtmS","materials":[{"item_id":"itm_2vLmKDHWenXi6Pxs8hv8WJHGW53","part_code":"PAR-2026-000142","description":"Leitura confirmada no local.","quantity":1,"unit":"unit","required":true,"source_location_id":"sou_2nDQqZJueRPA8hXIWbBOkTVyEfd"}]})});constdata=awaitres.json();
importrequestsres=requests.post("$BUSINESS_API/work-orders",headers={"Authorization":"Bearer sk_test_..."},json={"order_type":"order type","priority":"priority","asset_id":"ass_2IIXBYi79uuRV0QXd685rmSLhO0","service_area_id":"ser_23fmkpfkC17kSVJ2spjyiBbOED9","account_id":"act_2JFioNDgIfvkgflk8RtcqhBaARP","crew_id":"crw_2l1wOJtgejFoQBJcG9bsknLKyxp","description":"Leitura confirmada no local.","scheduled_at":"2026-11-19T09:30:00Z","connection_id":"con_2wuJTWy9FOCTPGA3noGbHegbLaU","required_skill":"required skill","kit_id":"kit_2uWTnksrliq19iiHpycNpyqZtmS","materials":[{"item_id":"itm_2vLmKDHWenXi6Pxs8hv8WJHGW53","part_code":"PAR-2026-000142","description":"Leitura confirmada no local.","quantity":1,"unit":"unit","required":true,"source_location_id":"sou_2nDQqZJueRPA8hXIWbBOkTVyEfd"}]})data=res.json()
Get work order details, with material lines and material cost
Returns one work order with its status, crew, schedule, execution details and its material lines. Responds 404 when the order is not in the caller's tenant. Requires operations read access.
Parâmetros
idstring · caminho · obrigatório
ID of the work order in the caller's tenant.
Devolve
200Work order details; material_lines and material_cost_minor appear when the order has materials
Mostrar atributos
idstring · obrigatório
tenant_idstring · obrigatório
order_numberstring · obrigatório
order_typestring · obrigatório
prioritystring · obrigatório
statusstring · obrigatório
crew_idstring · opcional
service_area_idstring · opcional
connection_idstring · opcional
connection_holder_namestring · opcional
Display name of the customer who holds the referenced connection. Omitted when unknown.
descriptionstring · obrigatório
created_atstring (date-time) · obrigatório
updated_atstring (date-time) · obrigatório
material_linesarray of WorkOrderMaterialLine · opcional
Mostrar atributos filhos
idstring · obrigatório
wml_ identifier (wmt_ for a legacy free-text material)
tenant_idstring · obrigatório
work_order_idstring · obrigatório
item_idstring · opcional
item_codestring · opcional
part_codestring · opcional
descriptionstring · opcional
unitstring · opcional
plannednumber · obrigatório
Quantity in the item's unit, with at most three decimals (12.5 metres).
reservednumber · obrigatório
Quantity in the item's unit, with at most three decimals (12.5 metres).
issuednumber · obrigatório
Quantity in the item's unit, with at most three decimals (12.5 metres).
usednumber · opcional
Quantity in the item's unit, with at most three decimals (12.5 metres).
returnednumber · obrigatório
Quantity in the item's unit, with at most three decimals (12.5 metres).
requiredboolean · obrigatório
source_location_idstring · opcional
kit_idstring · opcional
needs_mappingboolean · obrigatório
Free text for a stores person to map; touches no stock
legacyboolean · opcional
stock_statusstring · obrigatório
um de reserved, partially_reserved, short, issued, settled, released, unmapped, untracked
serialisedboolean · opcional
is_meterboolean · opcional
cost_minorinteger (int64) · obrigatório
Issues less returns at average cost
availabilityobject · opcional
Mostrar atributos filhos
source_location_idstring · opcional
source_location_namestring · opcional
availablenumber · opcional
Quantity in the item's unit, with at most three decimals (12.5 metres).
shortnumber · opcional
Quantity in the item's unit, with at most three decimals (12.5 metres).
other_locationsarray of object · opcional
Mostrar atributos filhos
location_idstring · opcional
location_namestring · opcional
kindstring · opcional
availablenumber · opcional
Quantity in the item's unit, with at most three decimals (12.5 metres).
reservationsarray of object · opcional
Mostrar atributos filhos
idstring · opcional
location_idstring · opcional
quantitynumber · opcional
Quantity in the item's unit, with at most three decimals (12.5 metres).
serial_idstring · opcional
statusstring · opcional
expires_atstring (date-time) · opcional
created_atstring (date-time) · opcional
suggested_transferobject · opcional
Mostrar atributos filhos
from_location_idstring · opcional
to_location_idstring · opcional
quantitynumber · opcional
Quantity in the item's unit, with at most three decimals (12.5 metres).
created_bystring · opcional
created_atstring (date-time) · obrigatório
updated_atstring (date-time) · obrigatório
material_cost_minorinteger (int64) · opcional
Cost of the materials used, at average cost; per new connection on its installation order
proposed_kit_idstring · opcional
Default kit for the order type, offered when created without materials