Reserve Slots
The Reserve Slots API will allow you to make a reservation for your load at a facility by passing on the necessary information about the load.
You can either pass loadNumber & shippingType (or) facilityId & calendarId
Note that the expiry duration is not mandatory; the default expiry duration is 30 mins.
reservedSlotName need not be unique
Reserve slot using loadNumber & shippingType
curl --location --request POST 'https://api.fourkites.com/api/v1/reserve_slot' \
--header 'Content-Type: application/json' \
--header 'apikey: REPLACE_KEY_VALUE' \
--data-raw '{
"loadNumber" : "Nb32123",
"shippingType": "inbound",
"appointmentStart" : "2024-03-13T00:00:00Z",
"appointmentEnd": "2024-03-13T01:00:00Z",
"expiryInMins" : 30,
"reservedSlotName": "Reservation for Load Nb32123"
}'curl --location --request POST 'https://api-staging.fourkites.com/api/v1/reserve_slot' \
--header 'Content-Type: application/json' \
--header 'apikey: REPLACE_KEY_VALUE' \
--data-raw '{
"loadNumber" : "Nb32123",
"shippingType": "inbound",
"appointmentStart" : "2024-03-13T00:00:00Z",
"appointmentEnd": "2024-03-13T01:00:00Z",
"expiryInMins" : 30,
"reservedSlotName": "Reservation for Load Nb32123"
}'Reserve slot using facilityId & calendarId
curl --location --request POST 'https://api.fourkites.com/api/v1/reserve_slot' \
--header 'Content-Type: application/json' \
--header 'apikey: REPLACE_KEY_VALUE' \
--data-raw '{ "facilityId": "Rk1fOTAzMTQy",
"calendarId": 345,
"appointmentStart" : "2024-03-13T00:00:00Z",
"appointmentEnd": "2024-03-13T01:00:00Z",
"expiryInMins" : 30,
"reservedSlotName": "Reservation-1"
}'curl --location --request POST 'https://api-staging.fourkites.com/api/v1/reserve_slot' \
--header 'Content-Type: application/json' \
--header 'apikey: REPLACE_KEY_VALUE' \
--data-raw '{ "facilityId": "Rk1fOTAzMTQy",
"calendarId": 345,
"appointmentStart" : "2024-03-13T00:00:00Z",
"appointmentEnd": "2024-03-13T01:00:00Z",
"expiryInMins" : 30,
"reservedSlotName": "Reservation-1"
}'Error Response
|
|
|---|---|
Invalid Auth | :::BlockQuote |
{"message": "Invalid authentication credentials"} | |
::: | |
Load Number & shipping Type or CalendarId & facility Id not passed | :::BlockQuote |
{ "code": 400, "error": { "message": "Invalid Request Params", "code": 400, "errors": [ { "domain": "oas", "reason": "Load Number and ShippingType or FacilityId and CalendarId either one of the combination is required", "message": "Invalid Request Params" } ] }, "request_id": "cotjjn1628du4065nrqg" } | |
::: | |
Start Time provided is greater than end Time | :::BlockQuote |
{ "code": 400, "error": { "message": "Invalid Request Params", "code": 400, "errors": [ { "domain": "oas", "reason": "StartTime should be lesser than EndTime", "message": "Invalid Request Params" } ] }, "request_id": "cotjldh628drfoss63l0" } | |
::: | |
Load Not Found | :::BlockQuote |
{ "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": "cotjn5d6le7lklkgs4i0" } | |
::: | |
Load with same shipping type found in more than 1 facility | :::BlockQuote |
{ "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": "cotjntd6le7lklkgs4l0" } | |
::: | |
Appointment Already booked on reserved slot | :::BlockQuote |
{ "code": 400, "error": { "message": "Invalid Request Params", "code": 400, "errors": [ { "domain": "oas", "reason": "Appointment already booked on the reserved slot", "message": "Invalid Request Params" } ] }, "request_id": "cotlend6le7hocm48m00" } | |
::: | |
Same Appointment Start & End | :::BlockQuote |
{ "code": 400, "error": { "message": "Invalid Request Params", "code": 400, "errors": [ { "domain": "oas", "reason": "Appointment is already Scheduled on the given Time", "message": "Invalid Request Params" } ] }, "request_id": "cotlh0h628drfoss63lg" } | |
::: | |
Not passing reserved slot name , start time , end time | :::BlockQuote |
{ "code": 400, "error": { "message": "Invalid Request Params", "code": 400, "errors": [ { "domain": "oas", "reason": "Key: 'ReserveSlot.ReserveSlotName' Error:Field validation for 'ReserveSlotName' failed on the 'required' tag", "message": "Invalid Request Params" }, { "domain": "oas", "reason": "Key: 'ReserveSlot.StartTime' Error:Field validation for 'StartTime' failed on the 'required' tag", "message": "Invalid Request Params" }, { "domain": "oas", "reason": "Key: 'ReserveSlot.EndTime' Error:Field validation for 'EndTime' failed on the 'required' tag", "message": "Invalid Request Params" } ] }, "request_id": "cotjoml6le7lklkgs4mg" } | |
::: | |
No slots available | :::BlockQuote |
{ "code": 400, "error": { "message": "This slot is no longer available, please select a different slot", "code": 400, "errors": [ { "domain": "oas", "reason": "", "message": "This slot is no longer available, please select a different slot" } ] }, "request_id": "cotlc3t6le7hocm48hs0" } | |
::: |
