Modify Booking
1 min
Modify Booking
This API allow to Modify previous created booking in your PayDocker account
PATCH
https://api.paydocker.com/{version}/booking/{partnerid}/{randomkey}
Body Parameters
- share_secretstringrequiredDescription
- booking_eventstringrequiredDescription
- source_idstringrequiredDescription
- buyer_idstringDescription
- booking_idstringrequiredDescription
- booking_datestringrequiredDescription
- booking_categorystringrequiredDescription
- supplier_idstringrequiredDescription
- property_namestringrequiredDescription
- property_countryStringrequiredDescription
- guests_countNumberrequiredDescription
- room_countNumberrequiredDescription
- check_instringrequiredDescription
- check_outstringrequiredDescription
- transaction_currencystringrequiredDescription
- transaction_amountstringrequiredDescription
- margin_categorystringrequiredDescription
- transaction_marginstringrequiredDescription
- nonrefundable_amountstringrequiredDescription
- refundable_amountstringrequiredDescription
- firstnight_amountstringrequiredDescription
- cancellation_daysNumberrequiredDescription
- auth_codestringDescription
- pre_authBooleanDescription
json
{
"share_secret": "EVBZIHZhKqsPoopQ4GW7uceHQz4yIEdGB1JjNJyUJmvp77xj1lInlilZc5LkZgA8IllRRDLZTaaftmUwT3WapIRHP67VAskyJOjybSH03RdDXVXPhAcCH00l3dKYqCJjsqikrnpsy0B7WonvWWpK5mz",
"booking_event": "modify",
"source_id": "PDR28",
"buyer_id": "",
"booking_id": "1396",
"booking_date": "21-01-2024",
"booking_category": "Payable",
"supplier_id": "PD01",
"property_name": "Roy",
"property_country": "IN",
"guests_count": "45",
"room_count": "12",
"check_in": "20-01-2024",
"check_out": "22-01-2024",
"transaction_currency": "INR",
"transaction_amount": "100.00",
"margin_category": "%",
"transaction_margin": "1",
"nonrefundable_amount": "0.00",
"refundable_amount": "0.00",
"firstnight_amount": "10.00",
"cancellation_days": "0",
"auth_code":"trusted",
"pre_auth":"true"
}javascript
var myHeaders = new Headers();
myHeaders.append("Accept", "application/json");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"share_secret": "EVBZIHZhKqsPoopQ4GW7uceHQz4yIEdGB1JjNJyUJmvp77xj1lInlilZc5LkZgA8IllRRDLZTaaftmUwT3WapIRHP67VAskyJOjybSH03RdDXVXPhAcCH00l3dKYqCJjsqikrnpsy0B7WonvWWpK5mz",
"booking_event": "modify",
"source_id": "PDR28",
"buyer_id": "",
"booking_id": "1396",
"booking_date": "21-01-2024",
"booking_category": "Payable",
"supplier_id": "PD01",
"property_name": "Roy",
"property_country": "IN",
"guests_count": "45",
"room_count": "12",
"check_in": "20-01-2024",
"check_out": "22-01-2024",
"transaction_currency": "INR",
"transaction_amount": "100.00",
"margin_category": "%",
"transaction_margin": "1",
"nonrefundable_amount": "0.00",
"refundable_amount": "0.00",
"firstnight_amount": "10.00",
"cancellation_days": "0",
"auth_code":"trusted",
"pre_auth":"true"
});
var requestOptions = {
method: 'GET',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.cakes.com", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));curl
curl --location --globoff --request PATCH 'https://api.paydocker.com/{version}/booking/{partnerid}/{randomkey}/modify' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{"id":"string","Parameter name":"string"}'nodejs
var request = require('request');
var options = {
'method': 'PATCH',
'url': 'https://api.paydocker.com/{version}/booking/{partnerid}/{randomkey}/modify',
'headers': {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"share_secret": "EVBZIHZhKqsPoopQ4GW7uceHQz4yIEdGB1JjNJyUJmvp77xj1lInlilZc5LkZgA8IllRRDLZTaaftmUwT3WapIRHP67VAskyJOjybSH03RdDXVXPhAcCH00l3dKYqCJjsqikrnpsy0B7WonvWWpK5mz",
"booking_event": "modify",
"source_id": "PDR28",
"buyer_id": "",
"booking_id": "1396",
"booking_date": "21-01-2024",
"booking_category": "Payable",
"supplier_id": "PD01",
"property_name": "Roy",
"property_country": "IN",
"guests_count": "45",
"room_count": "12",
"check_in": "20-01-2024",
"check_out": "22-01-2024",
"transaction_currency": "INR",
"transaction_amount": "100.00",
"margin_category": "%",
"transaction_margin": "1",
"nonrefundable_amount": "0.00",
"refundable_amount": "0.00",
"firstnight_amount": "10.00",
"cancellation_days": "0",
"auth_code":"trusted",
"pre_auth":"true"
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
200
{
"success": true,
"message": "Booking Modify Success",
"booking_id": "4255435435435435",
}400
{
"success": "false",
"errors": {
"code": "400",
"message": "Booking ID Not Found"
}
}402
{
"success": "false",
"errors": {
"code": "402",
"message": "Source Not Allowed"
}
}405
{
"success": "false",
"errors": {
"code": "405",
"message": "Method Not Allowed"
}
}407
{
"success": "false",
"errors": {
"code": "407",
"message": "Partner Inactive"
}
}413
{
"success": "false",
"errors": {
"code": "413",
"message": "Destination ID Unknown"
}
}414
{
"success": "false",
"errors": {
"code": "414",
"message": "Destination ID Inactive"
}
}403
{
"success": "false",
"errors": {
"code": "403",
"message": "IP Not Allowed"
}
}404
{
"success": "false",
"errors": {
"code": "404",
"message": "Booking ID Quota Exceeded"
}
}406
{
"success": "false",
"errors": {
"code": "406",
"message": "Endpoint Bad Format"
}
}408
{
"success": "false",
"errors": {
"code": "408",
"message": "Endpoint Suspended"
}
}409
{
"success": "false",
"errors": {
"code": "409",
"message": "Event Not Allowed"
}
}410
{
"success": "false",
"errors": {
"code": "410",
"message": "Invalid Secret Key"
}
}411
{
"success": "false",
"errors": {
"code": "411",
"message": "Duplicated Booking ID"
}
}412
{
"success": "false",
"errors": {
"code": "412",
"message": "Missing Booking ID"
}
}415
{
"success": "false",
"errors": {
"code": "415",
"message": "Booking Date Bad Format"
}
}416
{
"success": "false",
"errors": {
"code": "416",
"message": "Booking Date Not Allowed"
}
}417
{
"success": "false",
"errors": {
"code": "417",
"message": "Missing Booking Category"
}
}418
{
"success": "false",
"errors": {
"code": "418",
"message": "Booking Category Bad Format"
}
}421
{
"success": "false",
"errors": {
"code": "421",
"message": "Missing Destination Name"
}
}422
{
"success": "false",
"errors": {
"code": "422",
"message": "Destination Name Quota Exceeded"
}
}423
{
"success": "false",
"errors": {
"code": "423",
"message": "Missing Guests Count"
}
}424
{
"success": "false",
"errors": {
"code": "424",
"message": "Guests Count Bad Format"
}
}425
{
"success": "false",
"errors": {
"code": "425",
"message": "Missing Check-in Date"
}
}426
{
"success": "false",
"errors": {
"code": "426",
"message": "Check-in Date Bad Format"
}
}428
{
"success": "false",
"errors": {
"code": "428",
"message": "Check-in Date Quota Exceeded"
}
}429
{
"success": "false",
"errors": {
"code": "429",
"message": "Missing Check-out Date"
}
}431
{
"success": "false",
"errors": {
"code": "431",
"message": "Check-out Date Not Allowed"
}
}451
{
"success": "false",
"errors": {
"code": "451",
"message": "Refundable Amount Bad Format"
}
}500
{
"success": "false",
"errors": {
"code": "500",
"message": "Internal Server Error"
}
}502
{
"success": "false",
"errors": {
"code": "502",
"message": "Bad Gateway"
}
}503
{
"success": "false",
"errors": {
"code": "503",
"message": "Service Unavailable"
}
}504
{
"success": "false",
"errors": {
"code": "504",
"message": "Gateway Timeout"
}
}