Token
Post Token
Modify Token
1 min
{ "name" "modify", "method" "patch", "url" "https //secure paydocker com/{version}/token/{partnerid}/{randomkey}/modify", "description" "", "tab" "examples", "examples" { "languages" \[ { "id" "lrnfe1sspnqwpew1gpm4q", "language" "json", "code" "{\n \\"share secret\\" \\"string\\",\n \\"token event\\" \\"modify\\",\n \\"source id\\" \\"string\\",\n \\"destination id\\" \\"string\\",\n \\"token id\\" \\"string\\",\n \\"token status\\" \\"string\\",\n \\"available date\\" \\"string\\",\n \\"expiry date\\" \\"string\\",\n \\"check in\\" \\"string\\",\n \\"check out\\" \\"string\\",\n \\"room count\\" \\"number\\",\n \\"customer name\\" \\"string\\",\n \\"booking reference\\" \\"string\\",\n \\"email token\\" \\"boolean\\",\n \\"email settings\\" \[\n {\n \\"email to\\" \\"string\\",\n \\"email encrypted\\" \\"boolean\\"\n }\n ]\n}", "customlabel" "" }, { "id" "wp ertkkhj w8hbtq6d6r", "language" "curl", "code" "curl location g request patch 'https //secure paydocker com/{version}/token/{partnerid}/{randomkey}/modify' \\\\\n header 'accept application/json' \\\\\n header 'content type application/json' \\\\\n data raw '{\\"share secret\\" \\"string\\",\\"token event\\" \\"string\\",\\"source id\\" \\"string\\",\\"destination id\\" \\"string\\",\\"token id\\" \\"string\\",\\"token status\\" \\"string\\",\\"available date\\" \\"string\\",\\"expiry date\\" \\"string\\",\\"token name\\" \\"string\\",\\"token reference\\" \\"string\\",\\"email token\\" \\"boolean\\",\\"email settings\\" \\"object\\"}'", "customlabel" "" }, { "id" "epe2fb5fl1v by1bytv m", "language" "nodejs", "code" "var request = require('request');\nvar options = {\n 'method' 'patch',\n 'url' 'https //secure paydocker com/{version}/token/{partnerid}/{randomkey}/modify',\n 'headers' {\n 'accept' 'application/json',\n 'content type' 'application/json'\n },\n body json stringify({\n \\"share secret\\" \\"string\\",\n \\"token event\\" \\"string\\",\n \\"source id\\" \\"string\\",\n \\"destination id\\" \\"string\\",\n \\"token id\\" \\"string\\",\n \\"token status\\" \\"string\\",\n \\"available date\\" \\"string\\",\n \\"expiry date\\" \\"string\\",\n \\"token name\\" \\"string\\",\n \\"token reference\\" \\"string\\",\n \\"email token\\" \\"boolean\\",\n \\"email settings\\" \\"object\\"\n })\n\n};\nrequest(options, function (error, response) {\n if (error) throw new error(error);\n console log(response body);\n});\n", "customlabel" "" }, { "id" "awqnl2rkmvcnfkkdx3xbl", "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\\" \\"string\\",\n \\"token event\\" \\"string\\",\n \\"source id\\" \\"string\\",\n \\"destination id\\" \\"string\\",\n \\"token id\\" \\"string\\",\n \\"token status\\" \\"string\\",\n \\"available date\\" \\"string\\",\n \\"expiry date\\" \\"string\\",\n \\"token name\\" \\"string\\",\n \\"token reference\\" \\"string\\",\n \\"email token\\" \\"boolean\\",\n \\"email settings\\" \\"object\\"\n});\n\nvar requestoptions = {\n method 'patch',\n headers myheaders,\n body raw,\n redirect 'follow'\n};\n\nfetch(\\"https //secure paydocker com/{version}/token/{partnerid}/{randomkey}/modify\\", requestoptions)\n then(response => response text())\n then(result => console log(result))\n catch(error => console log('error', error));", "customlabel" "" }, { "id" "kmctsumvsa sijsvt95xa", "language" "python", "code" "import requests\nimport json\n\nurl = \\"https //secure paydocker com/{version}/token/{partnerid}/{randomkey}/modify\\"\n\npayload = json dumps({\n \\"share secret\\" \\"string\\",\n \\"token event\\" \\"string\\",\n \\"source id\\" \\"string\\",\n \\"destination id\\" \\"string\\",\n \\"token id\\" \\"string\\",\n \\"token status\\" \\"string\\",\n \\"available date\\" \\"string\\",\n \\"expiry date\\" \\"string\\",\n \\"token name\\" \\"string\\",\n \\"token reference\\" \\"string\\",\n \\"email token\\" \\"boolean\\",\n \\"email settings\\" \\"object\\"\n})\nheaders = {\n 'accept' 'application/json',\n 'content type' 'application/json'\n}\n\nresponse = requests request(\\"patch\\", url, headers=headers, data=payload)\n\nprint(response text)\n", "customlabel" "" }, { "id" "fz9rvhha0j12 gabyr0gk", "language" "ruby", "code" "require \\"uri\\"\nrequire \\"json\\"\nrequire \\"net/http\"\n\nurl = uri(\\"https //secure paydocker com/{version}/token/{partnerid}/{randomkey}/modify\\")\n\nhttps = net http new(url host, url port)\nhttps use ssl = true\n\nrequest = net http patch new(url)\nrequest\[\\"accept\\"] = \\"application/json\\"\nrequest\[\\"content type\\"] = \\"application/json\\"\nrequest body = json dump({\n \\"share secret\\" \\"string\\",\n \\"token event\\" \\"string\\",\n \\"source id\\" \\"string\\",\n \\"destination id\\" \\"string\\",\n \\"token id\\" \\"string\\",\n \\"token status\\" \\"string\\",\n \\"available date\\" \\"string\\",\n \\"expiry date\\" \\"string\\",\n \\"token name\\" \\"string\\",\n \\"token reference\\" \\"string\\",\n \\"email token\\" \\"boolean\\",\n \\"email settings\\" \\"object\\"\n})\n\nresponse = https request(request)\nputs response read body\n", "customlabel" "" } ], "selectedlanguageid" "awqnl2rkmvcnfkkdx3xbl" }, "results" { "languages" \[ { "id" "sb4gkpmbkxsgtn2whkuxi", "language" "200", "customlabel" "", "code" "{\n \\"success\\" true,\n \\"message\\" \\"token modify success\\",\n \\"token id\\" \\"34322345677898765\\"\n}" }, { "id" "dak8e7eqepgixdssknhdn", "language" "403", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"403\\",\n \\"message\\" \\"ip not allowed\\"\n }\n}", "customlabel" "" }, { "id" "aer18zvyfdtjfgmrsz0np", "language" "405", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"405\\",\n \\"message\\" \\"method not allowed\\"\n }\n}", "customlabel" "" }, { "id" "pvaiwnkgxhbtfdk5pr6rv", "language" "406", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"406\\",\n \\"message\\" \\"enpoint bad format\\"\n }\n}", "customlabel" "" }, { "id" "e cb dvyjiof85vl8ie8", "language" "408", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"408\\",\n \\"message\\" \\"endpoint suspended\\"\n }\n}", "customlabel" "" }, { "id" "w6rfqpbgf8 bioyta49eg", "language" "409", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"409\\",\n \\"message\\" \\"event not allowed\\"\n }\n}", "customlabel" "" }, { "id" " 2kmcktcj3 nz5qa1srri", "language" "410", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"410\\",\n \\"message\\" \\"invalid secret key\\"\n }\n}", "customlabel" "" }, { "id" "3z piixst2a ygbeummkl", "language" "416", "code" "", "customlabel" "" }, { "id" "0cqkkqkqcxn1d2rtfos4c", "language" "417", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"417\\",\n \\"message\\" \\"invalid expiry date\\"\n }\n}", "customlabel" "" }, { "id" "2qlrbklf57hwhhz1misjd", "language" "421", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"421\\",\n \\"message\\" \\"reference characters exceeded\\"\n }\n}", "customlabel" "" }, { "id" "p07g97s nps0ux uby8pc", "language" "426", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"426\\",\n \\"message\\" \\"invalid email format\\"\n }\n}", "customlabel" "" }, { "id" "ekecptkjveobzibk3sral", "language" "500", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"500\\",\n \\"message\\" \\"internal server error\\"\n }\n}", "customlabel" "" }, { "id" "zirnegp24xctzqcn4gctl", "language" "502", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"502\\",\n \\"message\\" \\"bad gateway\\"\n }\n}", "customlabel" "" }, { "id" "weuegf64fqqt2eaxoarnr", "language" "503", "code" "{\n \\"success\\" \\"false\\",\n \\"errors\\" {\n \\"code\\" \\"502\\",\n \\"message\\" \\"bad gateway\\"\n }\n}", "customlabel" "" }, { "id" "nus2rm1tfhwojvjkqkwcu", "language" "504", "code" "", "customlabel" "" } ], "selectedlanguageid" "dak8e7eqepgixdssknhdn" }, "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 ", "children" \[] }, { "name" "token event", "kind" "required", "type" "string", "description" "used to identify the action connected to the token 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" "destination id", "kind" "required", "type" "string", "description" "property id (e g id 001) generated in your platform it represents the token recipient ", "children" \[] }, { "name" "token id", "kind" "required", "type" "string", "description" "the unique identifier associated with the token that the user is requesting a modification for (e g 2908926013012565)", "children" \[] }, { "name" "token status", "kind" "required", "type" "string", "description" "active or freezed (only one is applicable) it is case sensitive ", "children" \[] }, { "name" "available date", "kind" "required", "type" "string", "description" "the date on which the token becomes active and ready for the recipient to collect \n\nthe format is dd mm yyyy, e g 25 12 2023\n\nselectable date range is 1 day before token creation day to up to 365 days in the future ", "children" \[] }, { "name" "expiry date", "kind" "required", "type" "string", "description" "the date on which the token becomes invalid, after which it cannot be used or collected by the recipient \n\nthe format is dd mm yyyy, e g 25 12 2023\n\nselectable date range is same or greater than available date, essentially until the last day of the month one year after the chosen available date \n\ne g available date 18 oct 2023, expiry date 31 oct 2024 ", "children" \[] }, { "name" "check in", "kind" "required", "type" "string", "description" "the format is dd mm yyyy, e g 25 12 2023\n\nselectable date range up to 2 years before token creation day to up to 2 years in the future ", "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 same or greater than check in date, up to 90 days in the future \n", "children" \[] }, { "name" "room count", "kind" "required", "type" "number", "description" "accepted value from 1 to 999", "children" \[] }, { "name" "customer name", "kind" "required", "type" "string", "description" "used to identify the customer name associated within the booking \nmaximum 80 characters allowed ", "children" \[] }, { "name" "booking reference", "kind" "required", "type" "string", "description" "used to identify the booking id \nmaximum 200 characters allowed ", "children" \[] }, { "name" "email token", "kind" "required", "type" "boolean", "description" "true or false (only one option is applicable) it is case sensitive ", "children" \[] }, { "name" "email settings", "kind" "optional", "type" "object", "description" "", "children" \[ { "name" "email to", "kind" "optional", "type" "string", "description" "the email address for token sharing token details can be shared with a range of one to ten email addresses by using commas to separate them " }, { "name" "email encrypted", "kind" "optional", "type" "boolean", "description" "true or false (only one option is applicable) it is case sensitive \n\nif true, token will be encrypted when shared with the email addresses " } ] } ], "formdataparameters" \[] }, "currentnewparameter" { "label" "body parameter", "value" "bodydataparameters" } } payload format