ShipmentLeg

Endpoints relating to ShipmentLeg objects

List all shipment route legs

Returns a list of shipment route legs. The legs are sorted descending by creation date.

Request
query Parameters
page
integer >= 1
Default: 1

Page number of the page to retrieve

Example: page=1
per
integer [ 1 .. 100 ]
Default: 20

Count of items in each page. Should be between 1 and 100 (inclusive).

Example: per=20
f.shipment.id
integer

Only return legs for the shipment specified by this id.

f.transportation_mode
integer

Only return legs that match the given transportation mode

f.include_deleted
boolean
Default: false

Returns legs including deleted legs

Responses
200

Success

Response Schema: application/json
_object
string
self
string
version
integer
object
_object
string
prev
string or null
next
string or null
Array of objects (ShipmentLeg)
400

error

get/shipment_legs
Response samples
application/json

Success

{
  • "_object": "/api/response",
  • "version": 2,
  • "data": {
    • "_object": "/api/collections/paginated",
    • "data": [
      • {
        }
      ]
    }
}

Retrieve a shipment route leg

Request
path Parameters
id
required
integer

The unique id for the ShipmentLeg object to be retrieved

query Parameters
f.include_deleted
boolean
Default: false

Retrieves the leg even if it was deleted

Responses
200

Success

Response Schema: application/json
_object
string
self
string
version
integer
object (ShipmentLeg)
_object
string

Type of the object

id
integer
object (ShipmentRef)
estimated_arrival_date
string <date-time>
actual_arrival_date
string <date-time>
estimated_departure_date
string <date-time>
actual_departure_date
string <date-time>
deleted_at
string or null <date-time>

Date-time string when this leg was deleted. Null if not deleted.

object (AdditionalDates)
object (ShipmentNode)
object (ShipmentNode)
transportation_mode
string (TransportationMode)
Enum: "ocean" "air" "truck" "rail" "unknown_transportation" "ocean_air" "truck_intl" "warehouse_storage"
carrier_name
string
object or null (AirShipmentLeg)
object (OceanShipmentLeg)
object or null (TruckingShipmentLeg)
object or null (RailShipmentLeg)
cargo_ready_date
string <date>

[DEPRECATED] See additional_dates

400

error

get/shipment_legs/{id}
Response samples
application/json

Success

{
  • "_object": "/api/response",
  • "version": 2,
  • "data": {
    • "_object": "/shipment_leg",
    • "id": 948211,
    • "shipment": {},
    • "estimated_arrival_date": "2019-02-06T19:28:25.000+00:00",
    • "actual_arrival_date": "2019-02-06T19:28:25.000+00:00",
    • "estimated_departure_date": "2019-02-06T19:28:25.000+00:00",
    • "actual_departure_date": "2019-02-06T19:28:25.000+00:00",
    • "additional_dates": {
      • "cargo_ready_date": "2019-02-06",
      • "delivery_appointment_requested_at_date": "2019-07-09T12:00:00.000+08:00",
      • "delivery_appointment_requested_for_date": "2019-07-14T12:00:00.000+08:00",
      • "delivery_appointment_scheduled_at_date": "2019-07-11T12:00:00.000+08:00",
      • "delivery_appointment_scheduled_for_date": "2019-07-14T12:00:00.000+08:00",
      • "loaded_on_truck_date": "2019-07-13T12:00:00.000+08:00",
      • "delivery_completed": "2019-07-14T12:00:00.000+08:00"
      },
    • "origin": {
      • "_object": "/shipment_node",
      • "tags": [
        ],
      • "place": {
        },
      • "terminal": {
        }
      },
    • "destination": {
      • "_object": "/shipment_node",
      • "tags": [
        ],
      • "place": {
        },
      • "terminal": null
      },
    • "transportation_mode": "ocean",
    • "carrier_name": "Liberty Carrier",
    • "air_leg": null,
    • "trucking_leg": null,
    • "rail_leg": null,
    • "ocean_leg": {}
    }
}