Create slot booking
curl --request POST \
--url https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/terminals/slots \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"terminal": "DOH Cargo Terminal",
"requestedDate": "2024-01-01",
"requestedTime": "08:00",
"duration": 2,
"awbNumbers": [
"15712345678"
]
}
'import requests
url = "https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/terminals/slots"
payload = {
"terminal": "DOH Cargo Terminal",
"requestedDate": "2024-01-01",
"requestedTime": "08:00",
"duration": 2,
"awbNumbers": ["15712345678"]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
terminal: 'DOH Cargo Terminal',
requestedDate: '2024-01-01',
requestedTime: '08:00',
duration: 2,
awbNumbers: ['15712345678']
})
};
fetch('https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/terminals/slots', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/terminals/slots",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'terminal' => 'DOH Cargo Terminal',
'requestedDate' => '2024-01-01',
'requestedTime' => '08:00',
'duration' => 2,
'awbNumbers' => [
'15712345678'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/terminals/slots"
payload := strings.NewReader("{\n \"terminal\": \"DOH Cargo Terminal\",\n \"requestedDate\": \"2024-01-01\",\n \"requestedTime\": \"08:00\",\n \"duration\": 2,\n \"awbNumbers\": [\n \"15712345678\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/terminals/slots")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"terminal\": \"DOH Cargo Terminal\",\n \"requestedDate\": \"2024-01-01\",\n \"requestedTime\": \"08:00\",\n \"duration\": 2,\n \"awbNumbers\": [\n \"15712345678\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/terminals/slots")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"terminal\": \"DOH Cargo Terminal\",\n \"requestedDate\": \"2024-01-01\",\n \"requestedTime\": \"08:00\",\n \"duration\": 2,\n \"awbNumbers\": [\n \"15712345678\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"slotId": "slot-123",
"terminal": "DOH Cargo Terminal",
"confirmedDate": "2024-01-01",
"confirmedTime": "08:00",
"vctNumber": "VCT001"
}Bonded Trucking & Slots
Create Slot Booking
Create and manage terminal slot bookings with VCT/TSP issuance
POST
/
api
/
terminals
/
slots
Create slot booking
curl --request POST \
--url https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/terminals/slots \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"terminal": "DOH Cargo Terminal",
"requestedDate": "2024-01-01",
"requestedTime": "08:00",
"duration": 2,
"awbNumbers": [
"15712345678"
]
}
'import requests
url = "https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/terminals/slots"
payload = {
"terminal": "DOH Cargo Terminal",
"requestedDate": "2024-01-01",
"requestedTime": "08:00",
"duration": 2,
"awbNumbers": ["15712345678"]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
terminal: 'DOH Cargo Terminal',
requestedDate: '2024-01-01',
requestedTime: '08:00',
duration: 2,
awbNumbers: ['15712345678']
})
};
fetch('https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/terminals/slots', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/terminals/slots",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'terminal' => 'DOH Cargo Terminal',
'requestedDate' => '2024-01-01',
'requestedTime' => '08:00',
'duration' => 2,
'awbNumbers' => [
'15712345678'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/terminals/slots"
payload := strings.NewReader("{\n \"terminal\": \"DOH Cargo Terminal\",\n \"requestedDate\": \"2024-01-01\",\n \"requestedTime\": \"08:00\",\n \"duration\": 2,\n \"awbNumbers\": [\n \"15712345678\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/terminals/slots")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"terminal\": \"DOH Cargo Terminal\",\n \"requestedDate\": \"2024-01-01\",\n \"requestedTime\": \"08:00\",\n \"duration\": 2,\n \"awbNumbers\": [\n \"15712345678\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/terminals/slots")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"terminal\": \"DOH Cargo Terminal\",\n \"requestedDate\": \"2024-01-01\",\n \"requestedTime\": \"08:00\",\n \"duration\": 2,\n \"awbNumbers\": [\n \"15712345678\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"slotId": "slot-123",
"terminal": "DOH Cargo Terminal",
"confirmedDate": "2024-01-01",
"confirmedTime": "08:00",
"vctNumber": "VCT001"
}Create and manage terminal slot bookings with VCT/TSP issuance.
Reference Documentation
For more information on TSM delivery slots, please refer to:
- Pages 77-79 of “Functional_Requirements_V18 FINAL”: https://belli.sg/4nxxCDR
Authorizations
ApiKeyAuthApiKeyHeader
Body
application/json
⌘I