curl --request POST \
--url https://api.example.com/{supplierapi}/product/{productId}/price \
--header 'Content-Type: application/json' \
--data '
{
"duration": 123,
"fareName": "<string>",
"fareTypeCategoryId": 123,
"levy": 123,
"netRate": 123,
"pax": 123,
"periodStart": "2023-12-25",
"rrp": 123,
"currency": "<string>",
"agents": [
123
],
"allowEmptyRedeemerDetails": true,
"allowOpenDated": true,
"bookingSystemMapping": [
"<string>"
],
"cancellationFeePolicyId": 123,
"childMaxAge": 123,
"childMinAge": 123,
"defaultFare": true,
"durationNights": 123,
"earlyBirdLeadDays": 123,
"fareQtyRestrictions": 123,
"levyDescription": "<string>",
"note": "<string>",
"numAdults": 123,
"numChildren": 123,
"periodEnd": "2023-12-25",
"packageOnlyFare": true,
"travelEnd": "2023-12-25",
"travelStart": "2023-12-25",
"fareTagIds": [
123
]
}
'import requests
url = "https://api.example.com/{supplierapi}/product/{productId}/price"
payload = {
"duration": 123,
"fareName": "<string>",
"fareTypeCategoryId": 123,
"levy": 123,
"netRate": 123,
"pax": 123,
"periodStart": "2023-12-25",
"rrp": 123,
"currency": "<string>",
"agents": [123],
"allowEmptyRedeemerDetails": True,
"allowOpenDated": True,
"bookingSystemMapping": ["<string>"],
"cancellationFeePolicyId": 123,
"childMaxAge": 123,
"childMinAge": 123,
"defaultFare": True,
"durationNights": 123,
"earlyBirdLeadDays": 123,
"fareQtyRestrictions": 123,
"levyDescription": "<string>",
"note": "<string>",
"numAdults": 123,
"numChildren": 123,
"periodEnd": "2023-12-25",
"packageOnlyFare": True,
"travelEnd": "2023-12-25",
"travelStart": "2023-12-25",
"fareTagIds": [123]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
duration: 123,
fareName: '<string>',
fareTypeCategoryId: 123,
levy: 123,
netRate: 123,
pax: 123,
periodStart: '2023-12-25',
rrp: 123,
currency: '<string>',
agents: [123],
allowEmptyRedeemerDetails: true,
allowOpenDated: true,
bookingSystemMapping: ['<string>'],
cancellationFeePolicyId: 123,
childMaxAge: 123,
childMinAge: 123,
defaultFare: true,
durationNights: 123,
earlyBirdLeadDays: 123,
fareQtyRestrictions: 123,
levyDescription: '<string>',
note: '<string>',
numAdults: 123,
numChildren: 123,
periodEnd: '2023-12-25',
packageOnlyFare: true,
travelEnd: '2023-12-25',
travelStart: '2023-12-25',
fareTagIds: [123]
})
};
fetch('https://api.example.com/{supplierapi}/product/{productId}/price', 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://api.example.com/{supplierapi}/product/{productId}/price",
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([
'duration' => 123,
'fareName' => '<string>',
'fareTypeCategoryId' => 123,
'levy' => 123,
'netRate' => 123,
'pax' => 123,
'periodStart' => '2023-12-25',
'rrp' => 123,
'currency' => '<string>',
'agents' => [
123
],
'allowEmptyRedeemerDetails' => true,
'allowOpenDated' => true,
'bookingSystemMapping' => [
'<string>'
],
'cancellationFeePolicyId' => 123,
'childMaxAge' => 123,
'childMinAge' => 123,
'defaultFare' => true,
'durationNights' => 123,
'earlyBirdLeadDays' => 123,
'fareQtyRestrictions' => 123,
'levyDescription' => '<string>',
'note' => '<string>',
'numAdults' => 123,
'numChildren' => 123,
'periodEnd' => '2023-12-25',
'packageOnlyFare' => true,
'travelEnd' => '2023-12-25',
'travelStart' => '2023-12-25',
'fareTagIds' => [
123
]
]),
CURLOPT_HTTPHEADER => [
"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://api.example.com/{supplierapi}/product/{productId}/price"
payload := strings.NewReader("{\n \"duration\": 123,\n \"fareName\": \"<string>\",\n \"fareTypeCategoryId\": 123,\n \"levy\": 123,\n \"netRate\": 123,\n \"pax\": 123,\n \"periodStart\": \"2023-12-25\",\n \"rrp\": 123,\n \"currency\": \"<string>\",\n \"agents\": [\n 123\n ],\n \"allowEmptyRedeemerDetails\": true,\n \"allowOpenDated\": true,\n \"bookingSystemMapping\": [\n \"<string>\"\n ],\n \"cancellationFeePolicyId\": 123,\n \"childMaxAge\": 123,\n \"childMinAge\": 123,\n \"defaultFare\": true,\n \"durationNights\": 123,\n \"earlyBirdLeadDays\": 123,\n \"fareQtyRestrictions\": 123,\n \"levyDescription\": \"<string>\",\n \"note\": \"<string>\",\n \"numAdults\": 123,\n \"numChildren\": 123,\n \"periodEnd\": \"2023-12-25\",\n \"packageOnlyFare\": true,\n \"travelEnd\": \"2023-12-25\",\n \"travelStart\": \"2023-12-25\",\n \"fareTagIds\": [\n 123\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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://api.example.com/{supplierapi}/product/{productId}/price")
.header("Content-Type", "application/json")
.body("{\n \"duration\": 123,\n \"fareName\": \"<string>\",\n \"fareTypeCategoryId\": 123,\n \"levy\": 123,\n \"netRate\": 123,\n \"pax\": 123,\n \"periodStart\": \"2023-12-25\",\n \"rrp\": 123,\n \"currency\": \"<string>\",\n \"agents\": [\n 123\n ],\n \"allowEmptyRedeemerDetails\": true,\n \"allowOpenDated\": true,\n \"bookingSystemMapping\": [\n \"<string>\"\n ],\n \"cancellationFeePolicyId\": 123,\n \"childMaxAge\": 123,\n \"childMinAge\": 123,\n \"defaultFare\": true,\n \"durationNights\": 123,\n \"earlyBirdLeadDays\": 123,\n \"fareQtyRestrictions\": 123,\n \"levyDescription\": \"<string>\",\n \"note\": \"<string>\",\n \"numAdults\": 123,\n \"numChildren\": 123,\n \"periodEnd\": \"2023-12-25\",\n \"packageOnlyFare\": true,\n \"travelEnd\": \"2023-12-25\",\n \"travelStart\": \"2023-12-25\",\n \"fareTagIds\": [\n 123\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/{supplierapi}/product/{productId}/price")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"duration\": 123,\n \"fareName\": \"<string>\",\n \"fareTypeCategoryId\": 123,\n \"levy\": 123,\n \"netRate\": 123,\n \"pax\": 123,\n \"periodStart\": \"2023-12-25\",\n \"rrp\": 123,\n \"currency\": \"<string>\",\n \"agents\": [\n 123\n ],\n \"allowEmptyRedeemerDetails\": true,\n \"allowOpenDated\": true,\n \"bookingSystemMapping\": [\n \"<string>\"\n ],\n \"cancellationFeePolicyId\": 123,\n \"childMaxAge\": 123,\n \"childMinAge\": 123,\n \"defaultFare\": true,\n \"durationNights\": 123,\n \"earlyBirdLeadDays\": 123,\n \"fareQtyRestrictions\": 123,\n \"levyDescription\": \"<string>\",\n \"note\": \"<string>\",\n \"numAdults\": 123,\n \"numChildren\": 123,\n \"periodEnd\": \"2023-12-25\",\n \"packageOnlyFare\": true,\n \"travelEnd\": \"2023-12-25\",\n \"travelStart\": \"2023-12-25\",\n \"fareTagIds\": [\n 123\n ]\n}"
response = http.request(request)
puts response.read_bodyAdd a price to a Product
Add a price to a Product
Adds a price to the Product based on the JSON array of data provided.
Response
Top Level Result Object
| Field name | Nullable | Type | Description |
|---|---|---|---|
| productPricesDetailsId | n | Integer | ID of the newly created Product Prices Detail. |
curl --request POST \
--url https://api.example.com/{supplierapi}/product/{productId}/price \
--header 'Content-Type: application/json' \
--data '
{
"duration": 123,
"fareName": "<string>",
"fareTypeCategoryId": 123,
"levy": 123,
"netRate": 123,
"pax": 123,
"periodStart": "2023-12-25",
"rrp": 123,
"currency": "<string>",
"agents": [
123
],
"allowEmptyRedeemerDetails": true,
"allowOpenDated": true,
"bookingSystemMapping": [
"<string>"
],
"cancellationFeePolicyId": 123,
"childMaxAge": 123,
"childMinAge": 123,
"defaultFare": true,
"durationNights": 123,
"earlyBirdLeadDays": 123,
"fareQtyRestrictions": 123,
"levyDescription": "<string>",
"note": "<string>",
"numAdults": 123,
"numChildren": 123,
"periodEnd": "2023-12-25",
"packageOnlyFare": true,
"travelEnd": "2023-12-25",
"travelStart": "2023-12-25",
"fareTagIds": [
123
]
}
'import requests
url = "https://api.example.com/{supplierapi}/product/{productId}/price"
payload = {
"duration": 123,
"fareName": "<string>",
"fareTypeCategoryId": 123,
"levy": 123,
"netRate": 123,
"pax": 123,
"periodStart": "2023-12-25",
"rrp": 123,
"currency": "<string>",
"agents": [123],
"allowEmptyRedeemerDetails": True,
"allowOpenDated": True,
"bookingSystemMapping": ["<string>"],
"cancellationFeePolicyId": 123,
"childMaxAge": 123,
"childMinAge": 123,
"defaultFare": True,
"durationNights": 123,
"earlyBirdLeadDays": 123,
"fareQtyRestrictions": 123,
"levyDescription": "<string>",
"note": "<string>",
"numAdults": 123,
"numChildren": 123,
"periodEnd": "2023-12-25",
"packageOnlyFare": True,
"travelEnd": "2023-12-25",
"travelStart": "2023-12-25",
"fareTagIds": [123]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
duration: 123,
fareName: '<string>',
fareTypeCategoryId: 123,
levy: 123,
netRate: 123,
pax: 123,
periodStart: '2023-12-25',
rrp: 123,
currency: '<string>',
agents: [123],
allowEmptyRedeemerDetails: true,
allowOpenDated: true,
bookingSystemMapping: ['<string>'],
cancellationFeePolicyId: 123,
childMaxAge: 123,
childMinAge: 123,
defaultFare: true,
durationNights: 123,
earlyBirdLeadDays: 123,
fareQtyRestrictions: 123,
levyDescription: '<string>',
note: '<string>',
numAdults: 123,
numChildren: 123,
periodEnd: '2023-12-25',
packageOnlyFare: true,
travelEnd: '2023-12-25',
travelStart: '2023-12-25',
fareTagIds: [123]
})
};
fetch('https://api.example.com/{supplierapi}/product/{productId}/price', 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://api.example.com/{supplierapi}/product/{productId}/price",
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([
'duration' => 123,
'fareName' => '<string>',
'fareTypeCategoryId' => 123,
'levy' => 123,
'netRate' => 123,
'pax' => 123,
'periodStart' => '2023-12-25',
'rrp' => 123,
'currency' => '<string>',
'agents' => [
123
],
'allowEmptyRedeemerDetails' => true,
'allowOpenDated' => true,
'bookingSystemMapping' => [
'<string>'
],
'cancellationFeePolicyId' => 123,
'childMaxAge' => 123,
'childMinAge' => 123,
'defaultFare' => true,
'durationNights' => 123,
'earlyBirdLeadDays' => 123,
'fareQtyRestrictions' => 123,
'levyDescription' => '<string>',
'note' => '<string>',
'numAdults' => 123,
'numChildren' => 123,
'periodEnd' => '2023-12-25',
'packageOnlyFare' => true,
'travelEnd' => '2023-12-25',
'travelStart' => '2023-12-25',
'fareTagIds' => [
123
]
]),
CURLOPT_HTTPHEADER => [
"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://api.example.com/{supplierapi}/product/{productId}/price"
payload := strings.NewReader("{\n \"duration\": 123,\n \"fareName\": \"<string>\",\n \"fareTypeCategoryId\": 123,\n \"levy\": 123,\n \"netRate\": 123,\n \"pax\": 123,\n \"periodStart\": \"2023-12-25\",\n \"rrp\": 123,\n \"currency\": \"<string>\",\n \"agents\": [\n 123\n ],\n \"allowEmptyRedeemerDetails\": true,\n \"allowOpenDated\": true,\n \"bookingSystemMapping\": [\n \"<string>\"\n ],\n \"cancellationFeePolicyId\": 123,\n \"childMaxAge\": 123,\n \"childMinAge\": 123,\n \"defaultFare\": true,\n \"durationNights\": 123,\n \"earlyBirdLeadDays\": 123,\n \"fareQtyRestrictions\": 123,\n \"levyDescription\": \"<string>\",\n \"note\": \"<string>\",\n \"numAdults\": 123,\n \"numChildren\": 123,\n \"periodEnd\": \"2023-12-25\",\n \"packageOnlyFare\": true,\n \"travelEnd\": \"2023-12-25\",\n \"travelStart\": \"2023-12-25\",\n \"fareTagIds\": [\n 123\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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://api.example.com/{supplierapi}/product/{productId}/price")
.header("Content-Type", "application/json")
.body("{\n \"duration\": 123,\n \"fareName\": \"<string>\",\n \"fareTypeCategoryId\": 123,\n \"levy\": 123,\n \"netRate\": 123,\n \"pax\": 123,\n \"periodStart\": \"2023-12-25\",\n \"rrp\": 123,\n \"currency\": \"<string>\",\n \"agents\": [\n 123\n ],\n \"allowEmptyRedeemerDetails\": true,\n \"allowOpenDated\": true,\n \"bookingSystemMapping\": [\n \"<string>\"\n ],\n \"cancellationFeePolicyId\": 123,\n \"childMaxAge\": 123,\n \"childMinAge\": 123,\n \"defaultFare\": true,\n \"durationNights\": 123,\n \"earlyBirdLeadDays\": 123,\n \"fareQtyRestrictions\": 123,\n \"levyDescription\": \"<string>\",\n \"note\": \"<string>\",\n \"numAdults\": 123,\n \"numChildren\": 123,\n \"periodEnd\": \"2023-12-25\",\n \"packageOnlyFare\": true,\n \"travelEnd\": \"2023-12-25\",\n \"travelStart\": \"2023-12-25\",\n \"fareTagIds\": [\n 123\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/{supplierapi}/product/{productId}/price")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"duration\": 123,\n \"fareName\": \"<string>\",\n \"fareTypeCategoryId\": 123,\n \"levy\": 123,\n \"netRate\": 123,\n \"pax\": 123,\n \"periodStart\": \"2023-12-25\",\n \"rrp\": 123,\n \"currency\": \"<string>\",\n \"agents\": [\n 123\n ],\n \"allowEmptyRedeemerDetails\": true,\n \"allowOpenDated\": true,\n \"bookingSystemMapping\": [\n \"<string>\"\n ],\n \"cancellationFeePolicyId\": 123,\n \"childMaxAge\": 123,\n \"childMinAge\": 123,\n \"defaultFare\": true,\n \"durationNights\": 123,\n \"earlyBirdLeadDays\": 123,\n \"fareQtyRestrictions\": 123,\n \"levyDescription\": \"<string>\",\n \"note\": \"<string>\",\n \"numAdults\": 123,\n \"numChildren\": 123,\n \"periodEnd\": \"2023-12-25\",\n \"packageOnlyFare\": true,\n \"travelEnd\": \"2023-12-25\",\n \"travelStart\": \"2023-12-25\",\n \"fareTagIds\": [\n 123\n ]\n}"
response = http.request(request)
puts response.read_bodyPath Parameters
supplier|apiv1/supplier\d+Body
Add price details for a product.
Duration of the tour in days.
Name of the Fare Type.
ID of Fare Type Category.
Any levy charged on top of RRP at point of travel.
Net or wholesale price.
Number of people the price covers.
Start date of the active period.
Recommended retail price.
ISO 4217 currency code.
Ids of the agents that have access to this price.
Allow empty redeemer details.
Allow open dated bookings.
Fields used to map product to an external reservation system.
ID of product's cancellation fee policy.
Maximum age for children to be eligible.
Minimum age for children to be eligible.
Is this the default fare for the Product?
Duration of the tour in nights.
Lead time that fare must be booked in advance.
Total quantity this fare that agents must select.
Description of levy.
Any special comments made by Supplier.
Number of adults who are eligible to travel on this fare.
Number of children who are eligible to travel on this fare.
End date of the active period.
Is this a Package only fare?
End date of the travel period.
Start date of the travel period.
IDs of Fare Tag as array. Get ID of Fare Tag using /categories/faretags
Response
Returned when successful.