Confirm address
1 min
code examples curl request post \\ \ url https //api getos1 com/locateone/v1/confirm \\ \ header 'accept application/json' \\ \ header 'content type string' \\ \ header 'x api key string' \\ \ data '{ "address" "yogi complex g wing room no 103 1st floor", "city" "gurugram", "phone number" "9660476235", "pincode" "673593", "state" "kerala", "has consent" true, "consent text" "consent from customer is required" }'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "string"); myheaders append("x api key", "string"); var raw = "{\n \\"address\\" \\"yogi complex g wing room no 103 1st floor\\",\n \\"city\\" \\"gurugram\\",\n \\"phone number\\" \\"9660476235\\",\n \\"pincode\\" \\"673593\\",\n \\"state\\" \\"kerala\\",\n \\"has consent\\" true,\n \\"consent text\\" \\"consent from customer is required\\"\n}"; var requestoptions = { method 'post', headers myheaders, body raw, redirect 'follow' }; fetch("https //api getos1 com/locateone/v1/confirm", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));require "uri" require "net/http" url = uri("https //api getos1 com/locateone/v1/confirm") 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"] = "string" request\["x api key"] = "string" request body = "{\n \\"address\\" \\"yogi complex g wing room no 103 1st floor\\",\n \\"city\\" \\"gurugram\\",\n \\"phone number\\" \\"9660476235\\",\n \\"pincode\\" \\"673593\\",\n \\"state\\" \\"kerala\\",\n \\"has consent\\" true,\n \\"consent text\\" \\"consent from customer is required\\"\n}" response = https request(request) puts response read body import requests url = "https //api getos1 com/locateone/v1/confirm" payload = "{\n \\"address\\" \\"yogi complex g wing room no 103 1st floor\\",\n \\"city\\" \\"gurugram\\",\n \\"phone number\\" \\"9660476235\\",\n \\"pincode\\" \\"673593\\",\n \\"state\\" \\"kerala\\",\n \\"has consent\\" true,\n \\"consent text\\" \\"consent from customer is required\\"\n}" headers = { 'accept' 'application/json', 'content type' 'string', 'x api key' 'string' } response = requests request("post", url, headers=headers, data=payload) print(response text) responses // successful response { "data" {} }// bad request { "message" "invalid request parameters " }// unauthorized { "message" "unauthorized access invalid api key " }// forbidden { "message" "forbidden you do not have permissions to access this resource " }// internal server error { "message" "internal server error please try again later " }