Check-In/Out
Use this API to update your appointments to take the following actions:
For more Error Responses, click here.
Rate Limit
60 requests per minute
Format Supported
JSON
Authenticated Resource
API Key
For more information on Authentication, click here.
Check-In Update Only
Pass checkInAt along with loadNumber & shippingType fields for an appointment Check-In, with the mandatory action field as “CheckIn/CheckOut".
curl --location --request PUT 'https://api.fourkites.com/api/v1/update_appointment' \
--header 'Content-Type: application/json' \
--header 'apikey: REPLACE_KEY_VALUE' \
--data-raw '{
"loadNumber" : "NB23b23423",
"shippingType": "inbound",
"checkInAt": "2024-07-11T12:00:00Z",
"action": "CheckIn/CheckOut"
}'curl --location --request PUT 'https://api-staging.fourkites.com/api/v1/update_appointment' \
--header 'Content-Type: application/json' \
--header 'apikey: REPLACE_KEY_VALUE' \
--data-raw '{
"loadNumber" : "NB23b23423",
"shippingType": "inbound",
"checkInAt": "2024-07-11T12:00:00Z",
"action": "CheckIn/CheckOut"
}'Check-out Update Only
Pass checkOutAt along with loadNumber & shippingType fields for an appointment Check-Out, with the mandatory action field as “CheckIn/CheckOut".
import http.client
import json
conn = http.client.HTTPSConnection("api.fourkites.com")
payload = json.dumps({
"loadNumber": "NB23b23423",
"shippingType": "inbound",
"checkOutAt": "2024-07-11T12:00:00Z",
"action": "CheckIn/CheckOut"
})
headers = {
'Content-Type': 'application/json',
'apikey': 'REPLACE_KEY_VALUE'
}
conn.request("PUT", "/api/v1/update_appointment", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))curl --location --request PUT 'https://api-staging.fourkites.com/api/v1/update_appointment' \
--header 'Content-Type: application/json' \
--header 'apikey: REPLACE_KEY_VALUE' \
--data-raw '{
"loadNumber" : "NB23b23423",
"shippingType": "inbound",
"checkOutAt": "2024-07-11T12:00:00Z",
"action": "CheckIn/CheckOut"
}'Both Check-In & Check-Out
Pass both checkInAt and checkOutAt along with load number & shipping type for Appointment Check-In & Out together, with the mandatory action field as “CheckIn/CheckOut".
curl --location --request PUT 'https://api.fourkites.com/api/v1/update_appointment' \
--header 'Content-Type: application/json' \
--header 'apikey: REPLACE_KEY_VALUE' \
--data-raw '{
"loadNumber" : "NB23b23423",
"shippingType": "inbound",
"checkInAt": "2024-07-11T11:00:00Z",
"checkOutAt": "2024-07-11T12:00:00Z",
"action": "CheckIn/CheckOut"
}'var client = new RestClient("https://api-staging.fourkites.com/api/v1/update_appointment");
client.Timeout = -1;
var request = new RestRequest(Method.PUT);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("apikey", "REPLACE_KEY_VALUE");
var body = @"{" + "\n" +
@" ""loadNumber"" : ""NB23b23423""," + "\n" +
@" ""shippingType"": ""inbound""," + "\n" +
@" ""checkInAt"": ""2024-07-11T11:00:00Z""," + "\n" +
@" ""checkOutAt"": ""2024-07-11T12:00:00Z""," + "\n" +
@" ""action"": ""CheckIn/CheckOut""" + "\n" +
@"}";
request.AddParameter("application/json", body, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);Check-In/Out Revert
Pass checkInAt and/or checkOutAt fields with 0001-01-01T00:00:00Z as value along with load number & shipping type to revert check-in and check-out for an appointment, with the mandatory action field as “CheckIn/CheckOut".
curl --location --request PUT 'https://api.fourkites.com/api/v1/update_appointment' \
--header 'Content-Type: application/json' \
--header 'apikey: REPLACE_KEY_VALUE' \
--data-raw '{
"loadNumber" : "NB23b23423",
"shippingType": "inbound",
"checkInAt": "0001-01-01T00:00:00Z",
"checkOutAt": "0001-01-01T00:00:00Z",
"action": "CheckIn/CheckOut"
}'curl --location --request PUT 'https://api-staging.fourkites.com/api/v1/update_appointment' \
--header 'Content-Type: application/json' \
--header 'apikey: REPLACE_KEY_VALUE' \
--data-raw '{
"loadNumber" : "NB23b23423",
"shippingType": "inbound",
"checkInAt": "0001-01-01T00:00:00Z",
"checkOutAt": "0001-01-01T00:00:00Z",
"action": "CheckIn/CheckOut"
}'Error Response
Action | Response Message |
|---|---|
Invalid Auth | {"message": "Invalid authentication credentials"} |
Load Not Found | { "code": 400, "error": { "message": "Invalid Request Params", "code": 400, "errors": [ { "domain": "oas", "reason": "The shipment does not have an associated appointment", "message": "Invalid Request Params" } ] }, "request_id": "cq8hcd14cktev3sofde0" } |
Load with the same shipping type found in more than 1 facility | { "code": 400, "error": { "message": "Invalid Request Params", "code": 400, "errors": [ { "domain": "oas", "reason": "The shipment has multiple appointments associated", "message": "Invalid Request Params" } ] }, "request_id": "cq8hcqp4cktev3sofdeg" } |
Check-in / Check-out request on an unscheduled appointment | { "code": 400, "error": { "message": "Invalid Request Params", "code": 400, "errors": [ { "domain": "oas", "reason": "Only confirmed appointment can be checked in or out", "message": "Invalid Request Params" } ] }, "request_id": "cq8hdgp4cktev3sofdf0" } |
When an invalid action is sent | { "code": 400, "error": { "message": "Invalid Request Params", "code": 400, "errors": [ { "domain": "oas", "reason": "Not a valid action", "message": "Invalid Request Params" } ] }, "request_id": "cq8heah4cktev3sofdg0" } |
When Action is not sent | { "code": 400, "error": { "message": "Invalid Request Params", "code": 400, "errors": [ { "domain": "oas", "reason": "ReservedSlotId or StartTime and EndTime or action is required", "message": "Invalid Request Params" } ] }, "request_id": "cq8hf814cktf0bubdrqg" } |
When CheckInAt and CheckOutAt is not sent | { "code": 400, "error": { "message": "Invalid Request Params", "code": 400, "errors": [ { "domain": "oas", "reason": "CheckInAt or CheckOutAt is required", "message": "Invalid Request Params" } ] }, "request_id": "cq8hhih4cktf1kb3j6cg" } |
