POST
Add a stop to a trip
Company space For: Stock keeper, Manager · Permission: trip_stops.create Conditions
  • Only the company that owns the trip can change it; a trip shared by another company can be read but not modified.
  • Only a trip whose status is active can be modified; an archived trip is refused with a validation error.
  • position is required, must be a positive integer and not already used by another stop of the trip (422).
  • point_type and point_id are required; the point type must be registered and the point must exist (supplier, supplier pickup point, customer and customer address types require a private trip owned by the company).
What else happens
  • Creates the stop with a copy of the point’s name and address.
Part of Reusable trips and waypoints.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

trip
string
required

Identifier of the trip (27-character KSUID). The trip must be visible to the calling company.

Body

application/json
position
integer
required

Position of the stop on the route, starting at 1. Required on creation and unique within the trip; not accepted on update.

Required range: x >= 1
point_type
string
required

Kind of point the stop refers to: location_group, waypoint, vendor, vendor_pickup_point, customer or customer_address. Required on creation. Supplier, pickup point, customer and customer address types require a private trip owned by the company.

Maximum string length: 255
point_id
string
required

Identifier of the point (27 characters) of the given point_type; it must exist. Required on creation. Changing it on update is refused when the stop is already referenced.

Required string length: 27
label
string | null

Optional free-text label for the stop, up to 255 characters; null clears it.

Maximum string length: 255

Response

TripStopResource

id
string
required

Identifier of the stop (27-character KSUID).

trip_id
string
required

Identifier of the trip the stop belongs to.

position
integer
required

Position of the stop on the route, starting at 1.

point_type
string
required

Kind of point: location_group, waypoint, vendor, vendor_pickup_point, customer or customer_address.

point_id
string
required

Identifier of the point the stop refers to.

point
object | null
required

Copy of the point taken when the stop was created or re-pointed (id and name, plus address for suppliers, waypoints and customers, and coordinates for pickup points and waypoints; other fields depend on the point type). When no copy is stored it is read from the live record.

label
string | null
required

Optional free-text label of the stop.

created_at
string<date-time>
required

Date and time the record was created (ISO 8601, UTC).

updated_at
string<date-time>
required

Date and time the record was last changed (ISO 8601, UTC).