Submit consignor price proposal
curl --request POST \
--url https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/quotes/{id}/respond \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"selectedPricing": {
"flightNumber": "QR123",
"departureDate": "2024-01-15",
"pricePerKg": 2.5,
"totalAmount": 2450,
"currency": "USD",
"validityHours": 24
},
"comments": "Accepting this pricing option"
}
'import requests
url = "https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/quotes/{id}/respond"
payload = {
"selectedPricing": {
"flightNumber": "QR123",
"departureDate": "2024-01-15",
"pricePerKg": 2.5,
"totalAmount": 2450,
"currency": "USD",
"validityHours": 24
},
"comments": "Accepting this pricing option"
}
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({
selectedPricing: {
flightNumber: 'QR123',
departureDate: '2024-01-15',
pricePerKg: 2.5,
totalAmount: 2450,
currency: 'USD',
validityHours: 24
},
comments: 'Accepting this pricing option'
})
};
fetch('https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/quotes/{id}/respond', 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/{id}/respond",
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([
'selectedPricing' => [
'flightNumber' => 'QR123',
'departureDate' => '2024-01-15',
'pricePerKg' => 2.5,
'totalAmount' => 2450,
'currency' => 'USD',
'validityHours' => 24
],
'comments' => 'Accepting this pricing option'
]),
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/{id}/respond"
payload := strings.NewReader("{\n \"selectedPricing\": {\n \"flightNumber\": \"QR123\",\n \"departureDate\": \"2024-01-15\",\n \"pricePerKg\": 2.5,\n \"totalAmount\": 2450,\n \"currency\": \"USD\",\n \"validityHours\": 24\n },\n \"comments\": \"Accepting this pricing option\"\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/{id}/respond")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"selectedPricing\": {\n \"flightNumber\": \"QR123\",\n \"departureDate\": \"2024-01-15\",\n \"pricePerKg\": 2.5,\n \"totalAmount\": 2450,\n \"currency\": \"USD\",\n \"validityHours\": 24\n },\n \"comments\": \"Accepting this pricing option\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/quotes/{id}/respond")
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 \"selectedPricing\": {\n \"flightNumber\": \"QR123\",\n \"departureDate\": \"2024-01-15\",\n \"pricePerKg\": 2.5,\n \"totalAmount\": 2450,\n \"currency\": \"USD\",\n \"validityHours\": 24\n },\n \"comments\": \"Accepting this pricing option\"\n}"
response = http.request(request)
puts response.read_body{
"quoteId": "quote-123",
"status": "priced",
"selectedPricing": {
"flightNumber": "QR123",
"departureDate": "2024-01-15",
"pricePerKg": 2.5,
"totalAmount": 2450,
"currency": "USD",
"validityHours": 24
}
}Quotes
Respond to Quote
Consignor submits price proposal using airline quote
POST
/
api
/
quotes
/
{id}
/
respond
Submit consignor price proposal
curl --request POST \
--url https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/quotes/{id}/respond \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"selectedPricing": {
"flightNumber": "QR123",
"departureDate": "2024-01-15",
"pricePerKg": 2.5,
"totalAmount": 2450,
"currency": "USD",
"validityHours": 24
},
"comments": "Accepting this pricing option"
}
'import requests
url = "https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/quotes/{id}/respond"
payload = {
"selectedPricing": {
"flightNumber": "QR123",
"departureDate": "2024-01-15",
"pricePerKg": 2.5,
"totalAmount": 2450,
"currency": "USD",
"validityHours": 24
},
"comments": "Accepting this pricing option"
}
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({
selectedPricing: {
flightNumber: 'QR123',
departureDate: '2024-01-15',
pricePerKg: 2.5,
totalAmount: 2450,
currency: 'USD',
validityHours: 24
},
comments: 'Accepting this pricing option'
})
};
fetch('https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/quotes/{id}/respond', 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/{id}/respond",
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([
'selectedPricing' => [
'flightNumber' => 'QR123',
'departureDate' => '2024-01-15',
'pricePerKg' => 2.5,
'totalAmount' => 2450,
'currency' => 'USD',
'validityHours' => 24
],
'comments' => 'Accepting this pricing option'
]),
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/{id}/respond"
payload := strings.NewReader("{\n \"selectedPricing\": {\n \"flightNumber\": \"QR123\",\n \"departureDate\": \"2024-01-15\",\n \"pricePerKg\": 2.5,\n \"totalAmount\": 2450,\n \"currency\": \"USD\",\n \"validityHours\": 24\n },\n \"comments\": \"Accepting this pricing option\"\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/{id}/respond")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"selectedPricing\": {\n \"flightNumber\": \"QR123\",\n \"departureDate\": \"2024-01-15\",\n \"pricePerKg\": 2.5,\n \"totalAmount\": 2450,\n \"currency\": \"USD\",\n \"validityHours\": 24\n },\n \"comments\": \"Accepting this pricing option\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/quotes/{id}/respond")
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 \"selectedPricing\": {\n \"flightNumber\": \"QR123\",\n \"departureDate\": \"2024-01-15\",\n \"pricePerKg\": 2.5,\n \"totalAmount\": 2450,\n \"currency\": \"USD\",\n \"validityHours\": 24\n },\n \"comments\": \"Accepting this pricing option\"\n}"
response = http.request(request)
puts response.read_body{
"quoteId": "quote-123",
"status": "priced",
"selectedPricing": {
"flightNumber": "QR123",
"departureDate": "2024-01-15",
"pricePerKg": 2.5,
"totalAmount": 2450,
"currency": "USD",
"validityHours": 24
}
}ACA/consignor responds to airline price proposal.
Reference Documentation
For more information on ACA quote confirmation, please refer to:
- Pages 18-19 of “Functional_Requirements_V18 FINAL”: https://belli.sg/4nxxCDR
Authorizations
ApiKeyAuthApiKeyHeader
Path Parameters
Quote ID
Body
application/json
⌘I