Register shipment for future tracking.
Arguments
Argument | Type | Description |
---|---|---|
shipments | [TrackedShipmentInput!]! | The shipments' identification credentials and the data to update. |
TrackedShipmentInput Fields
Field | Type | Description |
---|---|---|
bol | BOL | The Bill of Lading of the shipment to be tracked. |
carrierBookingReference | [carrierBookingReference] | A unique number assigned to a scheduled transportation movement which allocates assets, space needed and a transport plan. |
containerNumber | ContainerNumber | The container of the shipment to be tracked. |
customer | CustomerInput | The details of the customer of the shipment to be tracked. |
masterShipment | MasterShipmentInput | The details of the master shipment of the shipment to be tracked. |
metadata | TrackedShipmentMetadataInput | The metadata of the shipment to be tracked. |
scac | SCAC | The shipment Standard Carrier Alpha Code of the shipment to be tracked. |
shipmentId | ObjectId | The shipment ID of the shipment to be tracked. |
shipmentsUploadId | ObjectId | The shipment upload ID of the shipment to be tracked. |
Return
Name | Description |
---|---|
[TrackedShipment!]! | The registered shipment's data and metadata. |
TrackedShipment Fields
Field | Type | Description |
---|---|---|
createdAt | DateTime! | Shipment's tracking start timestamp. |
id | ObjectId! | Unique Windward assigned shipment ID. |
metadata | TrackedShipmentMetadata | Additional metadata updated by the user. |
shipment | Shipment | Contains all the information on the shipment. |
updatedAt | DateTime! | Shipment's last update timestamp. |
Example Code
Sample Mutation
mutation UpsertTrackedShipments($shipments: [TrackedShipmentInput!]!) {
upsertTrackedShipments(shipments: $shipments) {
id
shipment {
id
carrierBookingReference
containerNumber
bol
scac
carrier {
code
shortName
longName
codeAliases
}
container {
id
number
isoCode
}
status {
id
events {
timestamps {
datetime
code
}
voyage
utcOffset
vessel {
name
imo
flag
class
mmsi
}
port {
properties {
name
country
locode
}
}
}
estimatedArrivalAt
estimatedDepartureAt
actualArrivalAt
actualDepartureAt
currentEvent {
timestamps {
datetime
code
}
voyage
utcOffset
vessel {
name
imo
flag
class
mmsi
}
port {
properties {
name
country
locode
}
}
}
milestones {
type
port {
properties {
name
country
locode
}
}
utcOffset
arrival {
vessel {
name
imo
flag
class
mmsi
}
voyage
timestamps {
carrier {
datetime
code
}
predicted {
datetime
code
}
}
}
departure {
vessel {
name
imo
flag
class
mmsi
}
voyage
timestamps {
carrier {
datetime
code
}
predicted {
datetime
code
}
}
}
}
pod {
properties {
name
country
locode
}
}
pol {
properties {
name
country
locode
}
}
postPod {
properties {
name
country
locode
}
}
}
}
createdAt
updatedAt
metadata {
businessData {
key
value
}
eta
etd
jobNumber
pod
pol
}
}
}
Variables
{
"shipments": [
{ containerNumber: "TRHU8251254" },
{ containerNumber:"CSNU7092694", bol:"COSU6321888720", scac:"COSU" },
{ containerNumber:"FCIU5898000", scac:"COSU" },
{ bol: "HLCUDE12112BFHX0", scac: "HLCU"}
{ carrierBookingReference: "HLCUDE12112BFHX0", scac: "HLCU",
"metadata":{
"businessData":[
{ "key":"shipper", "value":"shipper_a"},
{ "key":"username", "value":"user_a"},
{ "key":"department", "value":"export" }
]}
]
}
Response
"data": {
"upsertTrackedShipments": [
{
"id": "621ca0a820912bbfa247733c",
"shipment": {
"id": "621b91af2f1868001359417d",
"carrierBookingReference": "HLCUDE12112BFHX0",
"containerNumber": "TRHU8251254",
"bol": null,
"scac": "ONEY",
"carrier": {
"code": "ONEY",
"shortName": "ONE",
"longName": "Ocean Network Express (ONE)",
"codeAliases": null
},
"container": {
"id": "61fc1758e2f878428f77a709",
"number": "TRHU8251254",
"isoCode": "42V0"
},
"status": {
"id": "621b91bb2f186800135941a0",
"events": [
{
"timestamps": {
"datetime": "2021-12-22T13:25:00.000Z",
"code": "ACT"
},
"voyage": null,
"utcOffset": "+0000",
"vessel": null,
"port": null
},
.
.
.
],
"estimatedArrivalAt": "2022-03-02T12:00:00.000Z",
"estimatedDepartureAt": null,
"actualArrivalAt": null,
"actualDepartureAt": "2022-01-03T07:04:00.000Z",
"currentEvent": {
"timestamps": {
"datetime": "2022-01-03T07:04:00.000Z",
"code": "ACT"
},
"voyage": "016E",
"utcOffset": "+0000",
"vessel": {
"name": "ALDAHNA EXPRESS",
"imo": 9708825,
"flag": "Liberia",
"class": "Cargo",
"mmsi": 636021271
},
"port": null
},
"milestones": [
{
"type": "POL",
"port": {
"properties": {
"name": "Southampton",
"country": "UnitedKingdom",
"locode": "GBSOU"
}
},
"utcOffset": "+0000",
"arrival": {
"vessel": {
"name": "ALDAHNA EXPRESS",
"imo": 9708825,
"flag": "Liberia",
"class": "Cargo",
"mmsi": 636021271
},
"voyage": "016E",
"timestamps": {
"carrier": {
"datetime": null,
"code": null
},
"predicted": {
"datetime": "2021-12-23T14:08:51.000Z",
"code": "ACT"
}
}
},
"departure": {
"vessel": {
"name": "ALDAHNA EXPRESS",
"imo": 9708825,
"flag": "Liberia",
"class": "Cargo",
"mmsi": 636021271
},
"voyage": "016E",
"timestamps": {
"carrier": {
"datetime": "2022-01-03T07:04:00.000Z",
"code": "ACT"
},
"predicted": {
"datetime": "2022-01-03T07:53:59.000Z",
"code": "ACT"
}
}
}
}
.
.
.
],
"pod": {
"properties": {
"name": "Nansha Port",
"country": "China",
"locode": "CNNSA"
}
},
"pol": {
"properties": {
"name": "Southampton",
"country": "UnitedKingdom",
"locode": "GBSOU"
}
},
"postPod": {
"properties": {
"name": "Guangzhou",
"country": "China",
"locode": "CNCAN"
}
}
}
},
"createdAt": "2022-02-28T10:15:04.648Z",
"updatedAt": "2022-02-28T10:15:04.648Z",
"metadata": null
},
.
.
.
]
}