Create RFQ
curl --request POST \
--url https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/quotes \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"shipper": {
"name": "ABC Exports (Pvt) Ltd"
},
"consignee": {
"name": "London Imports Ltd"
},
"routing": {
"origin": "KHI",
"destination": "LHR"
},
"pieces": 8,
"grossWeightKg": 980,
"commodity": {
"code": "GEN",
"description": "General Cargo"
},
"dimensionsCm": [
{
"l": 120,
"w": 100,
"h": 80,
"pieces": 8
}
],
"shc": [
"PER"
],
"deliveryToAirlineDate": "2024-01-01",
"notes": "Stackable",
"airlineFilter": [
"PK"
]
}
'import requests
url = "https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/quotes"
payload = {
"shipper": { "name": "ABC Exports (Pvt) Ltd" },
"consignee": { "name": "London Imports Ltd" },
"routing": {
"origin": "KHI",
"destination": "LHR"
},
"pieces": 8,
"grossWeightKg": 980,
"commodity": {
"code": "GEN",
"description": "General Cargo"
},
"dimensionsCm": [
{
"l": 120,
"w": 100,
"h": 80,
"pieces": 8
}
],
"shc": ["PER"],
"deliveryToAirlineDate": "2024-01-01",
"notes": "Stackable",
"airlineFilter": ["PK"]
}
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({
shipper: {name: 'ABC Exports (Pvt) Ltd'},
consignee: {name: 'London Imports Ltd'},
routing: {origin: 'KHI', destination: 'LHR'},
pieces: 8,
grossWeightKg: 980,
commodity: {code: 'GEN', description: 'General Cargo'},
dimensionsCm: [{l: 120, w: 100, h: 80, pieces: 8}],
shc: ['PER'],
deliveryToAirlineDate: '2024-01-01',
notes: 'Stackable',
airlineFilter: ['PK']
})
};
fetch('https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/quotes', 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/quotes",
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([
'shipper' => [
'name' => 'ABC Exports (Pvt) Ltd'
],
'consignee' => [
'name' => 'London Imports Ltd'
],
'routing' => [
'origin' => 'KHI',
'destination' => 'LHR'
],
'pieces' => 8,
'grossWeightKg' => 980,
'commodity' => [
'code' => 'GEN',
'description' => 'General Cargo'
],
'dimensionsCm' => [
[
'l' => 120,
'w' => 100,
'h' => 80,
'pieces' => 8
]
],
'shc' => [
'PER'
],
'deliveryToAirlineDate' => '2024-01-01',
'notes' => 'Stackable',
'airlineFilter' => [
'PK'
]
]),
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/quotes"
payload := strings.NewReader("{\n \"shipper\": {\n \"name\": \"ABC Exports (Pvt) Ltd\"\n },\n \"consignee\": {\n \"name\": \"London Imports Ltd\"\n },\n \"routing\": {\n \"origin\": \"KHI\",\n \"destination\": \"LHR\"\n },\n \"pieces\": 8,\n \"grossWeightKg\": 980,\n \"commodity\": {\n \"code\": \"GEN\",\n \"description\": \"General Cargo\"\n },\n \"dimensionsCm\": [\n {\n \"l\": 120,\n \"w\": 100,\n \"h\": 80,\n \"pieces\": 8\n }\n ],\n \"shc\": [\n \"PER\"\n ],\n \"deliveryToAirlineDate\": \"2024-01-01\",\n \"notes\": \"Stackable\",\n \"airlineFilter\": [\n \"PK\"\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/quotes")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"shipper\": {\n \"name\": \"ABC Exports (Pvt) Ltd\"\n },\n \"consignee\": {\n \"name\": \"London Imports Ltd\"\n },\n \"routing\": {\n \"origin\": \"KHI\",\n \"destination\": \"LHR\"\n },\n \"pieces\": 8,\n \"grossWeightKg\": 980,\n \"commodity\": {\n \"code\": \"GEN\",\n \"description\": \"General Cargo\"\n },\n \"dimensionsCm\": [\n {\n \"l\": 120,\n \"w\": 100,\n \"h\": 80,\n \"pieces\": 8\n }\n ],\n \"shc\": [\n \"PER\"\n ],\n \"deliveryToAirlineDate\": \"2024-01-01\",\n \"notes\": \"Stackable\",\n \"airlineFilter\": [\n \"PK\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/quotes")
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 \"shipper\": {\n \"name\": \"ABC Exports (Pvt) Ltd\"\n },\n \"consignee\": {\n \"name\": \"London Imports Ltd\"\n },\n \"routing\": {\n \"origin\": \"KHI\",\n \"destination\": \"LHR\"\n },\n \"pieces\": 8,\n \"grossWeightKg\": 980,\n \"commodity\": {\n \"code\": \"GEN\",\n \"description\": \"General Cargo\"\n },\n \"dimensionsCm\": [\n {\n \"l\": 120,\n \"w\": 100,\n \"h\": 80,\n \"pieces\": 8\n }\n ],\n \"shc\": [\n \"PER\"\n ],\n \"deliveryToAirlineDate\": \"2024-01-01\",\n \"notes\": \"Stackable\",\n \"airlineFilter\": [\n \"PK\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "quote-123",
"status": "pending",
"origin": "DOH",
"destination": "LHR",
"pieces": 10,
"weight": 500,
"volume": 2.5,
"commodity": "GEN",
"shc": [
"PER"
],
"createdAt": "2024-01-01T10:00:00Z",
"priceOptions": [
{
"flightNumber": "QR123",
"departureDate": "2024-01-15",
"pricePerKg": 2.5,
"totalAmount": 2450,
"currency": "USD",
"validityHours": 24
}
]
}{
"error": "invalid_request",
"errorDescription": "Missing required field: 'grossWeightKg' is required.",
"errorUri": "https://docs.example.com/cargo/errors"
}Quotes
Create RFQ
Create Request for Quote with origin, destination, pieces, weight, dimensions, commodity, and SHC
POST
/
api
/
quotes
Create RFQ
curl --request POST \
--url https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/quotes \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"shipper": {
"name": "ABC Exports (Pvt) Ltd"
},
"consignee": {
"name": "London Imports Ltd"
},
"routing": {
"origin": "KHI",
"destination": "LHR"
},
"pieces": 8,
"grossWeightKg": 980,
"commodity": {
"code": "GEN",
"description": "General Cargo"
},
"dimensionsCm": [
{
"l": 120,
"w": 100,
"h": 80,
"pieces": 8
}
],
"shc": [
"PER"
],
"deliveryToAirlineDate": "2024-01-01",
"notes": "Stackable",
"airlineFilter": [
"PK"
]
}
'import requests
url = "https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/quotes"
payload = {
"shipper": { "name": "ABC Exports (Pvt) Ltd" },
"consignee": { "name": "London Imports Ltd" },
"routing": {
"origin": "KHI",
"destination": "LHR"
},
"pieces": 8,
"grossWeightKg": 980,
"commodity": {
"code": "GEN",
"description": "General Cargo"
},
"dimensionsCm": [
{
"l": 120,
"w": 100,
"h": 80,
"pieces": 8
}
],
"shc": ["PER"],
"deliveryToAirlineDate": "2024-01-01",
"notes": "Stackable",
"airlineFilter": ["PK"]
}
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({
shipper: {name: 'ABC Exports (Pvt) Ltd'},
consignee: {name: 'London Imports Ltd'},
routing: {origin: 'KHI', destination: 'LHR'},
pieces: 8,
grossWeightKg: 980,
commodity: {code: 'GEN', description: 'General Cargo'},
dimensionsCm: [{l: 120, w: 100, h: 80, pieces: 8}],
shc: ['PER'],
deliveryToAirlineDate: '2024-01-01',
notes: 'Stackable',
airlineFilter: ['PK']
})
};
fetch('https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/quotes', 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/quotes",
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([
'shipper' => [
'name' => 'ABC Exports (Pvt) Ltd'
],
'consignee' => [
'name' => 'London Imports Ltd'
],
'routing' => [
'origin' => 'KHI',
'destination' => 'LHR'
],
'pieces' => 8,
'grossWeightKg' => 980,
'commodity' => [
'code' => 'GEN',
'description' => 'General Cargo'
],
'dimensionsCm' => [
[
'l' => 120,
'w' => 100,
'h' => 80,
'pieces' => 8
]
],
'shc' => [
'PER'
],
'deliveryToAirlineDate' => '2024-01-01',
'notes' => 'Stackable',
'airlineFilter' => [
'PK'
]
]),
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/quotes"
payload := strings.NewReader("{\n \"shipper\": {\n \"name\": \"ABC Exports (Pvt) Ltd\"\n },\n \"consignee\": {\n \"name\": \"London Imports Ltd\"\n },\n \"routing\": {\n \"origin\": \"KHI\",\n \"destination\": \"LHR\"\n },\n \"pieces\": 8,\n \"grossWeightKg\": 980,\n \"commodity\": {\n \"code\": \"GEN\",\n \"description\": \"General Cargo\"\n },\n \"dimensionsCm\": [\n {\n \"l\": 120,\n \"w\": 100,\n \"h\": 80,\n \"pieces\": 8\n }\n ],\n \"shc\": [\n \"PER\"\n ],\n \"deliveryToAirlineDate\": \"2024-01-01\",\n \"notes\": \"Stackable\",\n \"airlineFilter\": [\n \"PK\"\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/quotes")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"shipper\": {\n \"name\": \"ABC Exports (Pvt) Ltd\"\n },\n \"consignee\": {\n \"name\": \"London Imports Ltd\"\n },\n \"routing\": {\n \"origin\": \"KHI\",\n \"destination\": \"LHR\"\n },\n \"pieces\": 8,\n \"grossWeightKg\": 980,\n \"commodity\": {\n \"code\": \"GEN\",\n \"description\": \"General Cargo\"\n },\n \"dimensionsCm\": [\n {\n \"l\": 120,\n \"w\": 100,\n \"h\": 80,\n \"pieces\": 8\n }\n ],\n \"shc\": [\n \"PER\"\n ],\n \"deliveryToAirlineDate\": \"2024-01-01\",\n \"notes\": \"Stackable\",\n \"airlineFilter\": [\n \"PK\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/quotes")
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 \"shipper\": {\n \"name\": \"ABC Exports (Pvt) Ltd\"\n },\n \"consignee\": {\n \"name\": \"London Imports Ltd\"\n },\n \"routing\": {\n \"origin\": \"KHI\",\n \"destination\": \"LHR\"\n },\n \"pieces\": 8,\n \"grossWeightKg\": 980,\n \"commodity\": {\n \"code\": \"GEN\",\n \"description\": \"General Cargo\"\n },\n \"dimensionsCm\": [\n {\n \"l\": 120,\n \"w\": 100,\n \"h\": 80,\n \"pieces\": 8\n }\n ],\n \"shc\": [\n \"PER\"\n ],\n \"deliveryToAirlineDate\": \"2024-01-01\",\n \"notes\": \"Stackable\",\n \"airlineFilter\": [\n \"PK\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "quote-123",
"status": "pending",
"origin": "DOH",
"destination": "LHR",
"pieces": 10,
"weight": 500,
"volume": 2.5,
"commodity": "GEN",
"shc": [
"PER"
],
"createdAt": "2024-01-01T10:00:00Z",
"priceOptions": [
{
"flightNumber": "QR123",
"departureDate": "2024-01-15",
"pricePerKg": 2.5,
"totalAmount": 2450,
"currency": "USD",
"validityHours": 24
}
]
}{
"error": "invalid_request",
"errorDescription": "Missing required field: 'grossWeightKg' is required.",
"errorUri": "https://docs.example.com/cargo/errors"
}Create a Request for Quote (RFQ) for cargo transportation.
Reference Documentation
For more information on consignor contacts ACA, please refer to:
- Pages 9-11 of “Functional_Requirements_V18 FINAL”: https://belli.sg/4nxxCDR
Authorizations
ApiKeyAuthApiKeyHeader
Body
application/json
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Example:
8
Example:
980
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Example:
"2024-01-01"
Example:
"Stackable"
Response
RFQ created
Example:
"quote-123"
Available options:
pending, priced, accepted, rejected Example:
"pending"
Example:
"DOH"
Example:
"LHR"
Example:
10
Example:
500
Example:
2.5
Example:
"GEN"
Example:
["PER"]
Example:
"2024-01-01T10:00:00Z"
Show child attributes
Show child attributes
⌘I