Create Shipment with Pallets
2 min
Create a load with pallets at one or both of the stops. Pallets are optional and are used for view-only purposes in FourKites products. Please see the Field Definitions above for more information.
HEADERS
apikey | TEST_KEY API key generated on the FourKites developer portal |
|---|
Production
POST
https://api.fourkites.com/api/v1/tracking
Body Parameters
- trackingInfoobjectDescription
- driverPhonestringDescription
- trailerNumberstringDescription
- loadobjectDescription
- loadNumberstringrequiredDescription
- nonTrackablestringDescription
- prioritystringDescription
- originalScacstringDescription
- carrierPermalinkstringDescription
- carrierNamestringDescription
- tagsarrayrequiredDescription
- productsobjectDescription
- referenceNumbersarrayDescription
- stopsobjectDescription
- stopTypestringDescription
- stopReferenceIdstringDescription
- customerobjectDescription
- idstringDescription
- poNumbersstringDescription
- completeAddressstringDescription
- addressLine1stringrequiredDescription
- citystringrequiredDescription
- statestringrequiredDescription
- countystringDescription
- loadingTypestringDescription
- countrystringrequiredDescription
- postalCodestringrequiredDescription
- latitudestringDescription
- longitudestringDescription
- geofencePointsarrayDescription
- appointmentTimestringrequiredDescription
- wantTimestringDescription
- earliestWantTimestringrequiredDescription
- latestWantTimestringrequiredDescription
- transportationModestringDescription
- palletsobjectDescription
- numberstringDescription
- partsobjectDescription
- customerPartNumberstringDescription
- quantitystringDescription
- shipperPartNumberstringDescription
- weightstringDescription
- descriptionstringDescription
curl
curl --location --request POST 'https://api.fourkites.com/api/v1/tracking' \
--header 'Content-Type: application/json' \
--header 'apikey: REPLACE_KEY_VALUE' \
--data-raw '{
"trackingInfo": {
"driverPhone": "",
"trailerNumber": "2106030123"
},
"load": {
"loadNumber": "Test-appointment",
"nonTrackable": false,
"priority": "hot",
"originalScac": "csapitl",
"carrierPermalink": "carrierseranew",
"carrierName": "carrierseranew",
"tags": [],
"shipper": null,
"products": [],
"referenceNumbers": [
"2256492",
"ProductType: Bulk"
],
"stops": [
{
"stopType": "delivery",
"stopReferenceId": "xyz",
"customer": {
"id": "customer-company-6439",
"poNumbers": [
"po-pickup-1"
]
},
"completeAddress": "976 County Road 394, Delphos, KS, US",
"addressLine1": "976 County Road 394",
"city": "Delphos",
"state": "KS",
"county": "Cloud",
"loadingType": "Drop-HOOK",
"country": "US",
"postalCode": "67436",
"latitude": 39.31831267307849,
"longitude": -97.7440669937134,
"geofencePoints": [],
"appointmentTime": "2024-12-23T20:00:00.000Z",
"wantTime": null,
"earliestWantTime": null,
"latestWantTime": null,
"transportationMode": "truck",
"addressType": "",
"useLocalLatLng": true,
"pallets": [
{
"number": 1,
"parts": [
{
"customerPartNumber": "Mat1",
"quantity": 1000,
"shipperPartNumber": "Mat1",
"weight": "3072.0 LB",
"description": "Hello, This is description of Mat1"
}
]
}
]
},
{
"stopType": "pickup",
"stopReferenceId": "abc",
"customer": {
"id": "customer-company-6439",
"originalCustomerId": "",
"poNumbers": [
"po-delivery-1",
"po-delivery-2"
]
},
"name": "CypressSt",
"loadingType": "drop-hook",
"externalAddressId": "ZACHARY",
"completeAddress": null,
"addressLine1": null,
"city": null,
"state": null,
"country": null,
"postalCode": null,
"latitude": null,
"longitude": null,
"geofencePoints": [],
"appointmentTime": "2024-12-13T20:00:00.000Z",
"wantTime": "2024-12-30T20:00:00.000Z",
"earliestWantTime": null,
"latestWantTime": null,
"transportationMode": "Air",
"addressType": "",
"useLocalLatLng": true,
"pallets": [
{
"number": 1,
"parts": [
{
"customerPartNumber": "Mat2",
"quantity": 10,
"shipperPartNumber": "Mat2",
"weight": "3072.0 LB",
"description": "Hello, This is description of Mat2"
}
]
}
]
}
]
},
"simpleUpdate": true
}'java
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"trackingInfo\": {\n \"driverPhone\": \"\",\n \"trailerNumber\": \"2106030123\"\n },\n \"load\": {\n \"loadNumber\": \"Test-appointment\",\n \"nonTrackable\": false,\n \"priority\": \"hot\",\n \"originalScac\": \"csapitl\",\n \"carrierPermalink\": \"carrierseranew\",\n \"carrierName\": \"carrierseranew\",\n \"tags\": [],\n \"shipper\": null,\n \"products\": [],\n \"referenceNumbers\": [\n \"2256492\",\n \"ProductType: Bulk\"\n ],\n \"stops\": [\n {\n \"stopType\": \"delivery\",\n \"stopReferenceId\": \"xyz\",\n \"customer\": {\n \"id\": \"customer-company-6439\",\n \"poNumbers\": [\n \"po-pickup-1\"\n ]\n },\n \"completeAddress\": \"976 County Road 394, Delphos, KS, US\",\n \"addressLine1\": \"976 County Road 394\",\n \"city\": \"Delphos\",\n \"state\": \"KS\",\n \"county\": \"Cloud\",\n \"loadingType\": \"Drop-HOOK\",\n \"country\": \"US\",\n \"postalCode\": \"67436\",\n \"latitude\": 39.31831267307849,\n \"longitude\": -97.7440669937134,\n \"geofencePoints\": [],\n \"appointmentTime\": \"2024-12-23T20:00:00.000Z\",\n \"wantTime\": null,\n \"earliestWantTime\": null,\n \"latestWantTime\": null,\n \"transportationMode\": \"truck\",\n \"addressType\": \"\",\n \"useLocalLatLng\": true,\n \"pallets\": [\n {\n \"number\": 1,\n \"parts\": [\n {\n \"customerPartNumber\": \"Mat1\",\n \"quantity\": 1000,\n \"shipperPartNumber\": \"Mat1\",\n \"weight\": \"3072.0 LB\",\n \"description\": \"Hello, This is description of Mat1\"\n }\n ]\n }\n ]\n },\n {\n \"stopType\": \"pickup\",\n \"stopReferenceId\": \"abc\",\n \"customer\": {\n \"id\": \"customer-company-6439\",\n \"originalCustomerId\": \"\",\n \"poNumbers\": [\n \"po-delivery-1\",\n \"po-delivery-2\"\n ]\n },\n \"name\": \"CypressSt\",\n \"loadingType\": \"drop-hook\",\n \"externalAddressId\": \"ZACHARY\",\n \"completeAddress\": null,\n \"addressLine1\": null,\n \"city\": null,\n \"state\": null,\n \"country\": null,\n \"postalCode\": null,\n \"latitude\": null,\n \"longitude\": null,\n \"geofencePoints\": [],\n \"appointmentTime\": \"2024-12-13T20:00:00.000Z\",\n \"wantTime\": \"2024-12-30T20:00:00.000Z\",\n \"earliestWantTime\": null,\n \"latestWantTime\": null,\n \"transportationMode\": \"Air\",\n \"addressType\": \"\",\n \"useLocalLatLng\": true,\n \"pallets\": [\n {\n \"number\": 1,\n \"parts\": [\n {\n \"customerPartNumber\": \"Mat2\",\n \"quantity\": 10,\n \"shipperPartNumber\": \"Mat2\",\n \"weight\": \"3072.0 LB\",\n \"description\": \"Hello, This is description of Mat2\"\n }\n ]\n }\n ]\n }\n ]\n },\n \"simpleUpdate\": true\n}");
Request request = new Request.Builder()
.url("https://api.fourkites.com/api/v1/tracking")
.method("POST", body)
.addHeader("Content-Type", "application/json")
.addHeader("apikey", "REPLACE_KEY_VALUE")
.build();
Response response = client.newCall(request).execute();javascript
var settings = {
"url": "https://api.fourkites.com/api/v1/tracking",
"method": "POST",
"timeout": 0,
"headers": {
"Content-Type": "application/json",
"apikey": "REPLACE_KEY_VALUE"
},
"data": JSON.stringify({
"trackingInfo": {
"driverPhone": "",
"trailerNumber": "2106030123"
},
"load": {
"loadNumber": "Test-appointment",
"nonTrackable": false,
"priority": "hot",
"originalScac": "csapitl",
"carrierPermalink": "carrierseranew",
"carrierName": "carrierseranew",
"tags": [],
"shipper": null,
"products": [],
"referenceNumbers": [
"2256492",
"ProductType: Bulk"
],
"stops": [
{
"stopType": "delivery",
"stopReferenceId": "xyz",
"customer": {
"id": "customer-company-6439",
"poNumbers": [
"po-pickup-1"
]
},
"completeAddress": "976 County Road 394, Delphos, KS, US",
"addressLine1": "976 County Road 394",
"city": "Delphos",
"state": "KS",
"county": "Cloud",
"loadingType": "Drop-HOOK",
"country": "US",
"postalCode": "67436",
"latitude": 39.31831267307849,
"longitude": -97.7440669937134,
"geofencePoints": [],
"appointmentTime": "2024-12-23T20:00:00.000Z",
"wantTime": null,
"earliestWantTime": null,
"latestWantTime": null,
"transportationMode": "truck",
"addressType": "",
"useLocalLatLng": true,
"pallets": [
{
"number": 1,
"parts": [
{
"customerPartNumber": "Mat1",
"quantity": 1000,
"shipperPartNumber": "Mat1",
"weight": "3072.0 LB",
"description": "Hello, This is description of Mat1"
}
]
}
]
},
{
"stopType": "pickup",
"stopReferenceId": "abc",
"customer": {
"id": "customer-company-6439",
"originalCustomerId": "",
"poNumbers": [
"po-delivery-1",
"po-delivery-2"
]
},
"name": "CypressSt",
"loadingType": "drop-hook",
"externalAddressId": "ZACHARY",
"completeAddress": null,
"addressLine1": null,
"city": null,
"state": null,
"country": null,
"postalCode": null,
"latitude": null,
"longitude": null,
"geofencePoints": [],
"appointmentTime": "2024-12-13T20:00:00.000Z",
"wantTime": "2024-12-30T20:00:00.000Z",
"earliestWantTime": null,
"latestWantTime": null,
"transportationMode": "Air",
"addressType": "",
"useLocalLatLng": true,
"pallets": [
{
"number": 1,
"parts": [
{
"customerPartNumber": "Mat2",
"quantity": 10,
"shipperPartNumber": "Mat2",
"weight": "3072.0 LB",
"description": "Hello, This is description of Mat2"
}
]
}
]
}
]
},
"simpleUpdate": true
}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});swift
import Foundation
#if canImport(FoundationNetworking)
import FoundationNetworking
#endif
var semaphore = DispatchSemaphore (value: 0)
let parameters = "{\n \"trackingInfo\": {\n \"driverPhone\": \"\",\n \"trailerNumber\": \"2106030123\"\n },\n \"load\": {\n \"loadNumber\": \"Test-appointment\",\n \"nonTrackable\": false,\n \"priority\": \"hot\",\n \"originalScac\": \"csapitl\",\n \"carrierPermalink\": \"carrierseranew\",\n \"carrierName\": \"carrierseranew\",\n \"tags\": [],\n \"shipper\": null,\n \"products\": [],\n \"referenceNumbers\": [\n \"2256492\",\n \"ProductType: Bulk\"\n ],\n \"stops\": [\n {\n \"stopType\": \"delivery\",\n \"stopReferenceId\": \"xyz\",\n \"customer\": {\n \"id\": \"customer-company-6439\",\n \"poNumbers\": [\n \"po-pickup-1\"\n ]\n },\n \"completeAddress\": \"976 County Road 394, Delphos, KS, US\",\n \"addressLine1\": \"976 County Road 394\",\n \"city\": \"Delphos\",\n \"state\": \"KS\",\n \"county\": \"Cloud\",\n \"loadingType\": \"Drop-HOOK\",\n \"country\": \"US\",\n \"postalCode\": \"67436\",\n \"latitude\": 39.31831267307849,\n \"longitude\": -97.7440669937134,\n \"geofencePoints\": [],\n \"appointmentTime\": \"2024-12-23T20:00:00.000Z\",\n \"wantTime\": null,\n \"earliestWantTime\": null,\n \"latestWantTime\": null,\n \"transportationMode\": \"truck\",\n \"addressType\": \"\",\n \"useLocalLatLng\": true,\n \"pallets\": [\n {\n \"number\": 1,\n \"parts\": [\n {\n \"customerPartNumber\": \"Mat1\",\n \"quantity\": 1000,\n \"shipperPartNumber\": \"Mat1\",\n \"weight\": \"3072.0 LB\",\n \"description\": \"Hello, This is description of Mat1\"\n }\n ]\n }\n ]\n },\n {\n \"stopType\": \"pickup\",\n \"stopReferenceId\": \"abc\",\n \"customer\": {\n \"id\": \"customer-company-6439\",\n \"originalCustomerId\": \"\",\n \"poNumbers\": [\n \"po-delivery-1\",\n \"po-delivery-2\"\n ]\n },\n \"name\": \"CypressSt\",\n \"loadingType\": \"drop-hook\",\n \"externalAddressId\": \"ZACHARY\",\n \"completeAddress\": null,\n \"addressLine1\": null,\n \"city\": null,\n \"state\": null,\n \"country\": null,\n \"postalCode\": null,\n \"latitude\": null,\n \"longitude\": null,\n \"geofencePoints\": [],\n \"appointmentTime\": \"2024-12-13T20:00:00.000Z\",\n \"wantTime\": \"2024-12-30T20:00:00.000Z\",\n \"earliestWantTime\": null,\n \"latestWantTime\": null,\n \"transportationMode\": \"Air\",\n \"addressType\": \"\",\n \"useLocalLatLng\": true,\n \"pallets\": [\n {\n \"number\": 1,\n \"parts\": [\n {\n \"customerPartNumber\": \"Mat2\",\n \"quantity\": 10,\n \"shipperPartNumber\": \"Mat2\",\n \"weight\": \"3072.0 LB\",\n \"description\": \"Hello, This is description of Mat2\"\n }\n ]\n }\n ]\n }\n ]\n },\n \"simpleUpdate\": true\n}"
let postData = parameters.data(using: .utf8)
var request = URLRequest(url: URL(string: "https://api.fourkites.com/api/v1/tracking")!,timeoutInterval: Double.infinity)
request.addValue("application/json", forHTTPHeaderField: "Content-Type")
request.addValue("REPLACE_KEY_VALUE", forHTTPHeaderField: "apikey")
request.httpMethod = "POST"
request.httpBody = postData
let task = URLSession.shared.dataTask(with: request) { data, response, error in
guard let data = data else {
print(String(describing: error))
semaphore.signal()
return
}
print(String(data: data, encoding: .utf8)!)
semaphore.signal()
}
task.resume()
semaphore.wait()
csharp
var client = new RestClient("https://api.fourkites.com/api/v1/tracking");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("apikey", "REPLACE_KEY_VALUE");
var body = @"{" + "\n" +
@" ""trackingInfo"": {" + "\n" +
@" ""driverPhone"": """"," + "\n" +
@" ""trailerNumber"": ""2106030123""" + "\n" +
@" }," + "\n" +
@" ""load"": {" + "\n" +
@" ""loadNumber"": ""Test-appointment""," + "\n" +
@" ""nonTrackable"": false," + "\n" +
@" ""priority"": ""hot""," + "\n" +
@" ""originalScac"": ""csapitl""," + "\n" +
@" ""carrierPermalink"": ""carrierseranew""," + "\n" +
@" ""carrierName"": ""carrierseranew""," + "\n" +
@" ""tags"": []," + "\n" +
@" ""shipper"": null," + "\n" +
@" ""products"": []," + "\n" +
@" ""referenceNumbers"": [" + "\n" +
@" ""2256492""," + "\n" +
@" ""ProductType: Bulk""" + "\n" +
@" ]," + "\n" +
@" ""stops"": [" + "\n" +
@" {" + "\n" +
@" ""stopType"": ""delivery""," + "\n" +
@" ""stopReferenceId"": ""xyz""," + "\n" +
@" ""customer"": {" + "\n" +
@" ""id"": ""customer-company-6439""," + "\n" +
@" ""poNumbers"": [" + "\n" +
@" ""po-pickup-1""" + "\n" +
@" ]" + "\n" +
@" }," + "\n" +
@" ""completeAddress"": ""976 County Road 394, Delphos, KS, US""," + "\n" +
@" ""addressLine1"": ""976 County Road 394""," + "\n" +
@" ""city"": ""Delphos""," + "\n" +
@" ""state"": ""KS""," + "\n" +
@" ""county"": ""Cloud""," + "\n" +
@" ""loadingType"": ""Drop-HOOK""," + "\n" +
@" ""country"": ""US""," + "\n" +
@" ""postalCode"": ""67436""," + "\n" +
@" ""latitude"": 39.31831267307849," + "\n" +
@" ""longitude"": -97.7440669937134," + "\n" +
@" ""geofencePoints"": []," + "\n" +
@" ""appointmentTime"": ""2024-12-23T20:00:00.000Z""," + "\n" +
@" ""wantTime"": null," + "\n" +
@" ""earliestWantTime"": null," + "\n" +
@" ""latestWantTime"": null," + "\n" +
@" ""transportationMode"": ""truck""," + "\n" +
@" ""addressType"": """"," + "\n" +
@" ""useLocalLatLng"": true," + "\n" +
@" ""pallets"": [" + "\n" +
@" {" + "\n" +
@" ""number"": 1," + "\n" +
@" ""parts"": [" + "\n" +
@" {" + "\n" +
@" ""customerPartNumber"": ""Mat1""," + "\n" +
@" ""quantity"": 1000," + "\n" +
@" ""shipperPartNumber"": ""Mat1""," + "\n" +
@" ""weight"": ""3072.0 LB""," + "\n" +
@" ""description"": ""Hello, This is description of Mat1""" + "\n" +
@" }" + "\n" +
@" ]" + "\n" +
@" }" + "\n" +
@" ]" + "\n" +
@" }," + "\n" +
@" {" + "\n" +
@" ""stopType"": ""pickup""," + "\n" +
@" ""stopReferenceId"": ""abc""," + "\n" +
@" ""customer"": {" + "\n" +
@" ""id"": ""customer-company-6439""," + "\n" +
@" ""originalCustomerId"": """"," + "\n" +
@" ""poNumbers"": [" + "\n" +
@" ""po-delivery-1""," + "\n" +
@" ""po-delivery-2""" + "\n" +
@" ]" + "\n" +
@" }," + "\n" +
@" ""name"": ""CypressSt""," + "\n" +
@" ""loadingType"": ""drop-hook""," + "\n" +
@" ""externalAddressId"": ""ZACHARY""," + "\n" +
@" ""completeAddress"": null," + "\n" +
@" ""addressLine1"": null," + "\n" +
@" ""city"": null," + "\n" +
@" ""state"": null," + "\n" +
@" ""country"": null," + "\n" +
@" ""postalCode"": null," + "\n" +
@" ""latitude"": null," + "\n" +
@" ""longitude"": null," + "\n" +
@" ""geofencePoints"": []," + "\n" +
@" ""appointmentTime"": ""2024-12-13T20:00:00.000Z""," + "\n" +
@" ""wantTime"": ""2024-12-30T20:00:00.000Z""," + "\n" +
@" ""earliestWantTime"": null," + "\n" +
@" ""latestWantTime"": null," + "\n" +
@" ""transportationMode"": ""Air""," + "\n" +
@" ""addressType"": """"," + "\n" +
@" ""useLocalLatLng"": true," + "\n" +
@" ""pallets"": [" + "\n" +
@" {" + "\n" +
@" ""number"": 1," + "\n" +
@" ""parts"": [" + "\n" +
@" {" + "\n" +
@" ""customerPartNumber"": ""Mat2""," + "\n" +
@" ""quantity"": 10," + "\n" +
@" ""shipperPartNumber"": ""Mat2""," + "\n" +
@" ""weight"": ""3072.0 LB""," + "\n" +
@" ""description"": ""Hello, This is description of Mat2""" + "\n" +
@" }" + "\n" +
@" ]" + "\n" +
@" }" + "\n" +
@" ]" + "\n" +
@" }" + "\n" +
@" ]" + "\n" +
@" }," + "\n" +
@" ""simpleUpdate"": true" + "\n" +
@"}";
request.AddParameter("application/json", body, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);go
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.fourkites.com/api/v1/tracking"
method := "POST"
payload := strings.NewReader(`{
"trackingInfo": {
"driverPhone": "",
"trailerNumber": "2106030123"
},
"load": {
"loadNumber": "Test-appointment",
"nonTrackable": false,
"priority": "hot",
"originalScac": "csapitl",
"carrierPermalink": "carrierseranew",
"carrierName": "carrierseranew",
"tags": [],
"shipper": null,
"products": [],
"referenceNumbers": [
"2256492",
"ProductType: Bulk"
],
"stops": [
{
"stopType": "delivery",
"stopReferenceId": "xyz",
"customer": {
"id": "customer-company-6439",
"poNumbers": [
"po-pickup-1"
]
},
"completeAddress": "976 County Road 394, Delphos, KS, US",
"addressLine1": "976 County Road 394",
"city": "Delphos",
"state": "KS",
"county": "Cloud",
"loadingType": "Drop-HOOK",
"country": "US",
"postalCode": "67436",
"latitude": 39.31831267307849,
"longitude": -97.7440669937134,
"geofencePoints": [],
"appointmentTime": "2024-12-23T20:00:00.000Z",
"wantTime": null,
"earliestWantTime": null,
"latestWantTime": null,
"transportationMode": "truck",
"addressType": "",
"useLocalLatLng": true,
"pallets": [
{
"number": 1,
"parts": [
{
"customerPartNumber": "Mat1",
"quantity": 1000,
"shipperPartNumber": "Mat1",
"weight": "3072.0 LB",
"description": "Hello, This is description of Mat1"
}
]
}
]
},
{
"stopType": "pickup",
"stopReferenceId": "abc",
"customer": {
"id": "customer-company-6439",
"originalCustomerId": "",
"poNumbers": [
"po-delivery-1",
"po-delivery-2"
]
},
"name": "CypressSt",
"loadingType": "drop-hook",
"externalAddressId": "ZACHARY",
"completeAddress": null,
"addressLine1": null,
"city": null,
"state": null,
"country": null,
"postalCode": null,
"latitude": null,
"longitude": null,
"geofencePoints": [],
"appointmentTime": "2024-12-13T20:00:00.000Z",
"wantTime": "2024-12-30T20:00:00.000Z",
"earliestWantTime": null,
"latestWantTime": null,
"transportationMode": "Air",
"addressType": "",
"useLocalLatLng": true,
"pallets": [
{
"number": 1,
"parts": [
{
"customerPartNumber": "Mat2",
"quantity": 10,
"shipperPartNumber": "Mat2",
"weight": "3072.0 LB",
"description": "Hello, This is description of Mat2"
}
]
}
]
}
]
},
"simpleUpdate": true
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
req.Header.Add("apikey", "REPLACE_KEY_VALUE")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}ruby
require "uri"
require "json"
require "net/http"
url = URI("https://api.fourkites.com/api/v1/tracking")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request["apikey"] = "REPLACE_KEY_VALUE"
request.body = JSON.dump({
"trackingInfo": {
"driverPhone": "",
"trailerNumber": "2106030123"
},
"load": {
"loadNumber": "Test-appointment",
"nonTrackable": false,
"priority": "hot",
"originalScac": "csapitl",
"carrierPermalink": "carrierseranew",
"carrierName": "carrierseranew",
"tags": [],
"shipper": nil,
"products": [],
"referenceNumbers": [
"2256492",
"ProductType: Bulk"
],
"stops": [
{
"stopType": "delivery",
"stopReferenceId": "xyz",
"customer": {
"id": "customer-company-6439",
"poNumbers": [
"po-pickup-1"
]
},
"completeAddress": "976 County Road 394, Delphos, KS, US",
"addressLine1": "976 County Road 394",
"city": "Delphos",
"state": "KS",
"county": "Cloud",
"loadingType": "Drop-HOOK",
"country": "US",
"postalCode": "67436",
"latitude": 39.31831267307849,
"longitude": -97.7440669937134,
"geofencePoints": [],
"appointmentTime": "2024-12-23T20:00:00.000Z",
"wantTime": nil,
"earliestWantTime": nil,
"latestWantTime": nil,
"transportationMode": "truck",
"addressType": "",
"useLocalLatLng": true,
"pallets": [
{
"number": 1,
"parts": [
{
"customerPartNumber": "Mat1",
"quantity": 1000,
"shipperPartNumber": "Mat1",
"weight": "3072.0 LB",
"description": "Hello, This is description of Mat1"
}
]
}
]
},
{
"stopType": "pickup",
"stopReferenceId": "abc",
"customer": {
"id": "customer-company-6439",
"originalCustomerId": "",
"poNumbers": [
"po-delivery-1",
"po-delivery-2"
]
},
"name": "CypressSt",
"loadingType": "drop-hook",
"externalAddressId": "ZACHARY",
"completeAddress": nil,
"addressLine1": nil,
"city": nil,
"state": nil,
"country": nil,
"postalCode": nil,
"latitude": nil,
"longitude": nil,
"geofencePoints": [],
"appointmentTime": "2024-12-13T20:00:00.000Z",
"wantTime": "2024-12-30T20:00:00.000Z",
"earliestWantTime": nil,
"latestWantTime": nil,
"transportationMode": "Air",
"addressType": "",
"useLocalLatLng": true,
"pallets": [
{
"number": 1,
"parts": [
{
"customerPartNumber": "Mat2",
"quantity": 10,
"shipperPartNumber": "Mat2",
"weight": "3072.0 LB",
"description": "Hello, This is description of Mat2"
}
]
}
]
}
]
},
"simpleUpdate": true
})
response = https.request(request)
puts response.read_body
python
import http.client
import json
conn = http.client.HTTPSConnection("api.fourkites.com")
payload = json.dumps({
"trackingInfo": {
"driverPhone": "",
"trailerNumber": "2106030123"
},
"load": {
"loadNumber": "Test-appointment",
"nonTrackable": False,
"priority": "hot",
"originalScac": "csapitl",
"carrierPermalink": "carrierseranew",
"carrierName": "carrierseranew",
"tags": [],
"shipper": None,
"products": [],
"referenceNumbers": [
"2256492",
"ProductType: Bulk"
],
"stops": [
{
"stopType": "delivery",
"stopReferenceId": "xyz",
"customer": {
"id": "customer-company-6439",
"poNumbers": [
"po-pickup-1"
]
},
"completeAddress": "976 County Road 394, Delphos, KS, US",
"addressLine1": "976 County Road 394",
"city": "Delphos",
"state": "KS",
"county": "Cloud",
"loadingType": "Drop-HOOK",
"country": "US",
"postalCode": "67436",
"latitude": 39.31831267307849,
"longitude": -97.7440669937134,
"geofencePoints": [],
"appointmentTime": "2024-12-23T20:00:00.000Z",
"wantTime": None,
"earliestWantTime": None,
"latestWantTime": None,
"transportationMode": "truck",
"addressType": "",
"useLocalLatLng": True,
"pallets": [
{
"number": 1,
"parts": [
{
"customerPartNumber": "Mat1",
"quantity": 1000,
"shipperPartNumber": "Mat1",
"weight": "3072.0 LB",
"description": "Hello, This is description of Mat1"
}
]
}
]
},
{
"stopType": "pickup",
"stopReferenceId": "abc",
"customer": {
"id": "customer-company-6439",
"originalCustomerId": "",
"poNumbers": [
"po-delivery-1",
"po-delivery-2"
]
},
"name": "CypressSt",
"loadingType": "drop-hook",
"externalAddressId": "ZACHARY",
"completeAddress": None,
"addressLine1": None,
"city": None,
"state": None,
"country": None,
"postalCode": None,
"latitude": None,
"longitude": None,
"geofencePoints": [],
"appointmentTime": "2024-12-13T20:00:00.000Z",
"wantTime": "2024-12-30T20:00:00.000Z",
"earliestWantTime": None,
"latestWantTime": None,
"transportationMode": "Air",
"addressType": "",
"useLocalLatLng": True,
"pallets": [
{
"number": 1,
"parts": [
{
"customerPartNumber": "Mat2",
"quantity": 10,
"shipperPartNumber": "Mat2",
"weight": "3072.0 LB",
"description": "Hello, This is description of Mat2"
}
]
}
]
}
]
},
"simpleUpdate": True
})
headers = {
'Content-Type': 'application/json',
'apikey': 'REPLACE_KEY_VALUE'
}
conn.request("POST", "/api/v1/tracking", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))200
{
"loadId": 432728294,
"message": "Load creation request has been submitted successfully",
"requestId": "cpcqp7k6o9momjngb5rg",
"statusCode": 200
}Staging
POST
https://api-staging.fourkites.com/api/v1/tracking
Body Parameters
- trackingInfoobjectDescription
- driverPhonestringDescription
- trailerNumberstringDescription
- loadobjectDescription
- loadNumberstringrequiredDescription
- nonTrackablestringDescription
- prioritystringDescription
- originalScacstringDescription
- carrierPermalinkstringDescription
- carrierNamestringDescription
- tagsarrayrequiredDescription
- productsobjectDescription
- referenceNumbersarrayDescription
- stopsobjectDescription
- stopTypestringDescription
- stopReferenceIdstringDescription
- customerobjectDescription
- idstringDescription
- poNumbersstringDescription
- completeAddressstringDescription
- addressLine1stringrequiredDescription
- citystringrequiredDescription
- statestringrequiredDescription
- countystringDescription
- loadingTypestringDescription
- countrystringrequiredDescription
- postalCodestringrequiredDescription
- latitudestringDescription
- longitudestringDescription
- geofencePointsarrayDescription
- appointmentTimestringrequiredDescription
- wantTimestringDescription
- earliestWantTimestringrequiredDescription
- latestWantTimestringrequiredDescription
- transportationModestringDescription
- palletsobjectDescription
- numberstringDescription
- partsobjectDescription
- customerPartNumberstringDescription
- quantitystringDescription
- shipperPartNumberstringDescription
- weightstringDescription
- descriptionstringDescription
curl
curl --location --request POST 'https://api-staging.fourkites.com/api/v1/tracking' \
--header 'Content-Type: application/json' \
--header 'apikey: REPLACE_KEY_VALUE' \
--data-raw '{
"trackingInfo": {
"driverPhone": "",
"trailerNumber": "2106030123"
},
"load": {
"loadNumber": "Test-appointment",
"nonTrackable": false,
"priority": "hot",
"originalScac": "csapitl",
"carrierPermalink": "carrierseranew",
"carrierName": "carrierseranew",
"tags": [],
"shipper": null,
"products": [],
"referenceNumbers": [
"2256492",
"ProductType: Bulk"
],
"stops": [
{
"stopType": "delivery",
"stopReferenceId": "xyz",
"customer": {
"id": "customer-company-6439",
"poNumbers": [
"po-pickup-1"
]
},
"completeAddress": "976 County Road 394, Delphos, KS, US",
"addressLine1": "976 County Road 394",
"city": "Delphos",
"state": "KS",
"county": "Cloud",
"loadingType": "Drop-HOOK",
"country": "US",
"postalCode": "67436",
"latitude": 39.31831267307849,
"longitude": -97.7440669937134,
"geofencePoints": [],
"appointmentTime": "2024-12-23T20:00:00.000Z",
"wantTime": null,
"earliestWantTime": null,
"latestWantTime": null,
"transportationMode": "truck",
"addressType": "",
"useLocalLatLng": true,
"pallets": [
{
"number": 1,
"parts": [
{
"customerPartNumber": "Mat1",
"quantity": 1000,
"shipperPartNumber": "Mat1",
"weight": "3072.0 LB",
"description": "Hello, This is description of Mat1"
}
]
}
]
},
{
"stopType": "pickup",
"stopReferenceId": "abc",
"customer": {
"id": "customer-company-6439",
"originalCustomerId": "",
"poNumbers": [
"po-delivery-1",
"po-delivery-2"
]
},
"name": "CypressSt",
"loadingType": "drop-hook",
"externalAddressId": "ZACHARY",
"completeAddress": null,
"addressLine1": null,
"city": null,
"state": null,
"country": null,
"postalCode": null,
"latitude": null,
"longitude": null,
"geofencePoints": [],
"appointmentTime": "2024-12-13T20:00:00.000Z",
"wantTime": "2024-12-30T20:00:00.000Z",
"earliestWantTime": null,
"latestWantTime": null,
"transportationMode": "Air",
"addressType": "",
"useLocalLatLng": true,
"pallets": [
{
"number": 1,
"parts": [
{
"customerPartNumber": "Mat2",
"quantity": 10,
"shipperPartNumber": "Mat2",
"weight": "3072.0 LB",
"description": "Hello, This is description of Mat2"
}
]
}
]
}
]
},
"simpleUpdate": true
}'java
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"trackingInfo\": {\n \"driverPhone\": \"\",\n \"trailerNumber\": \"2106030123\"\n },\n \"load\": {\n \"loadNumber\": \"Test-appointment\",\n \"nonTrackable\": false,\n \"priority\": \"hot\",\n \"originalScac\": \"csapitl\",\n \"carrierPermalink\": \"carrierseranew\",\n \"carrierName\": \"carrierseranew\",\n \"tags\": [],\n \"shipper\": null,\n \"products\": [],\n \"referenceNumbers\": [\n \"2256492\",\n \"ProductType: Bulk\"\n ],\n \"stops\": [\n {\n \"stopType\": \"delivery\",\n \"stopReferenceId\": \"xyz\",\n \"customer\": {\n \"id\": \"customer-company-6439\",\n \"poNumbers\": [\n \"po-pickup-1\"\n ]\n },\n \"completeAddress\": \"976 County Road 394, Delphos, KS, US\",\n \"addressLine1\": \"976 County Road 394\",\n \"city\": \"Delphos\",\n \"state\": \"KS\",\n \"county\": \"Cloud\",\n \"loadingType\": \"Drop-HOOK\",\n \"country\": \"US\",\n \"postalCode\": \"67436\",\n \"latitude\": 39.31831267307849,\n \"longitude\": -97.7440669937134,\n \"geofencePoints\": [],\n \"appointmentTime\": \"2024-12-23T20:00:00.000Z\",\n \"wantTime\": null,\n \"earliestWantTime\": null,\n \"latestWantTime\": null,\n \"transportationMode\": \"truck\",\n \"addressType\": \"\",\n \"useLocalLatLng\": true,\n \"pallets\": [\n {\n \"number\": 1,\n \"parts\": [\n {\n \"customerPartNumber\": \"Mat1\",\n \"quantity\": 1000,\n \"shipperPartNumber\": \"Mat1\",\n \"weight\": \"3072.0 LB\",\n \"description\": \"Hello, This is description of Mat1\"\n }\n ]\n }\n ]\n },\n {\n \"stopType\": \"pickup\",\n \"stopReferenceId\": \"abc\",\n \"customer\": {\n \"id\": \"customer-company-6439\",\n \"originalCustomerId\": \"\",\n \"poNumbers\": [\n \"po-delivery-1\",\n \"po-delivery-2\"\n ]\n },\n \"name\": \"CypressSt\",\n \"loadingType\": \"drop-hook\",\n \"externalAddressId\": \"ZACHARY\",\n \"completeAddress\": null,\n \"addressLine1\": null,\n \"city\": null,\n \"state\": null,\n \"country\": null,\n \"postalCode\": null,\n \"latitude\": null,\n \"longitude\": null,\n \"geofencePoints\": [],\n \"appointmentTime\": \"2024-12-13T20:00:00.000Z\",\n \"wantTime\": \"2024-12-30T20:00:00.000Z\",\n \"earliestWantTime\": null,\n \"latestWantTime\": null,\n \"transportationMode\": \"Air\",\n \"addressType\": \"\",\n \"useLocalLatLng\": true,\n \"pallets\": [\n {\n \"number\": 1,\n \"parts\": [\n {\n \"customerPartNumber\": \"Mat2\",\n \"quantity\": 10,\n \"shipperPartNumber\": \"Mat2\",\n \"weight\": \"3072.0 LB\",\n \"description\": \"Hello, This is description of Mat2\"\n }\n ]\n }\n ]\n }\n ]\n },\n \"simpleUpdate\": true\n}");
Request request = new Request.Builder()
.url("https://api-staging.fourkites.com/api/v1/tracking")
.method("POST", body)
.addHeader("Content-Type", "application/json")
.addHeader("apikey", "REPLACE_KEY_VALUE")
.build();
Response response = client.newCall(request).execute();javascript
var settings = {
"url": "https://api-staging.fourkites.com/api/v1/tracking",
"method": "POST",
"timeout": 0,
"headers": {
"Content-Type": "application/json",
"apikey": "REPLACE_KEY_VALUE"
},
"data": JSON.stringify({
"trackingInfo": {
"driverPhone": "",
"trailerNumber": "2106030123"
},
"load": {
"loadNumber": "Test-appointment",
"nonTrackable": false,
"priority": "hot",
"originalScac": "csapitl",
"carrierPermalink": "carrierseranew",
"carrierName": "carrierseranew",
"tags": [],
"shipper": null,
"products": [],
"referenceNumbers": [
"2256492",
"ProductType: Bulk"
],
"stops": [
{
"stopType": "delivery",
"stopReferenceId": "xyz",
"customer": {
"id": "customer-company-6439",
"poNumbers": [
"po-pickup-1"
]
},
"completeAddress": "976 County Road 394, Delphos, KS, US",
"addressLine1": "976 County Road 394",
"city": "Delphos",
"state": "KS",
"county": "Cloud",
"loadingType": "Drop-HOOK",
"country": "US",
"postalCode": "67436",
"latitude": 39.31831267307849,
"longitude": -97.7440669937134,
"geofencePoints": [],
"appointmentTime": "2024-12-23T20:00:00.000Z",
"wantTime": null,
"earliestWantTime": null,
"latestWantTime": null,
"transportationMode": "truck",
"addressType": "",
"useLocalLatLng": true,
"pallets": [
{
"number": 1,
"parts": [
{
"customerPartNumber": "Mat1",
"quantity": 1000,
"shipperPartNumber": "Mat1",
"weight": "3072.0 LB",
"description": "Hello, This is description of Mat1"
}
]
}
]
},
{
"stopType": "pickup",
"stopReferenceId": "abc",
"customer": {
"id": "customer-company-6439",
"originalCustomerId": "",
"poNumbers": [
"po-delivery-1",
"po-delivery-2"
]
},
"name": "CypressSt",
"loadingType": "drop-hook",
"externalAddressId": "ZACHARY",
"completeAddress": null,
"addressLine1": null,
"city": null,
"state": null,
"country": null,
"postalCode": null,
"latitude": null,
"longitude": null,
"geofencePoints": [],
"appointmentTime": "2024-12-13T20:00:00.000Z",
"wantTime": "2024-12-30T20:00:00.000Z",
"earliestWantTime": null,
"latestWantTime": null,
"transportationMode": "Air",
"addressType": "",
"useLocalLatLng": true,
"pallets": [
{
"number": 1,
"parts": [
{
"customerPartNumber": "Mat2",
"quantity": 10,
"shipperPartNumber": "Mat2",
"weight": "3072.0 LB",
"description": "Hello, This is description of Mat2"
}
]
}
]
}
]
},
"simpleUpdate": true
}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});swift
import Foundation
#if canImport(FoundationNetworking)
import FoundationNetworking
#endif
var semaphore = DispatchSemaphore (value: 0)
let parameters = "{\n \"trackingInfo\": {\n \"driverPhone\": \"\",\n \"trailerNumber\": \"2106030123\"\n },\n \"load\": {\n \"loadNumber\": \"Test-appointment\",\n \"nonTrackable\": false,\n \"priority\": \"hot\",\n \"originalScac\": \"csapitl\",\n \"carrierPermalink\": \"carrierseranew\",\n \"carrierName\": \"carrierseranew\",\n \"tags\": [],\n \"shipper\": null,\n \"products\": [],\n \"referenceNumbers\": [\n \"2256492\",\n \"ProductType: Bulk\"\n ],\n \"stops\": [\n {\n \"stopType\": \"delivery\",\n \"stopReferenceId\": \"xyz\",\n \"customer\": {\n \"id\": \"customer-company-6439\",\n \"poNumbers\": [\n \"po-pickup-1\"\n ]\n },\n \"completeAddress\": \"976 County Road 394, Delphos, KS, US\",\n \"addressLine1\": \"976 County Road 394\",\n \"city\": \"Delphos\",\n \"state\": \"KS\",\n \"county\": \"Cloud\",\n \"loadingType\": \"Drop-HOOK\",\n \"country\": \"US\",\n \"postalCode\": \"67436\",\n \"latitude\": 39.31831267307849,\n \"longitude\": -97.7440669937134,\n \"geofencePoints\": [],\n \"appointmentTime\": \"2024-12-23T20:00:00.000Z\",\n \"wantTime\": null,\n \"earliestWantTime\": null,\n \"latestWantTime\": null,\n \"transportationMode\": \"truck\",\n \"addressType\": \"\",\n \"useLocalLatLng\": true,\n \"pallets\": [\n {\n \"number\": 1,\n \"parts\": [\n {\n \"customerPartNumber\": \"Mat1\",\n \"quantity\": 1000,\n \"shipperPartNumber\": \"Mat1\",\n \"weight\": \"3072.0 LB\",\n \"description\": \"Hello, This is description of Mat1\"\n }\n ]\n }\n ]\n },\n {\n \"stopType\": \"pickup\",\n \"stopReferenceId\": \"abc\",\n \"customer\": {\n \"id\": \"customer-company-6439\",\n \"originalCustomerId\": \"\",\n \"poNumbers\": [\n \"po-delivery-1\",\n \"po-delivery-2\"\n ]\n },\n \"name\": \"CypressSt\",\n \"loadingType\": \"drop-hook\",\n \"externalAddressId\": \"ZACHARY\",\n \"completeAddress\": null,\n \"addressLine1\": null,\n \"city\": null,\n \"state\": null,\n \"country\": null,\n \"postalCode\": null,\n \"latitude\": null,\n \"longitude\": null,\n \"geofencePoints\": [],\n \"appointmentTime\": \"2024-12-13T20:00:00.000Z\",\n \"wantTime\": \"2024-12-30T20:00:00.000Z\",\n \"earliestWantTime\": null,\n \"latestWantTime\": null,\n \"transportationMode\": \"Air\",\n \"addressType\": \"\",\n \"useLocalLatLng\": true,\n \"pallets\": [\n {\n \"number\": 1,\n \"parts\": [\n {\n \"customerPartNumber\": \"Mat2\",\n \"quantity\": 10,\n \"shipperPartNumber\": \"Mat2\",\n \"weight\": \"3072.0 LB\",\n \"description\": \"Hello, This is description of Mat2\"\n }\n ]\n }\n ]\n }\n ]\n },\n \"simpleUpdate\": true\n}"
let postData = parameters.data(using: .utf8)
var request = URLRequest(url: URL(string: "https://api-staging.fourkites.com/api/v1/tracking")!,timeoutInterval: Double.infinity)
request.addValue("application/json", forHTTPHeaderField: "Content-Type")
request.addValue("REPLACE_KEY_VALUE", forHTTPHeaderField: "apikey")
request.httpMethod = "POST"
request.httpBody = postData
let task = URLSession.shared.dataTask(with: request) { data, response, error in
guard let data = data else {
print(String(describing: error))
semaphore.signal()
return
}
print(String(data: data, encoding: .utf8)!)
semaphore.signal()
}
task.resume()
semaphore.wait()
csharp
var client = new RestClient("https://api-staging.fourkites.com/api/v1/tracking");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("apikey", "REPLACE_KEY_VALUE");
var body = @"{" + "\n" +
@" ""trackingInfo"": {" + "\n" +
@" ""driverPhone"": """"," + "\n" +
@" ""trailerNumber"": ""2106030123""" + "\n" +
@" }," + "\n" +
@" ""load"": {" + "\n" +
@" ""loadNumber"": ""Test-appointment""," + "\n" +
@" ""nonTrackable"": false," + "\n" +
@" ""priority"": ""hot""," + "\n" +
@" ""originalScac"": ""csapitl""," + "\n" +
@" ""carrierPermalink"": ""carrierseranew""," + "\n" +
@" ""carrierName"": ""carrierseranew""," + "\n" +
@" ""tags"": []," + "\n" +
@" ""shipper"": null," + "\n" +
@" ""products"": []," + "\n" +
@" ""referenceNumbers"": [" + "\n" +
@" ""2256492""," + "\n" +
@" ""ProductType: Bulk""" + "\n" +
@" ]," + "\n" +
@" ""stops"": [" + "\n" +
@" {" + "\n" +
@" ""stopType"": ""delivery""," + "\n" +
@" ""stopReferenceId"": ""xyz""," + "\n" +
@" ""customer"": {" + "\n" +
@" ""id"": ""customer-company-6439""," + "\n" +
@" ""poNumbers"": [" + "\n" +
@" ""po-pickup-1""" + "\n" +
@" ]" + "\n" +
@" }," + "\n" +
@" ""completeAddress"": ""976 County Road 394, Delphos, KS, US""," + "\n" +
@" ""addressLine1"": ""976 County Road 394""," + "\n" +
@" ""city"": ""Delphos""," + "\n" +
@" ""state"": ""KS""," + "\n" +
@" ""county"": ""Cloud""," + "\n" +
@" ""loadingType"": ""Drop-HOOK""," + "\n" +
@" ""country"": ""US""," + "\n" +
@" ""postalCode"": ""67436""," + "\n" +
@" ""latitude"": 39.31831267307849," + "\n" +
@" ""longitude"": -97.7440669937134," + "\n" +
@" ""geofencePoints"": []," + "\n" +
@" ""appointmentTime"": ""2024-12-23T20:00:00.000Z""," + "\n" +
@" ""wantTime"": null," + "\n" +
@" ""earliestWantTime"": null," + "\n" +
@" ""latestWantTime"": null," + "\n" +
@" ""transportationMode"": ""truck""," + "\n" +
@" ""addressType"": """"," + "\n" +
@" ""useLocalLatLng"": true," + "\n" +
@" ""pallets"": [" + "\n" +
@" {" + "\n" +
@" ""number"": 1," + "\n" +
@" ""parts"": [" + "\n" +
@" {" + "\n" +
@" ""customerPartNumber"": ""Mat1""," + "\n" +
@" ""quantity"": 1000," + "\n" +
@" ""shipperPartNumber"": ""Mat1""," + "\n" +
@" ""weight"": ""3072.0 LB""," + "\n" +
@" ""description"": ""Hello, This is description of Mat1""" + "\n" +
@" }" + "\n" +
@" ]" + "\n" +
@" }" + "\n" +
@" ]" + "\n" +
@" }," + "\n" +
@" {" + "\n" +
@" ""stopType"": ""pickup""," + "\n" +
@" ""stopReferenceId"": ""abc""," + "\n" +
@" ""customer"": {" + "\n" +
@" ""id"": ""customer-company-6439""," + "\n" +
@" ""originalCustomerId"": """"," + "\n" +
@" ""poNumbers"": [" + "\n" +
@" ""po-delivery-1""," + "\n" +
@" ""po-delivery-2""" + "\n" +
@" ]" + "\n" +
@" }," + "\n" +
@" ""name"": ""CypressSt""," + "\n" +
@" ""loadingType"": ""drop-hook""," + "\n" +
@" ""externalAddressId"": ""ZACHARY""," + "\n" +
@" ""completeAddress"": null," + "\n" +
@" ""addressLine1"": null," + "\n" +
@" ""city"": null," + "\n" +
@" ""state"": null," + "\n" +
@" ""country"": null," + "\n" +
@" ""postalCode"": null," + "\n" +
@" ""latitude"": null," + "\n" +
@" ""longitude"": null," + "\n" +
@" ""geofencePoints"": []," + "\n" +
@" ""appointmentTime"": ""2024-12-13T20:00:00.000Z""," + "\n" +
@" ""wantTime"": ""2024-12-30T20:00:00.000Z""," + "\n" +
@" ""earliestWantTime"": null," + "\n" +
@" ""latestWantTime"": null," + "\n" +
@" ""transportationMode"": ""Air""," + "\n" +
@" ""addressType"": """"," + "\n" +
@" ""useLocalLatLng"": true," + "\n" +
@" ""pallets"": [" + "\n" +
@" {" + "\n" +
@" ""number"": 1," + "\n" +
@" ""parts"": [" + "\n" +
@" {" + "\n" +
@" ""customerPartNumber"": ""Mat2""," + "\n" +
@" ""quantity"": 10," + "\n" +
@" ""shipperPartNumber"": ""Mat2""," + "\n" +
@" ""weight"": ""3072.0 LB""," + "\n" +
@" ""description"": ""Hello, This is description of Mat2""" + "\n" +
@" }" + "\n" +
@" ]" + "\n" +
@" }" + "\n" +
@" ]" + "\n" +
@" }" + "\n" +
@" ]" + "\n" +
@" }," + "\n" +
@" ""simpleUpdate"": true" + "\n" +
@"}";
request.AddParameter("application/json", body, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);go
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api-staging.fourkites.com/api/v1/tracking"
method := "POST"
payload := strings.NewReader(`{
"trackingInfo": {
"driverPhone": "",
"trailerNumber": "2106030123"
},
"load": {
"loadNumber": "Test-appointment",
"nonTrackable": false,
"priority": "hot",
"originalScac": "csapitl",
"carrierPermalink": "carrierseranew",
"carrierName": "carrierseranew",
"tags": [],
"shipper": null,
"products": [],
"referenceNumbers": [
"2256492",
"ProductType: Bulk"
],
"stops": [
{
"stopType": "delivery",
"stopReferenceId": "xyz",
"customer": {
"id": "customer-company-6439",
"poNumbers": [
"po-pickup-1"
]
},
"completeAddress": "976 County Road 394, Delphos, KS, US",
"addressLine1": "976 County Road 394",
"city": "Delphos",
"state": "KS",
"county": "Cloud",
"loadingType": "Drop-HOOK",
"country": "US",
"postalCode": "67436",
"latitude": 39.31831267307849,
"longitude": -97.7440669937134,
"geofencePoints": [],
"appointmentTime": "2024-12-23T20:00:00.000Z",
"wantTime": null,
"earliestWantTime": null,
"latestWantTime": null,
"transportationMode": "truck",
"addressType": "",
"useLocalLatLng": true,
"pallets": [
{
"number": 1,
"parts": [
{
"customerPartNumber": "Mat1",
"quantity": 1000,
"shipperPartNumber": "Mat1",
"weight": "3072.0 LB",
"description": "Hello, This is description of Mat1"
}
]
}
]
},
{
"stopType": "pickup",
"stopReferenceId": "abc",
"customer": {
"id": "customer-company-6439",
"originalCustomerId": "",
"poNumbers": [
"po-delivery-1",
"po-delivery-2"
]
},
"name": "CypressSt",
"loadingType": "drop-hook",
"externalAddressId": "ZACHARY",
"completeAddress": null,
"addressLine1": null,
"city": null,
"state": null,
"country": null,
"postalCode": null,
"latitude": null,
"longitude": null,
"geofencePoints": [],
"appointmentTime": "2024-12-13T20:00:00.000Z",
"wantTime": "2024-12-30T20:00:00.000Z",
"earliestWantTime": null,
"latestWantTime": null,
"transportationMode": "Air",
"addressType": "",
"useLocalLatLng": true,
"pallets": [
{
"number": 1,
"parts": [
{
"customerPartNumber": "Mat2",
"quantity": 10,
"shipperPartNumber": "Mat2",
"weight": "3072.0 LB",
"description": "Hello, This is description of Mat2"
}
]
}
]
}
]
},
"simpleUpdate": true
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
req.Header.Add("apikey", "REPLACE_KEY_VALUE")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}ruby
require "uri"
require "json"
require "net/http"
url = URI("https://api-staging.fourkites.com/api/v1/tracking")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request["apikey"] = "REPLACE_KEY_VALUE"
request.body = JSON.dump({
"trackingInfo": {
"driverPhone": "",
"trailerNumber": "2106030123"
},
"load": {
"loadNumber": "Test-appointment",
"nonTrackable": false,
"priority": "hot",
"originalScac": "csapitl",
"carrierPermalink": "carrierseranew",
"carrierName": "carrierseranew",
"tags": [],
"shipper": nil,
"products": [],
"referenceNumbers": [
"2256492",
"ProductType: Bulk"
],
"stops": [
{
"stopType": "delivery",
"stopReferenceId": "xyz",
"customer": {
"id": "customer-company-6439",
"poNumbers": [
"po-pickup-1"
]
},
"completeAddress": "976 County Road 394, Delphos, KS, US",
"addressLine1": "976 County Road 394",
"city": "Delphos",
"state": "KS",
"county": "Cloud",
"loadingType": "Drop-HOOK",
"country": "US",
"postalCode": "67436",
"latitude": 39.31831267307849,
"longitude": -97.7440669937134,
"geofencePoints": [],
"appointmentTime": "2024-12-23T20:00:00.000Z",
"wantTime": nil,
"earliestWantTime": nil,
"latestWantTime": nil,
"transportationMode": "truck",
"addressType": "",
"useLocalLatLng": true,
"pallets": [
{
"number": 1,
"parts": [
{
"customerPartNumber": "Mat1",
"quantity": 1000,
"shipperPartNumber": "Mat1",
"weight": "3072.0 LB",
"description": "Hello, This is description of Mat1"
}
]
}
]
},
{
"stopType": "pickup",
"stopReferenceId": "abc",
"customer": {
"id": "customer-company-6439",
"originalCustomerId": "",
"poNumbers": [
"po-delivery-1",
"po-delivery-2"
]
},
"name": "CypressSt",
"loadingType": "drop-hook",
"externalAddressId": "ZACHARY",
"completeAddress": nil,
"addressLine1": nil,
"city": nil,
"state": nil,
"country": nil,
"postalCode": nil,
"latitude": nil,
"longitude": nil,
"geofencePoints": [],
"appointmentTime": "2024-12-13T20:00:00.000Z",
"wantTime": "2024-12-30T20:00:00.000Z",
"earliestWantTime": nil,
"latestWantTime": nil,
"transportationMode": "Air",
"addressType": "",
"useLocalLatLng": true,
"pallets": [
{
"number": 1,
"parts": [
{
"customerPartNumber": "Mat2",
"quantity": 10,
"shipperPartNumber": "Mat2",
"weight": "3072.0 LB",
"description": "Hello, This is description of Mat2"
}
]
}
]
}
]
},
"simpleUpdate": true
})
response = https.request(request)
puts response.read_body
python
import http.client
import json
conn = http.client.HTTPSConnection("api-staging.fourkites.com")
payload = json.dumps({
"trackingInfo": {
"driverPhone": "",
"trailerNumber": "2106030123"
},
"load": {
"loadNumber": "Test-appointment",
"nonTrackable": False,
"priority": "hot",
"originalScac": "csapitl",
"carrierPermalink": "carrierseranew",
"carrierName": "carrierseranew",
"tags": [],
"shipper": None,
"products": [],
"referenceNumbers": [
"2256492",
"ProductType: Bulk"
],
"stops": [
{
"stopType": "delivery",
"stopReferenceId": "xyz",
"customer": {
"id": "customer-company-6439",
"poNumbers": [
"po-pickup-1"
]
},
"completeAddress": "976 County Road 394, Delphos, KS, US",
"addressLine1": "976 County Road 394",
"city": "Delphos",
"state": "KS",
"county": "Cloud",
"loadingType": "Drop-HOOK",
"country": "US",
"postalCode": "67436",
"latitude": 39.31831267307849,
"longitude": -97.7440669937134,
"geofencePoints": [],
"appointmentTime": "2024-12-23T20:00:00.000Z",
"wantTime": None,
"earliestWantTime": None,
"latestWantTime": None,
"transportationMode": "truck",
"addressType": "",
"useLocalLatLng": True,
"pallets": [
{
"number": 1,
"parts": [
{
"customerPartNumber": "Mat1",
"quantity": 1000,
"shipperPartNumber": "Mat1",
"weight": "3072.0 LB",
"description": "Hello, This is description of Mat1"
}
]
}
]
},
{
"stopType": "pickup",
"stopReferenceId": "abc",
"customer": {
"id": "customer-company-6439",
"originalCustomerId": "",
"poNumbers": [
"po-delivery-1",
"po-delivery-2"
]
},
"name": "CypressSt",
"loadingType": "drop-hook",
"externalAddressId": "ZACHARY",
"completeAddress": None,
"addressLine1": None,
"city": None,
"state": None,
"country": None,
"postalCode": None,
"latitude": None,
"longitude": None,
"geofencePoints": [],
"appointmentTime": "2024-12-13T20:00:00.000Z",
"wantTime": "2024-12-30T20:00:00.000Z",
"earliestWantTime": None,
"latestWantTime": None,
"transportationMode": "Air",
"addressType": "",
"useLocalLatLng": True,
"pallets": [
{
"number": 1,
"parts": [
{
"customerPartNumber": "Mat2",
"quantity": 10,
"shipperPartNumber": "Mat2",
"weight": "3072.0 LB",
"description": "Hello, This is description of Mat2"
}
]
}
]
}
]
},
"simpleUpdate": True
})
headers = {
'Content-Type': 'application/json',
'apikey': 'REPLACE_KEY_VALUE'
}
conn.request("POST", "/api/v1/tracking", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))200
{
"loadId": 432728294,
"message": "Load creation request has been submitted successfully",
"requestId": "cpcqp7k6o9momjngb5rg",
"statusCode": 200
}