curl --request PUT \
--url https://api.example.com/{supplierapi}/product/{productId}/price/{productPricesDetailsId} \
--header 'Content-Type: application/json' \
--data '
{
"fareTypeCategoryId": 123,
"agents": [
123
],
"allowEmptyRedeemerDetails": true,
"allowOpenDated": true,
"bookingSystemMapping": [
"<string>"
],
"cancellationFeePolicyId": 123,
"childMaxAge": 123,
"childMinAge": 123,
"defaultFare": true,
"duration": 123,
"durationNights": 123,
"earlyBirdLeadDays": 123,
"fareName": "<string>",
"fareQtyRestrictions": 123,
"levy": 123,
"levyDescription": "<string>",
"netRate": 123,
"note": "<string>",
"numAdults": 123,
"numChildren": 123,
"pax": 123,
"periodEnd": "2023-12-25",
"periodStart": "2023-12-25",
"packageOnlyFare": true,
"rrp": 123,
"travelEnd": "2023-12-25",
"travelStart": "2023-12-25"
}
'import requests
url = "https://api.example.com/{supplierapi}/product/{productId}/price/{productPricesDetailsId}"
payload = {
"fareTypeCategoryId": 123,
"agents": [123],
"allowEmptyRedeemerDetails": True,
"allowOpenDated": True,
"bookingSystemMapping": ["<string>"],
"cancellationFeePolicyId": 123,
"childMaxAge": 123,
"childMinAge": 123,
"defaultFare": True,
"duration": 123,
"durationNights": 123,
"earlyBirdLeadDays": 123,
"fareName": "<string>",
"fareQtyRestrictions": 123,
"levy": 123,
"levyDescription": "<string>",
"netRate": 123,
"note": "<string>",
"numAdults": 123,
"numChildren": 123,
"pax": 123,
"periodEnd": "2023-12-25",
"periodStart": "2023-12-25",
"packageOnlyFare": True,
"rrp": 123,
"travelEnd": "2023-12-25",
"travelStart": "2023-12-25"
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
fareTypeCategoryId: 123,
agents: [123],
allowEmptyRedeemerDetails: true,
allowOpenDated: true,
bookingSystemMapping: ['<string>'],
cancellationFeePolicyId: 123,
childMaxAge: 123,
childMinAge: 123,
defaultFare: true,
duration: 123,
durationNights: 123,
earlyBirdLeadDays: 123,
fareName: '<string>',
fareQtyRestrictions: 123,
levy: 123,
levyDescription: '<string>',
netRate: 123,
note: '<string>',
numAdults: 123,
numChildren: 123,
pax: 123,
periodEnd: '2023-12-25',
periodStart: '2023-12-25',
packageOnlyFare: true,
rrp: 123,
travelEnd: '2023-12-25',
travelStart: '2023-12-25'
})
};
fetch('https://api.example.com/{supplierapi}/product/{productId}/price/{productPricesDetailsId}', 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/{productPricesDetailsId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'fareTypeCategoryId' => 123,
'agents' => [
123
],
'allowEmptyRedeemerDetails' => true,
'allowOpenDated' => true,
'bookingSystemMapping' => [
'<string>'
],
'cancellationFeePolicyId' => 123,
'childMaxAge' => 123,
'childMinAge' => 123,
'defaultFare' => true,
'duration' => 123,
'durationNights' => 123,
'earlyBirdLeadDays' => 123,
'fareName' => '<string>',
'fareQtyRestrictions' => 123,
'levy' => 123,
'levyDescription' => '<string>',
'netRate' => 123,
'note' => '<string>',
'numAdults' => 123,
'numChildren' => 123,
'pax' => 123,
'periodEnd' => '2023-12-25',
'periodStart' => '2023-12-25',
'packageOnlyFare' => true,
'rrp' => 123,
'travelEnd' => '2023-12-25',
'travelStart' => '2023-12-25'
]),
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/{productPricesDetailsId}"
payload := strings.NewReader("{\n \"fareTypeCategoryId\": 123,\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 \"duration\": 123,\n \"durationNights\": 123,\n \"earlyBirdLeadDays\": 123,\n \"fareName\": \"<string>\",\n \"fareQtyRestrictions\": 123,\n \"levy\": 123,\n \"levyDescription\": \"<string>\",\n \"netRate\": 123,\n \"note\": \"<string>\",\n \"numAdults\": 123,\n \"numChildren\": 123,\n \"pax\": 123,\n \"periodEnd\": \"2023-12-25\",\n \"periodStart\": \"2023-12-25\",\n \"packageOnlyFare\": true,\n \"rrp\": 123,\n \"travelEnd\": \"2023-12-25\",\n \"travelStart\": \"2023-12-25\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.example.com/{supplierapi}/product/{productId}/price/{productPricesDetailsId}")
.header("Content-Type", "application/json")
.body("{\n \"fareTypeCategoryId\": 123,\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 \"duration\": 123,\n \"durationNights\": 123,\n \"earlyBirdLeadDays\": 123,\n \"fareName\": \"<string>\",\n \"fareQtyRestrictions\": 123,\n \"levy\": 123,\n \"levyDescription\": \"<string>\",\n \"netRate\": 123,\n \"note\": \"<string>\",\n \"numAdults\": 123,\n \"numChildren\": 123,\n \"pax\": 123,\n \"periodEnd\": \"2023-12-25\",\n \"periodStart\": \"2023-12-25\",\n \"packageOnlyFare\": true,\n \"rrp\": 123,\n \"travelEnd\": \"2023-12-25\",\n \"travelStart\": \"2023-12-25\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/{supplierapi}/product/{productId}/price/{productPricesDetailsId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"fareTypeCategoryId\": 123,\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 \"duration\": 123,\n \"durationNights\": 123,\n \"earlyBirdLeadDays\": 123,\n \"fareName\": \"<string>\",\n \"fareQtyRestrictions\": 123,\n \"levy\": 123,\n \"levyDescription\": \"<string>\",\n \"netRate\": 123,\n \"note\": \"<string>\",\n \"numAdults\": 123,\n \"numChildren\": 123,\n \"pax\": 123,\n \"periodEnd\": \"2023-12-25\",\n \"periodStart\": \"2023-12-25\",\n \"packageOnlyFare\": true,\n \"rrp\": 123,\n \"travelEnd\": \"2023-12-25\",\n \"travelStart\": \"2023-12-25\"\n}"
response = http.request(request)
puts response.read_bodyUpdate a Price
Update a Price
Update a Price. All fields are optional; you only need to pass in the fields that you want to change. When editing a live price, a copy will be made of the price in draft status, and the ID of this new price will be returned in the response body. This means that the existing live price will remain in effect until the new draft price has gone through our product approval process. On the other hand, edits to draft prices and to MarketPlace prices which have been directly negotiated between supplier and agent will be made to the existing Price, and no response body will be returned.
Response
Top Level Result Object
| Field name | Nullable | Type | Description |
|---|---|---|---|
| productPricesDetailsId | n | Integer | ID of new Price (if any). |
curl --request PUT \
--url https://api.example.com/{supplierapi}/product/{productId}/price/{productPricesDetailsId} \
--header 'Content-Type: application/json' \
--data '
{
"fareTypeCategoryId": 123,
"agents": [
123
],
"allowEmptyRedeemerDetails": true,
"allowOpenDated": true,
"bookingSystemMapping": [
"<string>"
],
"cancellationFeePolicyId": 123,
"childMaxAge": 123,
"childMinAge": 123,
"defaultFare": true,
"duration": 123,
"durationNights": 123,
"earlyBirdLeadDays": 123,
"fareName": "<string>",
"fareQtyRestrictions": 123,
"levy": 123,
"levyDescription": "<string>",
"netRate": 123,
"note": "<string>",
"numAdults": 123,
"numChildren": 123,
"pax": 123,
"periodEnd": "2023-12-25",
"periodStart": "2023-12-25",
"packageOnlyFare": true,
"rrp": 123,
"travelEnd": "2023-12-25",
"travelStart": "2023-12-25"
}
'import requests
url = "https://api.example.com/{supplierapi}/product/{productId}/price/{productPricesDetailsId}"
payload = {
"fareTypeCategoryId": 123,
"agents": [123],
"allowEmptyRedeemerDetails": True,
"allowOpenDated": True,
"bookingSystemMapping": ["<string>"],
"cancellationFeePolicyId": 123,
"childMaxAge": 123,
"childMinAge": 123,
"defaultFare": True,
"duration": 123,
"durationNights": 123,
"earlyBirdLeadDays": 123,
"fareName": "<string>",
"fareQtyRestrictions": 123,
"levy": 123,
"levyDescription": "<string>",
"netRate": 123,
"note": "<string>",
"numAdults": 123,
"numChildren": 123,
"pax": 123,
"periodEnd": "2023-12-25",
"periodStart": "2023-12-25",
"packageOnlyFare": True,
"rrp": 123,
"travelEnd": "2023-12-25",
"travelStart": "2023-12-25"
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
fareTypeCategoryId: 123,
agents: [123],
allowEmptyRedeemerDetails: true,
allowOpenDated: true,
bookingSystemMapping: ['<string>'],
cancellationFeePolicyId: 123,
childMaxAge: 123,
childMinAge: 123,
defaultFare: true,
duration: 123,
durationNights: 123,
earlyBirdLeadDays: 123,
fareName: '<string>',
fareQtyRestrictions: 123,
levy: 123,
levyDescription: '<string>',
netRate: 123,
note: '<string>',
numAdults: 123,
numChildren: 123,
pax: 123,
periodEnd: '2023-12-25',
periodStart: '2023-12-25',
packageOnlyFare: true,
rrp: 123,
travelEnd: '2023-12-25',
travelStart: '2023-12-25'
})
};
fetch('https://api.example.com/{supplierapi}/product/{productId}/price/{productPricesDetailsId}', 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/{productPricesDetailsId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'fareTypeCategoryId' => 123,
'agents' => [
123
],
'allowEmptyRedeemerDetails' => true,
'allowOpenDated' => true,
'bookingSystemMapping' => [
'<string>'
],
'cancellationFeePolicyId' => 123,
'childMaxAge' => 123,
'childMinAge' => 123,
'defaultFare' => true,
'duration' => 123,
'durationNights' => 123,
'earlyBirdLeadDays' => 123,
'fareName' => '<string>',
'fareQtyRestrictions' => 123,
'levy' => 123,
'levyDescription' => '<string>',
'netRate' => 123,
'note' => '<string>',
'numAdults' => 123,
'numChildren' => 123,
'pax' => 123,
'periodEnd' => '2023-12-25',
'periodStart' => '2023-12-25',
'packageOnlyFare' => true,
'rrp' => 123,
'travelEnd' => '2023-12-25',
'travelStart' => '2023-12-25'
]),
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/{productPricesDetailsId}"
payload := strings.NewReader("{\n \"fareTypeCategoryId\": 123,\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 \"duration\": 123,\n \"durationNights\": 123,\n \"earlyBirdLeadDays\": 123,\n \"fareName\": \"<string>\",\n \"fareQtyRestrictions\": 123,\n \"levy\": 123,\n \"levyDescription\": \"<string>\",\n \"netRate\": 123,\n \"note\": \"<string>\",\n \"numAdults\": 123,\n \"numChildren\": 123,\n \"pax\": 123,\n \"periodEnd\": \"2023-12-25\",\n \"periodStart\": \"2023-12-25\",\n \"packageOnlyFare\": true,\n \"rrp\": 123,\n \"travelEnd\": \"2023-12-25\",\n \"travelStart\": \"2023-12-25\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.example.com/{supplierapi}/product/{productId}/price/{productPricesDetailsId}")
.header("Content-Type", "application/json")
.body("{\n \"fareTypeCategoryId\": 123,\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 \"duration\": 123,\n \"durationNights\": 123,\n \"earlyBirdLeadDays\": 123,\n \"fareName\": \"<string>\",\n \"fareQtyRestrictions\": 123,\n \"levy\": 123,\n \"levyDescription\": \"<string>\",\n \"netRate\": 123,\n \"note\": \"<string>\",\n \"numAdults\": 123,\n \"numChildren\": 123,\n \"pax\": 123,\n \"periodEnd\": \"2023-12-25\",\n \"periodStart\": \"2023-12-25\",\n \"packageOnlyFare\": true,\n \"rrp\": 123,\n \"travelEnd\": \"2023-12-25\",\n \"travelStart\": \"2023-12-25\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/{supplierapi}/product/{productId}/price/{productPricesDetailsId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"fareTypeCategoryId\": 123,\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 \"duration\": 123,\n \"durationNights\": 123,\n \"earlyBirdLeadDays\": 123,\n \"fareName\": \"<string>\",\n \"fareQtyRestrictions\": 123,\n \"levy\": 123,\n \"levyDescription\": \"<string>\",\n \"netRate\": 123,\n \"note\": \"<string>\",\n \"numAdults\": 123,\n \"numChildren\": 123,\n \"pax\": 123,\n \"periodEnd\": \"2023-12-25\",\n \"periodStart\": \"2023-12-25\",\n \"packageOnlyFare\": true,\n \"rrp\": 123,\n \"travelEnd\": \"2023-12-25\",\n \"travelStart\": \"2023-12-25\"\n}"
response = http.request(request)
puts response.read_bodyPath Parameters
supplier|apiv1/supplier\d+\d+Body
Update price details for a product.
ID of Fare Type Category.
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 days.
Duration of the tour in nights.
Lead time that fare must be booked in advance.
Name of the Fare Type.
Total quantity this fare that agents must select.
Any levy charged on top of RRP at point of travel.
Description of levy.
Net or wholesale price.
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.
Number of people the price covers.
End date of the active period.
Start date of the active period.
Is this a Package only fare?
Recommended retail price.
End date of the travel period.
Start date of the travel period.
Response
Returned when new draft price created successfully.