Replace Trip Stops
PUT/api/crm/trips/:trip/stops
Replace the trip's ordered stop list. Stops are matched by id: unchanged stops are left as they are, changed ones are updated, stops without an id become new planned visits, and planned stops left out are cancelled with the reason "Removed from trip". Completed visits cannot be removed (422), and only their order changes. Skipped stops left out stay on the trip summary. A completed trip's stops cannot change.
customers:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Authentication: Requires Bearer token with the customers scope and the CRM trips manage permission.
Stop fields: customer_id (required, one of your customers unless you may see all customers, not archived), contact_id (optional, must belong to the customer), day (required, YYYY-MM-DD inside the trip dates), sequence (required, order within the day), starts_at (required, ISO-8601), duration_minutes (optional, 5–720, defaults to the tenant's default visit length). The same customer may appear once per day. Each stop is a planned visit activity. Send id for an existing stop.
summary.documents_totals lists the raised value per currency; amounts are never added across currencies. summary.documents_total and summary.currency_code are set only when every document shares one currency (documents_total is 0 when there are none, and null when currencies are mixed).
Optional trip fields (name, sales_rep_id, starts_on, ends_on, start_location, day_start_time, notes) may be sent with the stops. They are saved in the same transaction as the stops, the stops are validated against the new dates, and if anything is refused nothing is saved. Stops you cannot see are left unchanged. Changing, removing or reassigning a visit you do not manage (you are not its owner and lack the manage-all permission) returns 422 naming those visits. A stop completed while you were editing is never cancelled.
A trip can be at most 31 days long. Each stop's day must be the local date (in the account timezone) of its starts_at; a mismatch returns 422 on stops.N.day.
Request
Responses
- 200
- 401
- 403
- 404
- 422
- 429
OK
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Not Found
Response Headers
Unprocessable Entity
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.