Travel authorization update
1 min
code examples curl request post \\ \ url https //api accertify net/api/v1/unified risk/travel/authorizationupdate \\ \ header 'accept application/json' \\ \ header 'content type application/json' \\ \ data '{ "transactionid" "abc123456", "authstatus" true }'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); var raw = json stringify({ "transactionid" "abc123456", "authstatus" true }); var requestoptions = { method 'post', headers myheaders, body raw, redirect 'follow' }; fetch("https //api accertify net/api/v1/unified risk/travel/authorizationupdate", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));require "uri" require "json" require "net/http" url = uri("https //api accertify net/api/v1/unified risk/travel/authorizationupdate") https = net http new(url host, url port) https use ssl = true request = net http post new(url) request\["accept"] = "application/json" request\["content type"] = "application/json" request body = json dump({ "transactionid" "abc123456", "authstatus" true }) response = https request(request) puts response read body import requests import json url = "https //api accertify net/api/v1/unified risk/travel/authorizationupdate" payload = json dumps({ "transactionid" "abc123456", "authstatus" true }) headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("post", url, headers=headers, data=payload) print(response text) responses // successful response { "eventid" "", "messages" { "error" \[ { "code" "field required missing", "message" "transactionid is required and was not provided", "field" "transactionid", "details" "" } ], "warning" \[ { "code" "field required missing", "message" "transactionid is required and was not provided", "field" "transactionid", "details" "" } ], "info" \[ { "code" "field required missing", "message" "transactionid is required and was not provided", "field" "transactionid", "details" "" } ] }, "status" false }// error response for invalid or missing request inputs returned when one or more required fields are absent or fail validation { "errorcode" 400, "errormessage" "validation failed", "errors" \[ "" ] }// error response for authentication or authorization failures returned when credentials are invalid or the authenticated user has no matching api configuration for this endpoint { "errorcode" 401, "errormessage" "not authorized" }// error response when the request rate limit has been exceeded for the api user or api configuration { "errorcode" 429, "errormessage" "rate limit exceeded" }// error response when the request cannot be processed due to an unexpected internal error { "errorcode" 500, "errormessage" "internal server error" }