Skip to Content

PATCH Trips

Use this endpoint to update existing trips.

User level: Advanced

Endpoint

PATCH /v1/{scopeId}/trips/{id}
PropertyValue
MethodPATCH
Scope IDBranch UUID
AuthenticationAuthorization: Bearer <access_token>
Required scoperoutix:trips:write
Content-Typeapplication/json
Request bodyJSON object

Update rules

  • The API validates server-side whether the record belongs to the allowed organization and branch.
  • Only explicitly allowed fields can be updated.
  • Unknown or disallowed fields return 400 invalid_update.

Allowed update fields

Field
trip_date
vehicle_id
driver_id
status
planned_distance_km
is_charter
carrier_account_id

Example request

curl -X PATCH "https://api.routix.com/v1/550e8400-e29b-41d4-a716-446655440000/trips/8c6f6b38-c46c-486d-9ee6-0b2ec458f3f1" \ -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..." \ -H "Content-Type: application/json" \ -d '{ "status": "planned", "planned_distance_km": 185 }'

Example response

{ "data": { "id": "8c6f6b38-c46c-486d-9ee6-0b2ec458f3f1", "trip_date": "2026-07-05", "vehicle_id": "91eb2f55-bc74-4ebb-a118-8d996a96f2f4", "driver_id": "e70d3a6a-799d-4a7d-88bd-0ad13f5211b4", "status": "planned", "planned_distance_km": 185, "is_charter": false, "carrier_account_id": "7ecf4b8d-8d1f-4a0f-8e57-6d8f14c6a221" }, "version": "v1" }

Error response

{ "error": "invalid_update", "error_description": "One or more fields are not allowed for updates on trips" }

Possible error codes

  • 400 invalid_request
  • 400 invalid_update
  • 401 unauthorized
  • 401 invalid_token
  • 403 invalid_token_type
  • 403 insufficient_scope
  • 404 not_found
  • 405 method_not_allowed
  • Trips GET
  • API calls & examples
  • Setup guide
Last updated on