upsertTrackedShipment

Register shipment for future tracking.

Arguments

ArgumentTypeDescription
shipments[TrackedShipmentInput!]!The shipments' identification credentials and the data to update.

TrackedShipmentInput Fields

FieldTypeDescription
bolBOLThe 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.
containerNumberContainerNumberThe container of the shipment to be tracked.
customerCustomerInputThe details of the customer of the shipment to be tracked.
masterShipmentMasterShipmentInputThe details of the master shipment of the shipment to be tracked.
metadataTrackedShipmentMetadataInputThe metadata of the shipment to be tracked.
scacSCACThe shipment Standard Carrier Alpha Code of the shipment to be tracked.
shipmentIdObjectIdThe shipment ID of the shipment to be tracked.
shipmentsUploadIdObjectIdThe shipment upload ID of the shipment to be tracked.

Return

NameDescription
[TrackedShipment!]!The registered shipment's data and metadata.

TrackedShipment Fields

FieldTypeDescription
createdAtDateTime!Shipment's tracking start timestamp.
idObjectId!Unique Windward assigned shipment ID.
metadataTrackedShipmentMetadataAdditional metadata updated by the user.
shipmentShipmentContains all the information on the shipment.
updatedAtDateTime!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
     },
      .
      .
      .      
  ]
}