Booking
Create Booking
1 min
{ "name" "create booking", "method" "post", "url" "https //api paydocker com/{version}/booking/{partnerid}/{randomkey}", "description" " this api is used to create booking in your paydocker account", "tab" "examples", "examples" { "languages" \[ { "id" "imaikmco5bya8vmxinyee", "language" "json", "code" "{\n \\"share secret\\" \\"evbzihzhkqspoopq4gw7ucehqz4yiedgb1jjnjyujmvp77xj1linlilzc5lkzga8illrrdlztaaftmuwt3wapirhp67vaskyjojybsh03rddxvxphacch00l3dkyqcjjsqikrnpsy0b7wonvwwpk5mz\\",\n \\"booking event\\" \\"new\\",\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" "4edz3bl6mecfo9p bp6qz", "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\\" \\"new\\",\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" "grzaniff94udor0plztjw", "language" "nodejs", "code" "var request = require('request');\nvar options = {\n 'method' 'post',\n 'url' 'https //api paydocker com/v1/booking/pdr28/375053',\n 'headers' {\n 'accept' 'application/json',\n 'content type' 'application/json'\n },\n body json stringify({\n \\"share secret\\" \\"evbzihzhkqspoopq4gw7ucehqz4yiedgb1jjnjyujmvp77xj1linlilzc5lkzga8illrrdlztaaftmuwt3wapirhp67vaskyjojybsh03rddxvxphacch00l3dkyqcjjsqikrnpsy0b7wonvwwpk5mz\\",\n \\"booking event\\" \\"new\\",\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" "" }, { "id" "whrvi5bdfonhhptiegkiv", "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\\" \\"new\\",\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 'post',\n headers myheaders,\n body raw,\n redirect 'follow'\n};\n\nfetch(\\"https //api paydocker com/v1/booking/pdr28/375053\\", requestoptions)\n then(response => response text())\n then(result => console log(result))\n catch(error => console log('error', error));", "customlabel" "" } ], "selectedlanguageid" "grzaniff94udor0plztjw" }, "results" { "languages" \[ { "id" "alwbpzngjtk lve90 1fx", "language" "200", "customlabel" "", "code" "{\n \\"message\\" \\"success\\",\n \\"success\\" \\"true\\"\n}" }, { "id" "6k5ae3xsotl1bdul00kfn", "language" "400", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"400\\",\n \\"message\\" \\"booking id not found\\"\n }\n}", "customlabel" "" }, { "id" "4xzotmm8becwxwu ja37c", "language" "402", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"402\\",\n \\"message\\" \\"source not allowed\\"\n }\n}", "customlabel" "" }, { "id" "mctwhby6 t0kbgzq7ulge", "language" "405", "customlabel" "", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"405\\",\n \\"message\\" \\"method not allowed\\"\n }\n}" }, { "id" "usj8qhmetsdeenwx5p91z", "language" "407", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"407\\",\n \\"message\\" \\"partner inactive\\"\n }\n}", "customlabel" "" }, { "id" "byez2w11fgtlgrujxpyob", "language" "413", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"413\\",\n \\"message\\" \\"destination id unknown\\"\n }\n}", "customlabel" "" }, { "id" "twzghzsz2rj7it qdwiky", "language" "401", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"401\\",\n \\"message\\" \\"destination id inactive\\"\n }\n}", "customlabel" "" }, { "id" "vhpfusurcsso 2ignhqdn", "language" "403", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"403\\",\n \\"message\\" \\"ip not allowed\\"\n }\n}", "customlabel" "" }, { "id" "yd0fqr ceo2hcgvpyrikm", "language" "404", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"404\\",\n \\"message\\" \\"booking id quota exceeded\\"\n }\n}", "customlabel" "" }, { "id" "vhpdrd0kjjbhc9vuw67on", "language" "406", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"406\\",\n \\"message\\" \\"endpoint bad format\\"\n }\n}", "customlabel" "" }, { "id" "sdpcshiketdh zrcnf3d9", "language" "408", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"408\\",\n \\"message\\" \\"endpoint suspended\\"\n }\n}", "customlabel" "" }, { "id" "rtebtbg2utgk63bjhqvid", "language" "409", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"409\\",\n \\"message\\" \\"event not allowed\\"\n }\n}", "customlabel" "" }, { "id" "efqkmmeuvmi9hs9txuj0j", "language" "410", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"410\\",\n \\"message\\" \\"invalid secret key\\"\n }\n}", "customlabel" "" }, { "id" "kd7h0vmfgrp88iuh4d 8n", "language" "411", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"411\\",\n \\"message\\" \\"duplicated booking id\\"\n }\n}", "customlabel" "" }, { "id" "alkkrt93 rbxpgpdausgp", "language" "412", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"412\\",\n \\"message\\" \\"missing booking id\\"\n }\n}", "customlabel" "" }, { "id" "ufmkkfrmvbnmwss4 g9ex", "language" "415", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"415\\",\n \\"message\\" \\"booking date bad format\\"\n }\n}", "customlabel" "" }, { "id" "wrcowqibd tj1o7guwppl", "language" "416", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"416\\",\n \\"message\\" \\"booking date not allowed\\"\n }\n}", "customlabel" "" }, { "id" "sdfywwfhvoqt6iftxm3x9", "language" "417", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"417\\",\n \\"message\\" \\"missing booking category\\"\n }\n}", "customlabel" "" }, { "id" "ljzkkt2d11b3dxgtloquk", "language" "418", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"418\\",\n \\"message\\" \\"booking category bad format\\"\n }\n}", "customlabel" "" }, { "id" "cgqv2pdrzql2bpslke2m6", "language" "421", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"421\\",\n \\"message\\" \\"missing destination name\\"\n }\n}", "customlabel" "" }, { "id" "j hzaajnfhenxsf rkvvm", "language" "422", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"422\\",\n \\"message\\" \\"destination name quota exceeded\\"\n }\n}", "customlabel" "" }, { "id" "kdvdnxswgq3wfue359gmd", "language" "423", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"423\\",\n \\"message\\" \\"missing guests count\\"\n }\n}", "customlabel" "" }, { "id" "u1rz hmzztxpiw 4ck0dm", "language" "424", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"424\\",\n \\"message\\" \\"guests count bad format\\"\n }\n}", "customlabel" "" }, { "id" "qfhgkagdorpkrvgutp n0", "language" "425", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"425\\",\n \\"message\\" \\"missing check in date\\"\n }\n}", "customlabel" "" }, { "id" "j rpneyoa4qru27thrtjh", "language" "426", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"426\\",\n \\"message\\" \\"check in date bad format\\"\n }\n}", "customlabel" "" }, { "id" "bjwrlyobrnivx1mackxcw", "language" "428", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"428\\",\n \\"message\\" \\"check in date quota exceeded\\"\n }\n}", "customlabel" "" }, { "id" "dow6cpihvmlrzj87ihibc", "language" "429", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"429\\",\n \\"message\\" \\"missing check out date\\"\n }\n}", "customlabel" "" }, { "id" "x 2hr8j4qycui2lnmd6q4", "language" "431", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"431\\",\n \\"message\\" \\"check out date not allowed\\"\n }\n}", "customlabel" "" }, { "id" "6ofggvxhco4u7t 9twxr4", "language" "451", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"451\\",\n \\"message\\" \\"refundable amount bad format\\"\n }\n}", "customlabel" "" }, { "id" "wkoxbibzdieabqopxbb7b", "language" "500", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"500\\",\n \\"message\\" \\"internal server error\\"\n }\n}", "customlabel" "" }, { "id" "u92byu7zdbvczipwq9nfw", "language" "502", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"502\\",\n \\"message\\" \\"bad gateway\\"\n }\n}", "customlabel" "" }, { "id" "8wi 3fshgynv321nrnh1o", "language" "503", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"503\\",\n \\"message\\" \\"service unavailable\\"\n }\n}", "customlabel" "" }, { "id" "8lcwxocrivwvtj7irqan0", "language" "504", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"504\\",\n \\"message\\" \\"gateway timeout\\"\n }\n}", "customlabel" "" }, { "id" "crie5o0cflqxvyq6bkleb", "language" "100", "code" "", "customlabel" "" } ], "selectedlanguageid" "alwbpzngjtk lve90 1fx" }, "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 \\"new\\" ", "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" "used to identify the booking id \nmaximum 150 characters allowed ", "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 \n", "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 eleven digits (e g a value of 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 \n\n", "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" }, "response" \[] }