PT EN

Brigadas

URL base: $BUSINESS_API

Listar brigadas

Registos

GET /crews

Returns the tenant's maintenance crews one cursor page at a time. The handler also accepts status (available, dispatched or off_duty) and q (free-text search) filters. Requires the crews:read scope.

Parâmetros

limitinteger · consulta · opcional

Maximum resources to return (default 20, maximum 100).

afterstring · consulta · opcional

Opaque cursor returned by the previous page.

Devolve

200 Maintenance crews

Permissões crews:read · Funções: admin, analyst, field_reader, field_supervisor, operations, owner, viewer

curl -X GET "$BUSINESS_API/crews" \
  -H "Authorization: Bearer sk_test_..."
Resposta 200

Maintenance crews

Registar uma brigada

Registos

POST /crews

Creates a crew in the tenant with the available status. name and lead_technician are required; contact_phone and skills are optional. Requires operations:write; missing required fields or an invalid body return 400.

Devolve

201 Maintenance crew registered

Permissões operations:write · Funções: admin, field_supervisor, operations, owner

curl -X POST "$BUSINESS_API/crews" \
  -H "Authorization: Bearer sk_test_..."
Resposta 201

Maintenance crew registered

Obter uma brigada

Registos

GET /crews/{id}

Returns one crew of the authenticated tenant with its lead technician, contact phone, skills and current status (available, dispatched or off_duty). Requires crews:read; an unknown crew returns 404.

Parâmetros

idstring · caminho · obrigatório

Identifier of the maintenance crew in the authenticated tenant.

Devolve

200 Maintenance crew details

Permissões crews:read · Funções: admin, analyst, field_reader, field_supervisor, operations, owner, viewer

curl -X GET "$BUSINESS_API/crews/{id}" \
  -H "Authorization: Bearer sk_test_..."
Resposta 200

Maintenance crew details