Crews

Base URL: $BUSINESS_API

List maintenance crews

Logs

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.

Parameters

limitinteger · query · optional

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

afterstring · query · optional

Opaque cursor returned by the previous page.

Returns

200 Maintenance crews

Permissions crews:read · Roles: admin, analyst, field_reader, field_supervisor, operations, owner, viewer

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

Maintenance crews

Register a maintenance crew

Logs

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.

Returns

201 Maintenance crew registered

Permissions operations:write · Roles: admin, field_supervisor, operations, owner

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

Maintenance crew registered

Get maintenance crew details

Logs

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.

Parameters

idstring · path · required

Identifier of the maintenance crew in the authenticated tenant.

Returns

200 Maintenance crew details

Permissions crews:read · Roles: admin, analyst, field_reader, field_supervisor, operations, owner, viewer

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

Maintenance crew details