Booking
Modify Booking
1 min
{ "name" "modify booking", "method" "patch", "url" "https //api paydocker com/{version}/booking/{partnerid}/{randomkey}", "description" "this api allow to modify previous created booking in your paydocker account", "tab" "examples", "examples" { "languages" \[ { "id" "tq4pudydc1zkbe9uwrcap", "language" "json", "code" "{\n \\"share secret\\" \\"evbzihzhkqspoopq4gw7ucehqz4yiedgb1jjnjyujmvp77xj1linlilzc5lkzga8illrrdlztaaftmuwt3wapirhp67vaskyjojybsh03rddxvxphacch00l3dkyqcjjsqikrnpsy0b7wonvwwpk5mz\\",\n \\"booking event\\" \\"modify\\",\n \\"source id\\" \\"pdr28\\",\n \\"buyer id\\" \\"\\",\n \\"booking id\\" \\"1396\\",\n \\"booking date\\" \\"21 01 2024\\",\n \\"booking category\\" \\"payable\\",\n \\"supplier id\\" \\"pd01\\",\n \\"property name\\" \\"roy\\",\n \\"property country\\" \\"in\\",\n \\"guests count\\" \\"45\\",\n \\"room count\\" \\"12\\",\n \\"check in\\" \\"20 01 2024\\",\n \\"check out\\" \\"22 01 2024\\",\n \\"transaction currency\\" \\"inr\\",\n \\"transaction amount\\" \\"100 00\\",\n \\"margin category\\" \\"%\\",\n \\"transaction margin\\" \\"1\\",\n \\"nonrefundable amount\\" \\"0 00\\",\n \\"refundable amount\\" \\"0 00\\",\n \\"firstnight amount\\" \\"10 00\\",\n \\"cancellation days\\" \\"0\\",\n \\"auth code\\" \\"trusted\\",\n \\"pre auth\\" \\"true\\"\n}", "customlabel" "" }, { "id" "yjcwkjra3bxrg7xzozakd", "language" "javascript", "code" "var myheaders = new headers();\nmyheaders append(\\"accept\\", \\"application/json\\");\nmyheaders append(\\"content type\\", \\"application/json\\");\n\nvar raw = json stringify({\n \\"share secret\\" \\"evbzihzhkqspoopq4gw7ucehqz4yiedgb1jjnjyujmvp77xj1linlilzc5lkzga8illrrdlztaaftmuwt3wapirhp67vaskyjojybsh03rddxvxphacch00l3dkyqcjjsqikrnpsy0b7wonvwwpk5mz\\",\n \\"booking event\\" \\"modify\\",\n \\"source id\\" \\"pdr28\\",\n \\"buyer id\\" \\"\\",\n \\"booking id\\" \\"1396\\",\n \\"booking date\\" \\"21 01 2024\\",\n \\"booking category\\" \\"payable\\",\n \\"supplier id\\" \\"pd01\\",\n \\"property name\\" \\"roy\\",\n \\"property country\\" \\"in\\",\n \\"guests count\\" \\"45\\",\n \\"room count\\" \\"12\\",\n \\"check in\\" \\"20 01 2024\\",\n \\"check out\\" \\"22 01 2024\\",\n \\"transaction currency\\" \\"inr\\",\n \\"transaction amount\\" \\"100 00\\",\n \\"margin category\\" \\"%\\",\n \\"transaction margin\\" \\"1\\",\n \\"nonrefundable amount\\" \\"0 00\\",\n \\"refundable amount\\" \\"0 00\\",\n \\"firstnight amount\\" \\"10 00\\",\n \\"cancellation days\\" \\"0\\",\n \\"auth code\\" \\"trusted\\",\n \\"pre auth\\" \\"true\\"\n});\n\nvar requestoptions = {\n method 'get',\n headers myheaders,\n body raw,\n redirect 'follow'\n};\n\nfetch(\\"https //api cakes com\\", requestoptions)\n then(response => response text())\n then(result => console log(result))\n catch(error => console log('error', error));", "customlabel" "" }, { "id" "h w5imyyt1knqck0svuad", "language" "curl", "code" "curl location globoff request patch 'https //api paydocker com/{version}/booking/{partnerid}/{randomkey}/modify' \\\\\n header 'accept application/json' \\\\\n header 'content type application/json' \\\\\n data '{\\"id\\" \\"string\\",\\"parameter name\\" \\"string\\"}'", "customlabel" "" }, { "id" "lcdpg7wf zms947v1jjum", "language" "nodejs", "code" "var request = require('request');\nvar options = {\n 'method' 'patch',\n 'url' 'https //api paydocker com/{version}/booking/{partnerid}/{randomkey}/modify',\n 'headers' {\n 'accept' 'application/json',\n 'content type' 'application/json'\n },\n body json stringify({\n \\"share secret\\" \\"evbzihzhkqspoopq4gw7ucehqz4yiedgb1jjnjyujmvp77xj1linlilzc5lkzga8illrrdlztaaftmuwt3wapirhp67vaskyjojybsh03rddxvxphacch00l3dkyqcjjsqikrnpsy0b7wonvwwpk5mz\\",\n \\"booking event\\" \\"modify\\",\n \\"source id\\" \\"pdr28\\",\n \\"buyer id\\" \\"\\",\n \\"booking id\\" \\"1396\\",\n \\"booking date\\" \\"21 01 2024\\",\n \\"booking category\\" \\"payable\\",\n \\"supplier id\\" \\"pd01\\",\n \\"property name\\" \\"roy\\",\n \\"property country\\" \\"in\\",\n \\"guests count\\" \\"45\\",\n \\"room count\\" \\"12\\",\n \\"check in\\" \\"20 01 2024\\",\n \\"check out\\" \\"22 01 2024\\",\n \\"transaction currency\\" \\"inr\\",\n \\"transaction amount\\" \\"100 00\\",\n \\"margin category\\" \\"%\\",\n \\"transaction margin\\" \\"1\\",\n \\"nonrefundable amount\\" \\"0 00\\",\n \\"refundable amount\\" \\"0 00\\",\n \\"firstnight amount\\" \\"10 00\\",\n \\"cancellation days\\" \\"0\\",\n \\"auth code\\" \\"trusted\\",\n \\"pre auth\\" \\"true\\"\n})\n\n};\nrequest(options, function (error, response) {\n if (error) throw new error(error);\n console log(response body);\n});\n", "customlabel" "" } ], "selectedlanguageid" "tq4pudydc1zkbe9uwrcap" }, "results" { "languages" \[ { "id" "zec6xhwei2sjzvm 3hvfu", "language" "200", "customlabel" "", "code" "{\n \\"success\\" true,\n \\"message\\" \\"booking modify success\\",\n \\"booking id\\" \\"4255435435435435\\",\n\n}" }, { "id" "2jd gjqip8bq4jyyhrkjh", "language" "400", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"400\\",\n \\"message\\" \\"booking id not found\\"\n }\n}", "customlabel" "" }, { "id" "ewjpfudkz l4dc0g3ojgc", "language" "402", "customlabel" "", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"402\\",\n \\"message\\" \\"source not allowed\\"\n }\n}" }, { "id" "ns1w1sgilfktiednnulgi", "language" "405", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"405\\",\n \\"message\\" \\"method not allowed\\"\n }\n}", "customlabel" "" }, { "id" "wfjtdabghcm sh6cfomit", "language" "407", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"407\\",\n \\"message\\" \\"partner inactive\\"\n }\n}", "customlabel" "" }, { "id" "zxtfis5nxnthnkst4lwga", "language" "413", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"413\\",\n \\"message\\" \\"destination id unknown\\"\n }\n}", "customlabel" "" }, { "id" "jaley4t6z3xk2gitzld7i", "language" "414", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"414\\",\n \\"message\\" \\"destination id inactive\\"\n }\n}", "customlabel" "" }, { "id" "gh63mu39bchhfj5qppocq", "language" "403", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"403\\",\n \\"message\\" \\"ip not allowed\\"\n }\n}", "customlabel" "" }, { "id" "rxjktgfqpzbxgz yyi9o8", "language" "404", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"404\\",\n \\"message\\" \\"booking id quota exceeded\\"\n }\n}", "customlabel" "" }, { "id" "d86ke4rnulvoxn1fbrinx", "language" "406", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"406\\",\n \\"message\\" \\"endpoint bad format\\"\n }\n}", "customlabel" "" }, { "id" "vjsyhztqgenrcmzurrvul", "language" "408", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"408\\",\n \\"message\\" \\"endpoint suspended\\"\n }\n}", "customlabel" "" }, { "id" "hlgxodoafzo2nm8xzrfmq", "language" "409", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"409\\",\n \\"message\\" \\"event not allowed\\"\n }\n}", "customlabel" "" }, { "id" "1fxew6r8getv411ys7yz9", "language" "410", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"410\\",\n \\"message\\" \\"invalid secret key\\"\n }\n}", "customlabel" "" }, { "id" "6sc13h8qvn8o6oupihyqv", "language" "411", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"411\\",\n \\"message\\" \\"duplicated booking id\\"\n }\n}", "customlabel" "" }, { "id" "rtqyat4faw9whm1sqsuf1", "language" "412", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"412\\",\n \\"message\\" \\"missing booking id\\"\n }\n}", "customlabel" "" }, { "id" "kaew8gbgk lap5bq6biel", "language" "415", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"415\\",\n \\"message\\" \\"booking date bad format\\"\n }\n}", "customlabel" "" }, { "id" "wlryhddg3esmrqbpcjqy2", "language" "416", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"416\\",\n \\"message\\" \\"booking date not allowed\\"\n }\n}", "customlabel" "" }, { "id" "jhc3mbubkvgi2jam63gbw", "language" "417", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"417\\",\n \\"message\\" \\"missing booking category\\"\n }\n}", "customlabel" "" }, { "id" "005 j sn1fzjjobh4phti", "language" "418", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"418\\",\n \\"message\\" \\"booking category bad format\\"\n }\n}", "customlabel" "" }, { "id" "ocfi evejlpexn2fpuoxn", "language" "421", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"421\\",\n \\"message\\" \\"missing destination name\\"\n }\n}", "customlabel" "" }, { "id" "iyr7yj8cwi1p3xrnywy7z", "language" "422", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"422\\",\n \\"message\\" \\"destination name quota exceeded\\"\n }\n}", "customlabel" "" }, { "id" "v62wsz8st hkbbhhy44px", "language" "423", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"423\\",\n \\"message\\" \\"missing guests count\\"\n }\n}", "customlabel" "" }, { "id" "h7jq2w3qrczotejrzaxpo", "language" "424", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"424\\",\n \\"message\\" \\"guests count bad format\\"\n }\n}", "customlabel" "" }, { "id" "3qfu0uoqxulxm hbrt91", "language" "425", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"425\\",\n \\"message\\" \\"missing check in date\\"\n }\n}", "customlabel" "" }, { "id" "1eippp3b8tmbtdlk3lql1", "language" "426", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"426\\",\n \\"message\\" \\"check in date bad format\\"\n }\n}", "customlabel" "" }, { "id" "sy1dkh3stazh7arbiijpm", "language" "428", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"428\\",\n \\"message\\" \\"check in date quota exceeded\\"\n }\n}", "customlabel" "" }, { "id" "ssu7gtebwtcqmywu0imsr", "language" "429", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"429\\",\n \\"message\\" \\"missing check out date\\"\n }\n}", "customlabel" "" }, { "id" "2wohnmvgfiguo otvezvw", "language" "431", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"431\\",\n \\"message\\" \\"check out date not allowed\\"\n }\n}", "customlabel" "" }, { "id" "pouroxvj19fjitrfghxuf", "language" "451", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"451\\",\n \\"message\\" \\"refundable amount bad format\\"\n }\n}", "customlabel" "" }, { "id" "49vaumc38r9xjjzuacea1", "language" "500", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"500\\",\n \\"message\\" \\"internal server error\\"\n }\n}", "customlabel" "" }, { "id" "c xgh1wack6ppzvha4vi5", "language" "502", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"502\\",\n \\"message\\" \\"bad gateway\\"\n }\n}", "customlabel" "" }, { "id" "jops4q3dqmextvwhab3hj", "language" "503", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"503\\",\n \\"message\\" \\"service unavailable\\"\n }\n}", "customlabel" "" }, { "id" "5 0aoof2dppiyskf8pikm", "language" "504", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"504\\",\n \\"message\\" \\"gateway timeout\\"\n }\n}", "customlabel" "" } ], "selectedlanguageid" "zec6xhwei2sjzvm 3hvfu" }, "request" { "pathparameters" \[], "queryparameters" \[], "headerparameters" \[], "bodydataparameters" \[ { "name" "share secret", "kind" "required", "type" "string", "description" "test mode secret keys and live mode secret keys are available in your paydocker account under integration menu \n\ndon't share your secret api keys in publicly accessible areas such as github, client side code, and so forth " }, { "name" "booking event", "kind" "required", "type" "string", "description" "used to identify the action connected to the booking and the allowed action for this request would be \\"modify\\" ", "children" \[] }, { "name" "source id", "kind" "required", "type" "string", "description" "your paydocker account id assigned upon account creation (e g pdr1) it is case sensitive ", "children" \[] }, { "name" "buyer id", "kind" "optional", "type" "string", "description" "buyer id (e g id 001) generated in your platform it represents the account that has performed the purchase in your platform ", "children" \[] }, { "name" "booking id", "kind" "required", "type" "string", "description" "the unique identifier associated with the booking for which the user is requesting a modification (e g , 4255435435435435) ", "children" \[] }, { "name" "booking date", "kind" "required", "type" "string", "description" "the format is dd mm yyyy e g 25 12 2023\n\nallowed date range is same or lower than import date\ne g import date 18 oct 2023, booking date could be 18 oct 2023 or lower", "children" \[] }, { "name" "booking category", "kind" "required", "type" "string", "description" "used to identify the category connected to the booking and the allowed categories are \npayable \nreceivable", "children" \[] }, { "name" "supplier id", "kind" "required", "type" "string", "description" "supplier id (e g id 001) generated in your platform\nmaximum 150 characters allowed ", "children" \[] }, { "name" "property name", "kind" "required", "type" "string", "description" "used to identify the property name associated within the booking \nmaximum 80 characters allowed ", "children" \[] }, { "name" "property country", "kind" "required", "type" "string", "description" "country id iso 3166 1 alpha 3 codes standard format associated within the token value \ncountry id iso 3166 1 alpha 3 codes are available in api reference > standard codes > country code ", "children" \[] }, { "name" "guests count", "kind" "required", "type" "number", "description" "used to identify the number of guests associated within the booking \nonly number accepted\nmin value is 1 \nmax value is 99", "children" \[] }, { "name" "room count", "kind" "required", "type" "number", "description" "used to identify the number of room associated within the booking \nonly number accepted\nmin value is 1 \nmax value is 99", "children" \[] }, { "name" "check in", "kind" "required", "type" "string", "description" "the format is dd mm yyyy e g 25 12 2023\n\nselectable date range is from the booking date up to 2 years in the future the check in date cannot be later than the check out date ", "children" \[] }, { "name" "check out", "kind" "required", "type" "string", "description" "the format is dd mm yyyy e g 25 12 2023\n\nselectable date range is from the check in date up to 180 days in the future the check out date cannot be before the check in date \n", "children" \[] }, { "name" "transaction currency", "kind" "required", "type" "string", "description" "currency id iso 4217 standard format associated within the token value \nsupported currency and iso code are available in api reference > standard codes > currency code ", "children" \[] }, { "name" "transaction amount", "kind" "required", "type" "string", "description" "used to identify the total booking amount \n\nminimum accepted value is 0 00\nmax accepted value is 9,999,999,999 00\n \nthe amount value supports up to twelve digits (e g a value of 9,999,999,999 99) divided by decimal ", "children" \[] }, { "name" "margin category", "kind" "required", "type" "string", "description" "used to identify the margin category connected to the booking and the allowed categories are \n$\n%", "children" \[] }, { "name" "transaction margin", "kind" "required", "type" "string", "description" "used to identify the transaction margin value connected to the booking \n\nif margin category is $ \nminimum accepted value is 1 00 \nmax accepted value is 9,999,999,999 00\n \nthe amount value supports up to twelve digits (e g a value of 9,999,999,999 99) divided by decimal \n\n \nif margin category is % \nminimum accepted value is 0 01 \nmax accepted value is 99 99 \n \nthe amount value supports up to four digits (e g a value of 99 99) ", "children" \[] }, { "name" "nonrefundable amount", "kind" "required", "type" "string", "description" "used to identify the non refundable amount \n\nminimum accepted value is 0 00\nmax accepted value is the amount set at transaction amount \n \nthe amount value supports up to twelve digits (e g a value of 9,999,999,999 99) divided by decimal \n\nthe sum between nonrefundable amount and refundable amount must be equal to transaction amount", "children" \[] }, { "name" "refundable amount", "kind" "required", "type" "string", "description" "used to identify the refundable amount \n\nminimum accepted value is 0 00\nmax accepted value is the amount set at transaction amount \n \nthe amount value supports up to twelve digits (e g a value of 9,999,999,999 99) divided by decimal \n\nthe sum between nonrefundable amount and refundable amount must be equal to transaction amount", "children" \[] }, { "name" "firstnight amount", "kind" "required", "type" "string", "description" "used to identify the first night amount \n\nminimum accepted value is 0 00\nmax accepted value is the amount set at transaction amount \n \nthe amount value supports up to twelve digits (e g a value of 9,999,999,999 99) divided by decimal ", "children" \[] }, { "name" "cancellation days", "kind" "required", "type" "number", "description" "used to identify the cancellation days for the refundable amount \n\nif the refundable amount is 0, cancellation days can be left empty \n\nif the refundable amount is greater than 0, cancellation days must be specified, with a value between 0 and 365 ", "children" \[] }, { "name" "auth code", "kind" "optional", "type" "string", "description" "the auth code is required only when the value set in the buyer id is not empty \n\nif the buyer id has added your account as trusted, the value for auth code should be set to \\"trusted\\"\n\nif your account is not trusted by the buyer id, a 16 digit auth code generated by the buyer id is required to allow your account to perform operations on the buyer id balances ", "children" \[] }, { "name" "pre auth", "kind" "optional", "type" "boolean", "description" "the pre auth setting allows your account to generate tokens and schedule top ups for the buyer id account \n\npre auth is required only when the buyer id is not empty \n\nif the buyer id is empty, pre auth can also be left empty \n\nif the buyer id is not empty, pre auth must be set to one of the following values \ntrue\nfalse", "children" \[] } ], "formdataparameters" \[] }, "currentnewparameter" { "label" "body parameter", "value" "bodydataparameters" } }
