Update token status
relevant webhooks for this endpoint be sure you have registered docid\ bn5xtgkjogbe ctwomcbs for these webhooks cards token provisioningreceived cards token activationreceived cards token completionreceived api reference update token status (suspend, resume, delete) { "name" "endpoint /cardmanagement/v1/cards/{cardid}/tokens/{tokenid}", "method" "put", "url" "https //sandbox crbcos com/cardmanagement/v1/cards/{cardid}/tokens/{tokenid}", "description" "", "tab" "examples", "examples" { "languages" \[ { "id" "hiyb6hxbzbif03ihcjxah", "language" "curl", "code" "curl location request put 'https //sandbox crbcos com/cardmanagement/v1/cards/89a3ca77 10dc 4b88 b0a7 b4480095d104/tokens/c25cabee 2533 4a46 a52b c74991559bd7' \\\\\n data '{\n \\"tokenaction\\" \\"activate\\",\n \\"reason\\" \\"it'\\\\''s time\\"\n}'", "customlabel" "" }, { "id" "ft5vkqvlm1ibrbf8xc9i5", "language" "nodejs", "code" "var request = require('request');\nvar options = {\n 'method' 'put',\n 'url' 'https //sandbox crbcos com/cardmanagement/v1/cards/89a3ca77 10dc 4b88 b0a7 b4480095d104/tokens/c25cabee 2533 4a46 a52b c74991559bd7',\n 'headers' {\n },\n body '{\\\r\\\n \\"tokenaction\\" \\"activate\\",\\\r\\\n \\"reason\\" \\"it\\\\'s time\\"\\\r\\\n}'\n\n};\nrequest(options, function (error, response) {\n if (error) throw new error(error);\n console log(response body);\n});\n", "customlabel" "" }, { "id" "ikg44td3zax081w4orxvv", "language" "python", "code" "import requests\n\nurl = \\"https //sandbox crbcos com/cardmanagement/v1/cards/89a3ca77 10dc 4b88 b0a7 b4480095d104/tokens/c25cabee 2533 4a46 a52b c74991559bd7\\"\n\npayload = \\"{\\\r\\\n \\\\\\"tokenaction\\\\\\" \\\\\\"activate\\\\\\",\\\r\\\n \\\\\\"reason\\\\\\" \\\\\\"it's time\\\\\\"\\\r\\\n}\\"\nheaders = {}\n\nresponse = requests request(\\"put\\", url, headers=headers, data=payload)\n\nprint(response text)\n", "customlabel" "" }, { "id" "jmuima3fr9sbhutatvesd", "language" "ruby", "code" "require \\"uri\\"\nrequire \\"net/http\"\n\nurl = uri(\\"https //sandbox crbcos com/cardmanagement/v1/cards/89a3ca77 10dc 4b88 b0a7 b4480095d104/tokens/c25cabee 2533 4a46 a52b c74991559bd7\\")\n\nhttps = net http new(url host, url port)\nhttps use ssl = true\n\nrequest = net http put new(url)\nrequest body = \\"{\\\r\\\n \\\\\\"tokenaction\\\\\\" \\\\\\"activate\\\\\\",\\\r\\\n \\\\\\"reason\\\\\\" \\\\\\"it's time\\\\\\"\\\r\\\n}\\"\n\nresponse = https request(request)\nputs response read body\n", "customlabel" "" }, { "id" "afy7cwt 4c2c6vnwr5eob", "language" "go", "code" "package main\n\nimport (\n \\"fmt\\"\n \\"strings\\"\n \\"net/http\"\n \\"io\\"\n)\n\nfunc main() {\n\n url = \\"https //sandbox crbcos com/cardmanagement/v1/cards/89a3ca77 10dc 4b88 b0a7 b4480095d104/tokens/c25cabee 2533 4a46 a52b c74991559bd7\\"\n method = \\"put\\"\n\n payload = strings newreader(`{`+\\"\n\\"+`\n \\"tokenaction\\" \\"activate\\",`+\\"\n\\"+`\n \\"reason\\" \\"it's time\\"`+\\"\n\\"+`\n}`)\n\n client = \&http client {\n }\n req, err = http newrequest(method, url, payload)\n\n if err != nil {\n fmt println(err)\n return\n }\n res, err = client do(req)\n if err != nil {\n fmt println(err)\n return\n }\n defer res body close()\n\n body, err = io readall(res body)\n if err != nil {\n fmt println(err)\n return\n }\n fmt println(string(body))\n}", "customlabel" "" } ], "selectedlanguageid" "hiyb6hxbzbif03ihcjxah" }, "results" { "languages" \[ { "id" "kcrcuayhepl8dhvegmp34", "language" "200", "code" "{\n \\"tokenid\\" \\"c25cabee 2533 4a46 a52b c74991559bd7\\",\n \\"status\\" \\"active\\"\n}", "customlabel" "" } ], "selectedlanguageid" "kcrcuayhepl8dhvegmp34" }, "request" { "pathparameters" \[ { "name" "cardid", "kind" "required", "type" "string", "description" "guid format card id in the cross river system, which is the id attribute value of the response to create a card this is not the number that appears on the card ", "" "cardid" }, { "name" "tokenid", "kind" "required", "type" "string", "description" "the unique identifier of the token to update must be a valid guid ", "" "the unique identifier of the token to update must be a valid guid " } ], "queryparameters" \[], "headerparameters" \[], "bodydataparameters" \[ { "name" "request", "kind" "required", "type" "object", "description" "request action on the token", "" "request action on the token", "children" \[ { "name" "tokenaction", "kind" "required", "type" "string", "description" " activate\n suspend\n delete" }, { "name" "reason", "kind" "optional", "type" "string", "description" "describe the reason for the request" } ], "schema" \[ { "name" "tokenaction", "kind" "required", "type" "string", "description" " activate\n suspend\n delete" }, { "name" "reason", "kind" "optional", "type" "string", "description" "describe the reason for the request" } ] } ], "formdataparameters" \[] }, "currentnewparameter" { "label" "body parameter", "value" "bodydataparameters" }, "response" \[ { "name" "tokenid", "kind" "optional", "type" "string", "description" "" }, { "name" "status", "kind" "optional", "type" "string", "description" " active\n inactive\n suspended\n deleted", "children" \[] } ], "hastryitout" false, "autogeneratedanchorslug" "endpoint cardmanagementv1cardscardidtokenstokenid", "legacyhash" "x sphgtvjw6sa3mdft10" }