Перейти к содержимому

Pull trips that changed, oldest change first

GET
/api/v1/integration/trips
curl --request GET \
--url https://example.com/api/v1/integration/trips

Requires the trips:read scope. Trips come back in the order they last changed, so a consumer can follow the feed forward. Pass nextCursor from the previous page as cursor to continue; a null nextCursor means the feed is caught up. Use since to start from a point in time and repeat status to keep only certain statuses — an unknown status or a malformed cursor answers 400. limit defaults to 50 and is capped at 100.

since
string format: date-time
cursor
string
limit
integer format: int32
status
Array
Allowed values: Confirmed InProgress Completed Cancelled Draft

OK

Media typeapplication/json

One page of the trip feed, oldest change first.

object
items
required

The trips on this page.

Array<object>

One trip, as the pull feed reports it.

object
id
required

The trip’s id.

string format: uuid
shortId
required

The short human-readable code operators use to refer to the trip.

string
status
required

Where the trip stands, as a name: Confirmed, InProgress, Completed or Cancelled.

Allowed values: Confirmed InProgress Completed Cancelled Draft
originWarehouseId
required

The warehouse the trip starts from.

string format: uuid
driverId
required

The driver assigned to the trip, or null when none is.

null | string format: uuid
vehicleId
required

The vehicle assigned to the trip, or null when none is.

null | string format: uuid
stopCount
required

How many stops the trip has.

integer format: int32
createdAtUtc
required

When the trip was planned (UTC).

string format: date-time
updatedAtUtc
required

When the trip last changed (UTC). This is the value the feed orders by and that the since parameter compares against.

string format: date-time
nextCursor
required

The opaque token to send as cursor for the next page, or null when the feed is caught up. Treat it as a value to pass back unchanged, not as something to parse.

null | string
Example
{
"items": [
{
"status": "Confirmed"
}
]
}

Validation failed

Media typeapplication/problem+json

The body of a 400 response, served as application/problem+json. It follows the RFC 9457 problem-details shape: type, title, status and detail are the standard members, and errors is an extension that lists the offending fields.

object
type
required

A stable, machine-readable code for the error. Branch on this rather than on the wording of the title or the detail.

string
title
required

A short label for the kind of failure, such as Validation failed.

string
status
required

The HTTP status code of the response, which for this body is 400.

integer format: int32
detail
required

A human-readable explanation of this particular failure, or null.

null | string
errors

The fields the request was rejected over, one entry each. Omitted entirely when the failure carries no field-level context, so a 400 can arrive without this member.

Array<object> | null

One field the request was rejected over.

object
field
required

The name of the offending field, spelled as the request body spells it.

string
code
required

A stable, machine-readable code for this field’s failure.

string
value
required

The rejected value. Always present, and null when it was not safe to echo back.

null | string
message
required

A human-readable explanation of what is wrong with the field.

string
overridable

Set only by the dispatcher application’s manual planning operations — integration endpoints never set it. True when every problem in this refusal is a tenant-policy refusal the operator may override by re-sending the same request with force: true. Omitted otherwise.

null | boolean
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"errors": [
{
"field": "example",
"code": "example",
"value": "example",
"message": "example"
}
],
"overridable": true
}

Missing or invalid credentials

Authenticated, but the role or scope does not allow this

Not found

Media typeapplication/problem+json

RFC 9457 problem body returned on every failure. type carries a stable machine-readable error code (see docs/api/error-codes.yaml), title a short human summary, status the HTTP status, detail the specific message.

object
type
null | string
title
null | string
status
null | integer format: int32
detail
null | string
instance
null | string
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}

Conflict

Media typeapplication/problem+json

RFC 9457 problem body returned on every failure. type carries a stable machine-readable error code (see docs/api/error-codes.yaml), title a short human summary, status the HTTP status, detail the specific message.

object
type
null | string
title
null | string
status
null | integer format: int32
detail
null | string
instance
null | string
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}

Rate limit exceeded; retry after the Retry-After header

Media typeapplication/problem+json

RFC 9457 problem body returned on every failure. type carries a stable machine-readable error code (see docs/api/error-codes.yaml), title a short human summary, status the HTTP status, detail the specific message.

object
type
null | string
title
null | string
status
null | integer format: int32
detail
null | string
instance
null | string
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}

Unexpected error

Media typeapplication/problem+json

RFC 9457 problem body returned on every failure. type carries a stable machine-readable error code (see docs/api/error-codes.yaml), title a short human summary, status the HTTP status, detail the specific message.

object
type
null | string
title
null | string
status
null | integer format: int32
detail
null | string
instance
null | string
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}