curl --request POST \
--url https://api.example.com/{supplierapi}/product \
--header 'Content-Type: application/json' \
--data '
{
"productName": "<string>",
"country": "<string>",
"productClassId": 123,
"addressLineOne": "<string>",
"addressCity": "<string>",
"addressPostcode": "<string>",
"mediaId": 123,
"timezone": "<string>",
"apiProviderId": 123,
"externalId": 123,
"rating": "<string>",
"teaser": "<string>",
"description": "<string>",
"itineraryDetails": [
"<string>"
],
"departuresPickups": "<string>",
"extras": "<string>",
"voucherInstructions": "<string>",
"voucherInformationContactDetailsBits": 123,
"agentInstructions": "<string>",
"noRefunds": true,
"noRefundsMessage": "<string>",
"cancellationFeePolicyId": 123,
"contactPhone": "<string>",
"contactEmail": "<string>",
"addressLineTwo": "<string>",
"addressSuburb": "<string>",
"addressState": "<string>",
"startLocation": 123,
"secondaryLocation": 123,
"endLocation": 123,
"activityTypes": [
123
],
"accommodationTypes": [
123
],
"transportTypes": [
123
],
"minAgeRecommendation": 123,
"maxAgeRecommendation": 123,
"ageRestriction": "<string>",
"fitnessRequirements": "<string>",
"minGroupSize": 123,
"maxGroupSize": 123,
"dietaryRequirements": "<string>",
"luggageRequirements": "<string>",
"includedItems": [
"<string>"
],
"bringItems": [
"<string>"
],
"voucherTerms": "<string>",
"weekDays": [
"<string>"
],
"departureDates": "<string>",
"recurrenceDate": "<string>",
"specialCircumstanceDate": "<string>",
"operatingPartner": "<string>",
"tourCode": "<string>",
"mandatoryFieldCheckout": [
"<string>"
]
}
'import requests
url = "https://api.example.com/{supplierapi}/product"
payload = {
"productName": "<string>",
"country": "<string>",
"productClassId": 123,
"addressLineOne": "<string>",
"addressCity": "<string>",
"addressPostcode": "<string>",
"mediaId": 123,
"timezone": "<string>",
"apiProviderId": 123,
"externalId": 123,
"rating": "<string>",
"teaser": "<string>",
"description": "<string>",
"itineraryDetails": ["<string>"],
"departuresPickups": "<string>",
"extras": "<string>",
"voucherInstructions": "<string>",
"voucherInformationContactDetailsBits": 123,
"agentInstructions": "<string>",
"noRefunds": True,
"noRefundsMessage": "<string>",
"cancellationFeePolicyId": 123,
"contactPhone": "<string>",
"contactEmail": "<string>",
"addressLineTwo": "<string>",
"addressSuburb": "<string>",
"addressState": "<string>",
"startLocation": 123,
"secondaryLocation": 123,
"endLocation": 123,
"activityTypes": [123],
"accommodationTypes": [123],
"transportTypes": [123],
"minAgeRecommendation": 123,
"maxAgeRecommendation": 123,
"ageRestriction": "<string>",
"fitnessRequirements": "<string>",
"minGroupSize": 123,
"maxGroupSize": 123,
"dietaryRequirements": "<string>",
"luggageRequirements": "<string>",
"includedItems": ["<string>"],
"bringItems": ["<string>"],
"voucherTerms": "<string>",
"weekDays": ["<string>"],
"departureDates": "<string>",
"recurrenceDate": "<string>",
"specialCircumstanceDate": "<string>",
"operatingPartner": "<string>",
"tourCode": "<string>",
"mandatoryFieldCheckout": ["<string>"]
}
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({
productName: '<string>',
country: '<string>',
productClassId: 123,
addressLineOne: '<string>',
addressCity: '<string>',
addressPostcode: '<string>',
mediaId: 123,
timezone: '<string>',
apiProviderId: 123,
externalId: 123,
rating: '<string>',
teaser: '<string>',
description: '<string>',
itineraryDetails: ['<string>'],
departuresPickups: '<string>',
extras: '<string>',
voucherInstructions: '<string>',
voucherInformationContactDetailsBits: 123,
agentInstructions: '<string>',
noRefunds: true,
noRefundsMessage: '<string>',
cancellationFeePolicyId: 123,
contactPhone: '<string>',
contactEmail: '<string>',
addressLineTwo: '<string>',
addressSuburb: '<string>',
addressState: '<string>',
startLocation: 123,
secondaryLocation: 123,
endLocation: 123,
activityTypes: [123],
accommodationTypes: [123],
transportTypes: [123],
minAgeRecommendation: 123,
maxAgeRecommendation: 123,
ageRestriction: '<string>',
fitnessRequirements: '<string>',
minGroupSize: 123,
maxGroupSize: 123,
dietaryRequirements: '<string>',
luggageRequirements: '<string>',
includedItems: ['<string>'],
bringItems: ['<string>'],
voucherTerms: '<string>',
weekDays: ['<string>'],
departureDates: '<string>',
recurrenceDate: '<string>',
specialCircumstanceDate: '<string>',
operatingPartner: '<string>',
tourCode: '<string>',
mandatoryFieldCheckout: ['<string>']
})
};
fetch('https://api.example.com/{supplierapi}/product', 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",
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([
'productName' => '<string>',
'country' => '<string>',
'productClassId' => 123,
'addressLineOne' => '<string>',
'addressCity' => '<string>',
'addressPostcode' => '<string>',
'mediaId' => 123,
'timezone' => '<string>',
'apiProviderId' => 123,
'externalId' => 123,
'rating' => '<string>',
'teaser' => '<string>',
'description' => '<string>',
'itineraryDetails' => [
'<string>'
],
'departuresPickups' => '<string>',
'extras' => '<string>',
'voucherInstructions' => '<string>',
'voucherInformationContactDetailsBits' => 123,
'agentInstructions' => '<string>',
'noRefunds' => true,
'noRefundsMessage' => '<string>',
'cancellationFeePolicyId' => 123,
'contactPhone' => '<string>',
'contactEmail' => '<string>',
'addressLineTwo' => '<string>',
'addressSuburb' => '<string>',
'addressState' => '<string>',
'startLocation' => 123,
'secondaryLocation' => 123,
'endLocation' => 123,
'activityTypes' => [
123
],
'accommodationTypes' => [
123
],
'transportTypes' => [
123
],
'minAgeRecommendation' => 123,
'maxAgeRecommendation' => 123,
'ageRestriction' => '<string>',
'fitnessRequirements' => '<string>',
'minGroupSize' => 123,
'maxGroupSize' => 123,
'dietaryRequirements' => '<string>',
'luggageRequirements' => '<string>',
'includedItems' => [
'<string>'
],
'bringItems' => [
'<string>'
],
'voucherTerms' => '<string>',
'weekDays' => [
'<string>'
],
'departureDates' => '<string>',
'recurrenceDate' => '<string>',
'specialCircumstanceDate' => '<string>',
'operatingPartner' => '<string>',
'tourCode' => '<string>',
'mandatoryFieldCheckout' => [
'<string>'
]
]),
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"
payload := strings.NewReader("{\n \"productName\": \"<string>\",\n \"country\": \"<string>\",\n \"productClassId\": 123,\n \"addressLineOne\": \"<string>\",\n \"addressCity\": \"<string>\",\n \"addressPostcode\": \"<string>\",\n \"mediaId\": 123,\n \"timezone\": \"<string>\",\n \"apiProviderId\": 123,\n \"externalId\": 123,\n \"rating\": \"<string>\",\n \"teaser\": \"<string>\",\n \"description\": \"<string>\",\n \"itineraryDetails\": [\n \"<string>\"\n ],\n \"departuresPickups\": \"<string>\",\n \"extras\": \"<string>\",\n \"voucherInstructions\": \"<string>\",\n \"voucherInformationContactDetailsBits\": 123,\n \"agentInstructions\": \"<string>\",\n \"noRefunds\": true,\n \"noRefundsMessage\": \"<string>\",\n \"cancellationFeePolicyId\": 123,\n \"contactPhone\": \"<string>\",\n \"contactEmail\": \"<string>\",\n \"addressLineTwo\": \"<string>\",\n \"addressSuburb\": \"<string>\",\n \"addressState\": \"<string>\",\n \"startLocation\": 123,\n \"secondaryLocation\": 123,\n \"endLocation\": 123,\n \"activityTypes\": [\n 123\n ],\n \"accommodationTypes\": [\n 123\n ],\n \"transportTypes\": [\n 123\n ],\n \"minAgeRecommendation\": 123,\n \"maxAgeRecommendation\": 123,\n \"ageRestriction\": \"<string>\",\n \"fitnessRequirements\": \"<string>\",\n \"minGroupSize\": 123,\n \"maxGroupSize\": 123,\n \"dietaryRequirements\": \"<string>\",\n \"luggageRequirements\": \"<string>\",\n \"includedItems\": [\n \"<string>\"\n ],\n \"bringItems\": [\n \"<string>\"\n ],\n \"voucherTerms\": \"<string>\",\n \"weekDays\": [\n \"<string>\"\n ],\n \"departureDates\": \"<string>\",\n \"recurrenceDate\": \"<string>\",\n \"specialCircumstanceDate\": \"<string>\",\n \"operatingPartner\": \"<string>\",\n \"tourCode\": \"<string>\",\n \"mandatoryFieldCheckout\": [\n \"<string>\"\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")
.header("Content-Type", "application/json")
.body("{\n \"productName\": \"<string>\",\n \"country\": \"<string>\",\n \"productClassId\": 123,\n \"addressLineOne\": \"<string>\",\n \"addressCity\": \"<string>\",\n \"addressPostcode\": \"<string>\",\n \"mediaId\": 123,\n \"timezone\": \"<string>\",\n \"apiProviderId\": 123,\n \"externalId\": 123,\n \"rating\": \"<string>\",\n \"teaser\": \"<string>\",\n \"description\": \"<string>\",\n \"itineraryDetails\": [\n \"<string>\"\n ],\n \"departuresPickups\": \"<string>\",\n \"extras\": \"<string>\",\n \"voucherInstructions\": \"<string>\",\n \"voucherInformationContactDetailsBits\": 123,\n \"agentInstructions\": \"<string>\",\n \"noRefunds\": true,\n \"noRefundsMessage\": \"<string>\",\n \"cancellationFeePolicyId\": 123,\n \"contactPhone\": \"<string>\",\n \"contactEmail\": \"<string>\",\n \"addressLineTwo\": \"<string>\",\n \"addressSuburb\": \"<string>\",\n \"addressState\": \"<string>\",\n \"startLocation\": 123,\n \"secondaryLocation\": 123,\n \"endLocation\": 123,\n \"activityTypes\": [\n 123\n ],\n \"accommodationTypes\": [\n 123\n ],\n \"transportTypes\": [\n 123\n ],\n \"minAgeRecommendation\": 123,\n \"maxAgeRecommendation\": 123,\n \"ageRestriction\": \"<string>\",\n \"fitnessRequirements\": \"<string>\",\n \"minGroupSize\": 123,\n \"maxGroupSize\": 123,\n \"dietaryRequirements\": \"<string>\",\n \"luggageRequirements\": \"<string>\",\n \"includedItems\": [\n \"<string>\"\n ],\n \"bringItems\": [\n \"<string>\"\n ],\n \"voucherTerms\": \"<string>\",\n \"weekDays\": [\n \"<string>\"\n ],\n \"departureDates\": \"<string>\",\n \"recurrenceDate\": \"<string>\",\n \"specialCircumstanceDate\": \"<string>\",\n \"operatingPartner\": \"<string>\",\n \"tourCode\": \"<string>\",\n \"mandatoryFieldCheckout\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/{supplierapi}/product")
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 \"productName\": \"<string>\",\n \"country\": \"<string>\",\n \"productClassId\": 123,\n \"addressLineOne\": \"<string>\",\n \"addressCity\": \"<string>\",\n \"addressPostcode\": \"<string>\",\n \"mediaId\": 123,\n \"timezone\": \"<string>\",\n \"apiProviderId\": 123,\n \"externalId\": 123,\n \"rating\": \"<string>\",\n \"teaser\": \"<string>\",\n \"description\": \"<string>\",\n \"itineraryDetails\": [\n \"<string>\"\n ],\n \"departuresPickups\": \"<string>\",\n \"extras\": \"<string>\",\n \"voucherInstructions\": \"<string>\",\n \"voucherInformationContactDetailsBits\": 123,\n \"agentInstructions\": \"<string>\",\n \"noRefunds\": true,\n \"noRefundsMessage\": \"<string>\",\n \"cancellationFeePolicyId\": 123,\n \"contactPhone\": \"<string>\",\n \"contactEmail\": \"<string>\",\n \"addressLineTwo\": \"<string>\",\n \"addressSuburb\": \"<string>\",\n \"addressState\": \"<string>\",\n \"startLocation\": 123,\n \"secondaryLocation\": 123,\n \"endLocation\": 123,\n \"activityTypes\": [\n 123\n ],\n \"accommodationTypes\": [\n 123\n ],\n \"transportTypes\": [\n 123\n ],\n \"minAgeRecommendation\": 123,\n \"maxAgeRecommendation\": 123,\n \"ageRestriction\": \"<string>\",\n \"fitnessRequirements\": \"<string>\",\n \"minGroupSize\": 123,\n \"maxGroupSize\": 123,\n \"dietaryRequirements\": \"<string>\",\n \"luggageRequirements\": \"<string>\",\n \"includedItems\": [\n \"<string>\"\n ],\n \"bringItems\": [\n \"<string>\"\n ],\n \"voucherTerms\": \"<string>\",\n \"weekDays\": [\n \"<string>\"\n ],\n \"departureDates\": \"<string>\",\n \"recurrenceDate\": \"<string>\",\n \"specialCircumstanceDate\": \"<string>\",\n \"operatingPartner\": \"<string>\",\n \"tourCode\": \"<string>\",\n \"mandatoryFieldCheckout\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_bodyCreate a Product
curl --request POST \
--url https://api.example.com/{supplierapi}/product \
--header 'Content-Type: application/json' \
--data '
{
"productName": "<string>",
"country": "<string>",
"productClassId": 123,
"addressLineOne": "<string>",
"addressCity": "<string>",
"addressPostcode": "<string>",
"mediaId": 123,
"timezone": "<string>",
"apiProviderId": 123,
"externalId": 123,
"rating": "<string>",
"teaser": "<string>",
"description": "<string>",
"itineraryDetails": [
"<string>"
],
"departuresPickups": "<string>",
"extras": "<string>",
"voucherInstructions": "<string>",
"voucherInformationContactDetailsBits": 123,
"agentInstructions": "<string>",
"noRefunds": true,
"noRefundsMessage": "<string>",
"cancellationFeePolicyId": 123,
"contactPhone": "<string>",
"contactEmail": "<string>",
"addressLineTwo": "<string>",
"addressSuburb": "<string>",
"addressState": "<string>",
"startLocation": 123,
"secondaryLocation": 123,
"endLocation": 123,
"activityTypes": [
123
],
"accommodationTypes": [
123
],
"transportTypes": [
123
],
"minAgeRecommendation": 123,
"maxAgeRecommendation": 123,
"ageRestriction": "<string>",
"fitnessRequirements": "<string>",
"minGroupSize": 123,
"maxGroupSize": 123,
"dietaryRequirements": "<string>",
"luggageRequirements": "<string>",
"includedItems": [
"<string>"
],
"bringItems": [
"<string>"
],
"voucherTerms": "<string>",
"weekDays": [
"<string>"
],
"departureDates": "<string>",
"recurrenceDate": "<string>",
"specialCircumstanceDate": "<string>",
"operatingPartner": "<string>",
"tourCode": "<string>",
"mandatoryFieldCheckout": [
"<string>"
]
}
'import requests
url = "https://api.example.com/{supplierapi}/product"
payload = {
"productName": "<string>",
"country": "<string>",
"productClassId": 123,
"addressLineOne": "<string>",
"addressCity": "<string>",
"addressPostcode": "<string>",
"mediaId": 123,
"timezone": "<string>",
"apiProviderId": 123,
"externalId": 123,
"rating": "<string>",
"teaser": "<string>",
"description": "<string>",
"itineraryDetails": ["<string>"],
"departuresPickups": "<string>",
"extras": "<string>",
"voucherInstructions": "<string>",
"voucherInformationContactDetailsBits": 123,
"agentInstructions": "<string>",
"noRefunds": True,
"noRefundsMessage": "<string>",
"cancellationFeePolicyId": 123,
"contactPhone": "<string>",
"contactEmail": "<string>",
"addressLineTwo": "<string>",
"addressSuburb": "<string>",
"addressState": "<string>",
"startLocation": 123,
"secondaryLocation": 123,
"endLocation": 123,
"activityTypes": [123],
"accommodationTypes": [123],
"transportTypes": [123],
"minAgeRecommendation": 123,
"maxAgeRecommendation": 123,
"ageRestriction": "<string>",
"fitnessRequirements": "<string>",
"minGroupSize": 123,
"maxGroupSize": 123,
"dietaryRequirements": "<string>",
"luggageRequirements": "<string>",
"includedItems": ["<string>"],
"bringItems": ["<string>"],
"voucherTerms": "<string>",
"weekDays": ["<string>"],
"departureDates": "<string>",
"recurrenceDate": "<string>",
"specialCircumstanceDate": "<string>",
"operatingPartner": "<string>",
"tourCode": "<string>",
"mandatoryFieldCheckout": ["<string>"]
}
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({
productName: '<string>',
country: '<string>',
productClassId: 123,
addressLineOne: '<string>',
addressCity: '<string>',
addressPostcode: '<string>',
mediaId: 123,
timezone: '<string>',
apiProviderId: 123,
externalId: 123,
rating: '<string>',
teaser: '<string>',
description: '<string>',
itineraryDetails: ['<string>'],
departuresPickups: '<string>',
extras: '<string>',
voucherInstructions: '<string>',
voucherInformationContactDetailsBits: 123,
agentInstructions: '<string>',
noRefunds: true,
noRefundsMessage: '<string>',
cancellationFeePolicyId: 123,
contactPhone: '<string>',
contactEmail: '<string>',
addressLineTwo: '<string>',
addressSuburb: '<string>',
addressState: '<string>',
startLocation: 123,
secondaryLocation: 123,
endLocation: 123,
activityTypes: [123],
accommodationTypes: [123],
transportTypes: [123],
minAgeRecommendation: 123,
maxAgeRecommendation: 123,
ageRestriction: '<string>',
fitnessRequirements: '<string>',
minGroupSize: 123,
maxGroupSize: 123,
dietaryRequirements: '<string>',
luggageRequirements: '<string>',
includedItems: ['<string>'],
bringItems: ['<string>'],
voucherTerms: '<string>',
weekDays: ['<string>'],
departureDates: '<string>',
recurrenceDate: '<string>',
specialCircumstanceDate: '<string>',
operatingPartner: '<string>',
tourCode: '<string>',
mandatoryFieldCheckout: ['<string>']
})
};
fetch('https://api.example.com/{supplierapi}/product', 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",
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([
'productName' => '<string>',
'country' => '<string>',
'productClassId' => 123,
'addressLineOne' => '<string>',
'addressCity' => '<string>',
'addressPostcode' => '<string>',
'mediaId' => 123,
'timezone' => '<string>',
'apiProviderId' => 123,
'externalId' => 123,
'rating' => '<string>',
'teaser' => '<string>',
'description' => '<string>',
'itineraryDetails' => [
'<string>'
],
'departuresPickups' => '<string>',
'extras' => '<string>',
'voucherInstructions' => '<string>',
'voucherInformationContactDetailsBits' => 123,
'agentInstructions' => '<string>',
'noRefunds' => true,
'noRefundsMessage' => '<string>',
'cancellationFeePolicyId' => 123,
'contactPhone' => '<string>',
'contactEmail' => '<string>',
'addressLineTwo' => '<string>',
'addressSuburb' => '<string>',
'addressState' => '<string>',
'startLocation' => 123,
'secondaryLocation' => 123,
'endLocation' => 123,
'activityTypes' => [
123
],
'accommodationTypes' => [
123
],
'transportTypes' => [
123
],
'minAgeRecommendation' => 123,
'maxAgeRecommendation' => 123,
'ageRestriction' => '<string>',
'fitnessRequirements' => '<string>',
'minGroupSize' => 123,
'maxGroupSize' => 123,
'dietaryRequirements' => '<string>',
'luggageRequirements' => '<string>',
'includedItems' => [
'<string>'
],
'bringItems' => [
'<string>'
],
'voucherTerms' => '<string>',
'weekDays' => [
'<string>'
],
'departureDates' => '<string>',
'recurrenceDate' => '<string>',
'specialCircumstanceDate' => '<string>',
'operatingPartner' => '<string>',
'tourCode' => '<string>',
'mandatoryFieldCheckout' => [
'<string>'
]
]),
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"
payload := strings.NewReader("{\n \"productName\": \"<string>\",\n \"country\": \"<string>\",\n \"productClassId\": 123,\n \"addressLineOne\": \"<string>\",\n \"addressCity\": \"<string>\",\n \"addressPostcode\": \"<string>\",\n \"mediaId\": 123,\n \"timezone\": \"<string>\",\n \"apiProviderId\": 123,\n \"externalId\": 123,\n \"rating\": \"<string>\",\n \"teaser\": \"<string>\",\n \"description\": \"<string>\",\n \"itineraryDetails\": [\n \"<string>\"\n ],\n \"departuresPickups\": \"<string>\",\n \"extras\": \"<string>\",\n \"voucherInstructions\": \"<string>\",\n \"voucherInformationContactDetailsBits\": 123,\n \"agentInstructions\": \"<string>\",\n \"noRefunds\": true,\n \"noRefundsMessage\": \"<string>\",\n \"cancellationFeePolicyId\": 123,\n \"contactPhone\": \"<string>\",\n \"contactEmail\": \"<string>\",\n \"addressLineTwo\": \"<string>\",\n \"addressSuburb\": \"<string>\",\n \"addressState\": \"<string>\",\n \"startLocation\": 123,\n \"secondaryLocation\": 123,\n \"endLocation\": 123,\n \"activityTypes\": [\n 123\n ],\n \"accommodationTypes\": [\n 123\n ],\n \"transportTypes\": [\n 123\n ],\n \"minAgeRecommendation\": 123,\n \"maxAgeRecommendation\": 123,\n \"ageRestriction\": \"<string>\",\n \"fitnessRequirements\": \"<string>\",\n \"minGroupSize\": 123,\n \"maxGroupSize\": 123,\n \"dietaryRequirements\": \"<string>\",\n \"luggageRequirements\": \"<string>\",\n \"includedItems\": [\n \"<string>\"\n ],\n \"bringItems\": [\n \"<string>\"\n ],\n \"voucherTerms\": \"<string>\",\n \"weekDays\": [\n \"<string>\"\n ],\n \"departureDates\": \"<string>\",\n \"recurrenceDate\": \"<string>\",\n \"specialCircumstanceDate\": \"<string>\",\n \"operatingPartner\": \"<string>\",\n \"tourCode\": \"<string>\",\n \"mandatoryFieldCheckout\": [\n \"<string>\"\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")
.header("Content-Type", "application/json")
.body("{\n \"productName\": \"<string>\",\n \"country\": \"<string>\",\n \"productClassId\": 123,\n \"addressLineOne\": \"<string>\",\n \"addressCity\": \"<string>\",\n \"addressPostcode\": \"<string>\",\n \"mediaId\": 123,\n \"timezone\": \"<string>\",\n \"apiProviderId\": 123,\n \"externalId\": 123,\n \"rating\": \"<string>\",\n \"teaser\": \"<string>\",\n \"description\": \"<string>\",\n \"itineraryDetails\": [\n \"<string>\"\n ],\n \"departuresPickups\": \"<string>\",\n \"extras\": \"<string>\",\n \"voucherInstructions\": \"<string>\",\n \"voucherInformationContactDetailsBits\": 123,\n \"agentInstructions\": \"<string>\",\n \"noRefunds\": true,\n \"noRefundsMessage\": \"<string>\",\n \"cancellationFeePolicyId\": 123,\n \"contactPhone\": \"<string>\",\n \"contactEmail\": \"<string>\",\n \"addressLineTwo\": \"<string>\",\n \"addressSuburb\": \"<string>\",\n \"addressState\": \"<string>\",\n \"startLocation\": 123,\n \"secondaryLocation\": 123,\n \"endLocation\": 123,\n \"activityTypes\": [\n 123\n ],\n \"accommodationTypes\": [\n 123\n ],\n \"transportTypes\": [\n 123\n ],\n \"minAgeRecommendation\": 123,\n \"maxAgeRecommendation\": 123,\n \"ageRestriction\": \"<string>\",\n \"fitnessRequirements\": \"<string>\",\n \"minGroupSize\": 123,\n \"maxGroupSize\": 123,\n \"dietaryRequirements\": \"<string>\",\n \"luggageRequirements\": \"<string>\",\n \"includedItems\": [\n \"<string>\"\n ],\n \"bringItems\": [\n \"<string>\"\n ],\n \"voucherTerms\": \"<string>\",\n \"weekDays\": [\n \"<string>\"\n ],\n \"departureDates\": \"<string>\",\n \"recurrenceDate\": \"<string>\",\n \"specialCircumstanceDate\": \"<string>\",\n \"operatingPartner\": \"<string>\",\n \"tourCode\": \"<string>\",\n \"mandatoryFieldCheckout\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/{supplierapi}/product")
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 \"productName\": \"<string>\",\n \"country\": \"<string>\",\n \"productClassId\": 123,\n \"addressLineOne\": \"<string>\",\n \"addressCity\": \"<string>\",\n \"addressPostcode\": \"<string>\",\n \"mediaId\": 123,\n \"timezone\": \"<string>\",\n \"apiProviderId\": 123,\n \"externalId\": 123,\n \"rating\": \"<string>\",\n \"teaser\": \"<string>\",\n \"description\": \"<string>\",\n \"itineraryDetails\": [\n \"<string>\"\n ],\n \"departuresPickups\": \"<string>\",\n \"extras\": \"<string>\",\n \"voucherInstructions\": \"<string>\",\n \"voucherInformationContactDetailsBits\": 123,\n \"agentInstructions\": \"<string>\",\n \"noRefunds\": true,\n \"noRefundsMessage\": \"<string>\",\n \"cancellationFeePolicyId\": 123,\n \"contactPhone\": \"<string>\",\n \"contactEmail\": \"<string>\",\n \"addressLineTwo\": \"<string>\",\n \"addressSuburb\": \"<string>\",\n \"addressState\": \"<string>\",\n \"startLocation\": 123,\n \"secondaryLocation\": 123,\n \"endLocation\": 123,\n \"activityTypes\": [\n 123\n ],\n \"accommodationTypes\": [\n 123\n ],\n \"transportTypes\": [\n 123\n ],\n \"minAgeRecommendation\": 123,\n \"maxAgeRecommendation\": 123,\n \"ageRestriction\": \"<string>\",\n \"fitnessRequirements\": \"<string>\",\n \"minGroupSize\": 123,\n \"maxGroupSize\": 123,\n \"dietaryRequirements\": \"<string>\",\n \"luggageRequirements\": \"<string>\",\n \"includedItems\": [\n \"<string>\"\n ],\n \"bringItems\": [\n \"<string>\"\n ],\n \"voucherTerms\": \"<string>\",\n \"weekDays\": [\n \"<string>\"\n ],\n \"departureDates\": \"<string>\",\n \"recurrenceDate\": \"<string>\",\n \"specialCircumstanceDate\": \"<string>\",\n \"operatingPartner\": \"<string>\",\n \"tourCode\": \"<string>\",\n \"mandatoryFieldCheckout\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_bodyPath Parameters
supplier|apiv1/supplierBody
Create a Product
Name of the Product.
2-character Country code.
ID of Product Class (see output from /categories/productclasses).
First line of Product Address.
City of Product Address.
Postcode of Product Address.
ID of the Media Image use as Product thumbnail.
String (e.g. "Australia/Sydney") representing products timezone. If left empty, will default to Suppliers timezone. Based on timezone database @ https://www.iana.org/time-zones
Internal use only, if you've been given a value to use for this property then please do so here.
Internal use only, if you've been given a value to use for this property then please do so here.
Valid only for Accommodation products. A 'star' rating in the range of 1-5 and accepting of half values e.g. '3.5'.
Brief product description (up to 300 characters).
Longer product description.
Array of itinerary details in objects.
Information about departures or pickups.
Information about extras which are not included in product price - eg airport transfers, meals.
Information for customer, including phone numbers and confirmation instructions
Combined bitwise value of contact details to be printed on voucher.
Additional information for the agent.
Disables refunds for the product.
Message explaining why refunds are not available.
ID of product's cancellation fee policy (not applicable if noRefunds is turned on).
Contact phone number.
Contact email address.
Second line of Product Address.
Suburb of Product Address.
State of Product Address.
Category ID of Product start location.
Category ID of Product's secondary location.
Category ID of end location.
Array of Category ID's (Integers) of activity type.
Array of Category ID's (Integers) of accommodation types.
Array of Category ID's (Integers) of transport types.
Minimum recommended age.
Maximum recommended age.
Description of any age restrictions (e.g. for an R18 hostel).
Description of fitness requirements.
Minimum group size.
Maximum group size.
Description of dietary requirements.
Description of luggage requirements.
Array of items included in the fare.
Array of items that guest is expected to bring.
Description of terms and conditions, disclaimers etc.
Array of days of week that trip departs.
Comma-separated tour departure dates
Frequency of departure recurrence (e.g. 'Weekly' or 'Monthly').
Description of special dates which affect departure info (e.g. Christmas Day).
Operating partner.
Tour code.
Array of customer fields absolutely necessary to make the booking. Customer field names: title, phone, emailAddress, dateOfBirth, redeemerCountry, postcode.
Response
Returned when successful.