Ocean
Allows authorized users to update an Ocean load. Please note, you will need to use the FourKites’ Internal Tracking ID, “loadId”, that was returned in the response from the Load Create API request. Read on to learn more.
If you receive a server error (5xx error code), please try again a few times. It's best to wait a little longer between each retry attempt. Try at least 3-5 times before giving up, as many server issues resolve themselves quickly.
Please wait at least 2 minutes after making an update before submitting another one.
There are two ways you can update an Ocean Load:
- If your load is created with stopReferenceId, you can use it to update the load by adding the stopReferenceId field under the stops object. An example is given below.
- If your load is created without stopReferenceId or the stopReferenceId is passed as empty, please do a Get Shipment API call to fetch the fourKitesStopID. You can then use the value of the fourKitesStopID as stopId under the stops object to start updating the load. An example is given below.
Rate Limit
1 request per second
Format Supported
JSON
Authenticated Resource
API Key
For more information on Authentication, click here.
The FourKites internal loadId that is returned during load creation should be added to the endpoint to update the load. Click on the load that you would like to update to get the FourKites Internal LoadId as shown in the image below.

curl --location --request PATCH 'https://api.fourkites.com/api/v1/tracking/420742096' \
--header 'Content-Type: application/json' \
--header 'apikey: REPLACE_KEY_VALUE' \
--data-raw '{
"trackingInfo": {
"driverPhone": "",
"truckNumber": "",
"vesselName": "",
"imo": "",
"mmsi": "",
"containerNumber": "OOLU4404637"
},
"containerInfo": {
"containerNumber": "OOLU4404637"
},
"load": {
"loadNumber": "stop_completion_1_Update_New",
"priority": "normal",
"operatingCarrierScac": null,
"carrierPermalink": "oceancarrier",
"products": [],
"bookingNumber": "",
"billOfLading": "GOA230437868",
"referenceNumbers": [],
"stops": [
{
"stopReferenceId": "INMAA",
"stopType": "portOfLoading",
"addressLine1": "501 W",
"city": "Chennai",
"state": "TN",
"country": "IN",
"wantTime": null,
"pallets": [
{
"number": "PAL-001",
"parts": [
{
"quantity": "25",
"shipperPartNumber": "22EE",
"weight": "7.998"
}
]
}
],
"productLineItems": [
{
"productId": "0123456",
"productName": "Ocean Freight Item",
"productDescription": "Ocean shipment item",
"productCategory": "General Freight",
"quantity": 25,
"measurementUnitCode": "PCE",
"netWeight": 44.8,
"weightUnit": "KGM",
"unitCost": 25.0,
"currencyCode": "USD",
"extendedCost": 625.00,
"freightCost": 20.00,
"additionalCharges": 5.00,
"tariffCost": 2.50,
"fourKitesCalculatedTariffCost": 2.50,
"totalLandedCost": 655.00,
"countryOfOrigin": "IN",
"harmonizedSystemCode": "8471499000",
"commodityTypeCode": "OCEAN_FREIGHT",
"htsusCode": "8471499000",
"orderNumber": "GOA230437868",
"deliveryNumber": "DN-INMAA",
"handlingUnitId": "PAL-001",
"barcode": "PAL001",
"containerType": "pallet",
"gtin": "00012345678905",
"customerPartNumber": "22EE",
"supplierPartNumber": "22EE",
"manufacturerPartNumber": "MFG-22EE",
"itemNumber": "ITM-22EE",
"productUpc": "012345678905",
"deliveryReferences": ["OOLU4404637"],
"orderReferences": ["GOA230437868"],
"brandName": "Generic Ocean Freight Co",
"minimumTemperature": 0,
"maximumTemperature": 0,
"temperatureUnitCode": "cel",
"labelIdentifier": "LBL-22EE",
"productTrackingNumber": "OCEAN-STOP-001",
"deviceType": "RFID_TAG"
}
]
}
]
}
}'import http.client
import json
conn = http.client.HTTPSConnection("api-staging.fourkites.com")
payload = json.dumps({
"trackingInfo": {
"driverPhone": "",
"truckNumber": "",
"vesselName": "",
"imo": "",
"mmsi": "",
"containerNumber": "OOLU4404637"
},
"containerInfo": {
"containerNumber": "OOLU4404637"
},
"load": {
"loadNumber": "stop_completion_1_Update_New",
"priority": "normal",
"operatingCarrierScac": None,
"carrierPermalink": "oceancarrier",
"products": [],
"bookingNumber": "",
"billOfLading": "GOA230437868",
"referenceNumbers": [],
"stops": [
{
"stopReferenceId": "INMAA",
"stopType": "portOfLoading",
"addressLine1": "501 W",
"city": "Chennai",
"state": "TN",
"country": "IN",
"wantTime": None,
"pallets": [
{
"number": "PAL-001",
"parts": [
{
"quantity": "25",
"shipperPartNumber": "22EE",
"weight": "7.998"
}
]
}
],
"productLineItems": [
{
"productId": "0123456",
"productName": "Ocean Freight Item",
"productDescription": "Ocean shipment item",
"productCategory": "General Freight",
"quantity": 25,
"measurementUnitCode": "PCE",
"netWeight": 44.8,
"weightUnit": "KGM",
"unitCost": 25.0,
"currencyCode": "USD",
"extendedCost": 625.00,
"freightCost": 20.00,
"additionalCharges": 5.00,
"tariffCost": 2.50,
"fourKitesCalculatedTariffCost": 2.50,
"totalLandedCost": 655.00,
"countryOfOrigin": "IN",
"harmonizedSystemCode": "8471499000",
"commodityTypeCode": "OCEAN_FREIGHT",
"htsusCode": "8471499000",
"orderNumber": "GOA230437868",
"deliveryNumber": "DN-INMAA",
"handlingUnitId": "PAL-001",
"barcode": "PAL001",
"containerType": "pallet",
"gtin": "00012345678905",
"customerPartNumber": "22EE",
"supplierPartNumber": "22EE",
"manufacturerPartNumber": "MFG-22EE",
"itemNumber": "ITM-22EE",
"productUpc": "012345678905",
"deliveryReferences": ["OOLU4404637"],
"orderReferences": ["GOA230437868"],
"brandName": "Generic Ocean Freight Co",
"minimumTemperature": 0,
"maximumTemperature": 0,
"temperatureUnitCode": "cel",
"labelIdentifier": "LBL-22EE",
"productTrackingNumber": "OCEAN-STOP-001",
"deviceType": "RFID_TAG"
}
]
}
]
}
})
headers = {
'Content-Type': 'application/json',
'apikey': 'REPLACE_KEY_VALUE'
}
conn.request("PATCH", "/api/v1/tracking/420742096", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))curl --location --request PATCH 'https://api.fourkites.com/api/v1/tracking/420295963' \
--header 'Content-Type: application/json' \
--header 'apikey: REPLACE_KEY_VALUE' \
--data-raw '{
"trackingInfo": {
"driverPhone": "",
"truckNumber": "",
"vesselName": "",
"imo": "",
"mmsi": "",
"containerNumber": "OOLU4404637"
},
"containerInfo": {
"containerNumber": "OOLU4404637"
},
"load": {
"loadNumber": "stop_completion_1_Update_New1",
"priority": "normal",
"operatingCarrierScac": null,
"carrierPermalink": "oceancarrier",
"products": [],
"bookingNumber": "",
"billOfLading": "GOA230437868",
"referenceNumbers": [],
"stops": [
{
"stopId": "1112443717",
"addressLine1": "501 W",
"city": "Chennai",
"state": "TN",
"country": "IN",
"wantTime": null,
"pallets": [
{
"number": "PAL-001",
"parts": [
{
"quantity": "25",
"shipperPartNumber": "22EE",
"weight": "7.998"
}
]
}
],
"productLineItems": [
{
"productId": "0123456",
"productName": "Ocean Freight Item",
"productDescription": "Ocean shipment item",
"productCategory": "General Freight",
"quantity": 25,
"measurementUnitCode": "PCE",
"netWeight": 44.8,
"weightUnit": "KGM",
"unitCost": 25.0,
"currencyCode": "USD",
"extendedCost": 625.00,
"freightCost": 20.00,
"additionalCharges": 5.00,
"tariffCost": 2.50,
"fourKitesCalculatedTariffCost": 2.50,
"totalLandedCost": 655.00,
"countryOfOrigin": "IN",
"harmonizedSystemCode": "8471499000",
"commodityTypeCode": "OCEAN_FREIGHT",
"htsusCode": "8471499000",
"orderNumber": "GOA230437868",
"deliveryNumber": "DN-INMAA",
"handlingUnitId": "PAL-001",
"barcode": "PAL001",
"containerType": "pallet",
"gtin": "00012345678905",
"customerPartNumber": "22EE",
"supplierPartNumber": "22EE",
"manufacturerPartNumber": "MFG-22EE",
"itemNumber": "ITM-22EE",
"productUpc": "012345678905",
"deliveryReferences": ["OOLU4404637"],
"orderReferences": ["GOA230437868"],
"brandName": "Generic Ocean Freight Co",
"minimumTemperature": 0,
"maximumTemperature": 0,
"temperatureUnitCode": "cel",
"labelIdentifier": "LBL-22EE",
"productTrackingNumber": "OCEAN-STOP-001",
"deviceType": "RFID_TAG"
}
]
}
]
}
}'import http.client
import json
conn = http.client.HTTPSConnection("api-staging.fourkites.com")
payload = json.dumps({
"trackingInfo": {
"driverPhone": "",
"truckNumber": "",
"vesselName": "",
"imo": "",
"mmsi": "",
"containerNumber": "OOLU4404637"
},
"containerInfo": {
"containerNumber": "OOLU4404637"
},
"load": {
"loadNumber": "stop_completion_1_Update_New1",
"priority": "normal",
"operatingCarrierScac": None,
"carrierPermalink": "oceancarrier",
"products": [],
"bookingNumber": "",
"billOfLading": "GOA230437868",
"referenceNumbers": [],
"stops": [
{
"stopId": "1112443717",
"addressLine1": "501 W",
"city": "Chennai",
"state": "TN",
"country": "IN",
"wantTime": None,
"pallets": [
{
"number": "PAL-001",
"parts": [
{
"quantity": "25",
"shipperPartNumber": "22EE",
"weight": "7.998"
}
]
}
],
"productLineItems": [
{
"productId": "0123456",
"productName": "Ocean Freight Item",
"productDescription": "Ocean shipment item",
"productCategory": "General Freight",
"quantity": 25,
"measurementUnitCode": "PCE",
"netWeight": 44.8,
"weightUnit": "KGM",
"unitCost": 25.0,
"currencyCode": "USD",
"extendedCost": 625.00,
"freightCost": 20.00,
"additionalCharges": 5.00,
"tariffCost": 2.50,
"fourKitesCalculatedTariffCost": 2.50,
"totalLandedCost": 655.00,
"countryOfOrigin": "IN",
"harmonizedSystemCode": "8471499000",
"commodityTypeCode": "OCEAN_FREIGHT",
"htsusCode": "8471499000",
"orderNumber": "GOA230437868",
"deliveryNumber": "DN-INMAA",
"handlingUnitId": "PAL-001",
"barcode": "PAL001",
"containerType": "pallet",
"gtin": "00012345678905",
"customerPartNumber": "22EE",
"supplierPartNumber": "22EE",
"manufacturerPartNumber": "MFG-22EE",
"itemNumber": "ITM-22EE",
"productUpc": "012345678905",
"deliveryReferences": ["OOLU4404637"],
"orderReferences": ["GOA230437868"],
"brandName": "Generic Ocean Freight Co",
"minimumTemperature": 0,
"maximumTemperature": 0,
"temperatureUnitCode": "cel",
"labelIdentifier": "LBL-22EE",
"productTrackingNumber": "OCEAN-STOP-001",
"deviceType": "RFID_TAG"
}
]
}
]
}
})
headers = {
'Content-Type': 'application/json',
'apikey': 'SPORD36GQF16LDMS89WRF2WQE6RH6',
'SPORD36GQF16LDMS89WRF2WQE6RH6': ''
}
conn.request("PATCH", "/api/v1/tracking/420295963", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))