Self Service Developer API
Self Service Developer APIv1.0.0
Self Service Developer API documentation and demo. Getting Started You will need an API access profile user and password in order to access search endpoints. Your access profile user and password is used for authenticating all requests to our search API. You MUST pass the user and password each time you perform a search request.
- Endpoints
- 5 (5 POST)
- Base URL
https://api.peoplefinderspro.com- Authentication
- Not specified in spec
- Spec format
- OpenAPI 3.0.0
- API version
- 1.0.0
- Source
- pfent1821.docs.apiary.io
- Provider
- peoplefinderspro.com
- Categories
- Marketing
- Last updated
Use this API in Bruno:
- Download the Bruno collection above and unzip it.
- In Bruno, choose Open Collection and select the unzipped folder.
- Set the
baseUrlvariable (for examplehttps://api.peoplefinderspro.com), then send requests.
POST
Search (1)
{{baseUrl}}/email/enrich
BODY json
{
"Email": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/email/enrich");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"Email\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/email/enrich" {:content-type :json
:form-params {:Email ""}})
require "http/client"
url = "{{baseUrl}}/email/enrich"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"Email\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/email/enrich"),
Content = new StringContent("{\n \"Email\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/email/enrich");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"Email\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/email/enrich"
payload := strings.NewReader("{\n \"Email\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/email/enrich HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 17
{
"Email": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/email/enrich")
.setHeader("content-type", "application/json")
.setBody("{\n \"Email\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/email/enrich"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"Email\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"Email\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/email/enrich")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/email/enrich")
.header("content-type", "application/json")
.body("{\n \"Email\": \"\"\n}")
.asString();
const data = JSON.stringify({
Email: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/email/enrich');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/email/enrich',
headers: {'content-type': 'application/json'},
data: {Email: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/email/enrich';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"Email":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/email/enrich',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "Email": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"Email\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/email/enrich")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/email/enrich',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({Email: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/email/enrich',
headers: {'content-type': 'application/json'},
body: {Email: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/email/enrich');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
Email: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/email/enrich',
headers: {'content-type': 'application/json'},
data: {Email: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/email/enrich';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"Email":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"Email": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/email/enrich"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/email/enrich" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"Email\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/email/enrich",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'Email' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/email/enrich', [
'body' => '{
"Email": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/email/enrich');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'Email' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'Email' => ''
]));
$request->setRequestUrl('{{baseUrl}}/email/enrich');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/email/enrich' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"Email": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/email/enrich' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"Email": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"Email\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/email/enrich", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/email/enrich"
payload = { "Email": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/email/enrich"
payload <- "{\n \"Email\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/email/enrich")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"Email\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/email/enrich') do |req|
req.body = "{\n \"Email\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/email/enrich";
let payload = json!({"Email": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/email/enrich \
--header 'content-type: application/json' \
--data '{
"Email": ""
}'
echo '{
"Email": ""
}' | \
http POST {{baseUrl}}/email/enrich \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "Email": ""\n}' \
--output-document \
- {{baseUrl}}/email/enrich
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["Email": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/email/enrich")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"person": {
"address": {
"city": "city",
"state": "state",
"street": "street",
"unit": "unit",
"zip": "zip"
},
"age": "age",
"email": "email",
"name": {
"firstName": "John",
"lastName": "Smith",
"middleName": "A"
}
}
}
POST
Search (2)
{{baseUrl}}/identity/verify_id
BODY json
{
"Address": {
"addressLine1": "",
"addressLine2": ""
},
"Age": "",
"Dob": "",
"Email": "",
"FirstName": "",
"LastName": "",
"MiddleName": "",
"PhoneNumber": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/identity/verify_id");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"Address\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\"\n },\n \"Age\": \"\",\n \"Dob\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"LastName\": \"\",\n \"MiddleName\": \"\",\n \"PhoneNumber\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/identity/verify_id" {:content-type :json
:form-params {:Address {:addressLine1 ""
:addressLine2 ""}
:Age ""
:Dob ""
:Email ""
:FirstName ""
:LastName ""
:MiddleName ""
:PhoneNumber ""}})
require "http/client"
url = "{{baseUrl}}/identity/verify_id"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"Address\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\"\n },\n \"Age\": \"\",\n \"Dob\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"LastName\": \"\",\n \"MiddleName\": \"\",\n \"PhoneNumber\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/identity/verify_id"),
Content = new StringContent("{\n \"Address\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\"\n },\n \"Age\": \"\",\n \"Dob\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"LastName\": \"\",\n \"MiddleName\": \"\",\n \"PhoneNumber\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/identity/verify_id");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"Address\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\"\n },\n \"Age\": \"\",\n \"Dob\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"LastName\": \"\",\n \"MiddleName\": \"\",\n \"PhoneNumber\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/identity/verify_id"
payload := strings.NewReader("{\n \"Address\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\"\n },\n \"Age\": \"\",\n \"Dob\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"LastName\": \"\",\n \"MiddleName\": \"\",\n \"PhoneNumber\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/identity/verify_id HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 188
{
"Address": {
"addressLine1": "",
"addressLine2": ""
},
"Age": "",
"Dob": "",
"Email": "",
"FirstName": "",
"LastName": "",
"MiddleName": "",
"PhoneNumber": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/identity/verify_id")
.setHeader("content-type", "application/json")
.setBody("{\n \"Address\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\"\n },\n \"Age\": \"\",\n \"Dob\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"LastName\": \"\",\n \"MiddleName\": \"\",\n \"PhoneNumber\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/identity/verify_id"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"Address\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\"\n },\n \"Age\": \"\",\n \"Dob\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"LastName\": \"\",\n \"MiddleName\": \"\",\n \"PhoneNumber\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"Address\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\"\n },\n \"Age\": \"\",\n \"Dob\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"LastName\": \"\",\n \"MiddleName\": \"\",\n \"PhoneNumber\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/identity/verify_id")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/identity/verify_id")
.header("content-type", "application/json")
.body("{\n \"Address\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\"\n },\n \"Age\": \"\",\n \"Dob\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"LastName\": \"\",\n \"MiddleName\": \"\",\n \"PhoneNumber\": \"\"\n}")
.asString();
const data = JSON.stringify({
Address: {
addressLine1: '',
addressLine2: ''
},
Age: '',
Dob: '',
Email: '',
FirstName: '',
LastName: '',
MiddleName: '',
PhoneNumber: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/identity/verify_id');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/identity/verify_id',
headers: {'content-type': 'application/json'},
data: {
Address: {addressLine1: '', addressLine2: ''},
Age: '',
Dob: '',
Email: '',
FirstName: '',
LastName: '',
MiddleName: '',
PhoneNumber: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/identity/verify_id';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"Address":{"addressLine1":"","addressLine2":""},"Age":"","Dob":"","Email":"","FirstName":"","LastName":"","MiddleName":"","PhoneNumber":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/identity/verify_id',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "Address": {\n "addressLine1": "",\n "addressLine2": ""\n },\n "Age": "",\n "Dob": "",\n "Email": "",\n "FirstName": "",\n "LastName": "",\n "MiddleName": "",\n "PhoneNumber": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"Address\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\"\n },\n \"Age\": \"\",\n \"Dob\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"LastName\": \"\",\n \"MiddleName\": \"\",\n \"PhoneNumber\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/identity/verify_id")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/identity/verify_id',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
Address: {addressLine1: '', addressLine2: ''},
Age: '',
Dob: '',
Email: '',
FirstName: '',
LastName: '',
MiddleName: '',
PhoneNumber: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/identity/verify_id',
headers: {'content-type': 'application/json'},
body: {
Address: {addressLine1: '', addressLine2: ''},
Age: '',
Dob: '',
Email: '',
FirstName: '',
LastName: '',
MiddleName: '',
PhoneNumber: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/identity/verify_id');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
Address: {
addressLine1: '',
addressLine2: ''
},
Age: '',
Dob: '',
Email: '',
FirstName: '',
LastName: '',
MiddleName: '',
PhoneNumber: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/identity/verify_id',
headers: {'content-type': 'application/json'},
data: {
Address: {addressLine1: '', addressLine2: ''},
Age: '',
Dob: '',
Email: '',
FirstName: '',
LastName: '',
MiddleName: '',
PhoneNumber: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/identity/verify_id';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"Address":{"addressLine1":"","addressLine2":""},"Age":"","Dob":"","Email":"","FirstName":"","LastName":"","MiddleName":"","PhoneNumber":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"Address": @{ @"addressLine1": @"", @"addressLine2": @"" },
@"Age": @"",
@"Dob": @"",
@"Email": @"",
@"FirstName": @"",
@"LastName": @"",
@"MiddleName": @"",
@"PhoneNumber": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/identity/verify_id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/identity/verify_id" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"Address\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\"\n },\n \"Age\": \"\",\n \"Dob\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"LastName\": \"\",\n \"MiddleName\": \"\",\n \"PhoneNumber\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/identity/verify_id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'Address' => [
'addressLine1' => '',
'addressLine2' => ''
],
'Age' => '',
'Dob' => '',
'Email' => '',
'FirstName' => '',
'LastName' => '',
'MiddleName' => '',
'PhoneNumber' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/identity/verify_id', [
'body' => '{
"Address": {
"addressLine1": "",
"addressLine2": ""
},
"Age": "",
"Dob": "",
"Email": "",
"FirstName": "",
"LastName": "",
"MiddleName": "",
"PhoneNumber": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/identity/verify_id');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'Address' => [
'addressLine1' => '',
'addressLine2' => ''
],
'Age' => '',
'Dob' => '',
'Email' => '',
'FirstName' => '',
'LastName' => '',
'MiddleName' => '',
'PhoneNumber' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'Address' => [
'addressLine1' => '',
'addressLine2' => ''
],
'Age' => '',
'Dob' => '',
'Email' => '',
'FirstName' => '',
'LastName' => '',
'MiddleName' => '',
'PhoneNumber' => ''
]));
$request->setRequestUrl('{{baseUrl}}/identity/verify_id');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/identity/verify_id' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"Address": {
"addressLine1": "",
"addressLine2": ""
},
"Age": "",
"Dob": "",
"Email": "",
"FirstName": "",
"LastName": "",
"MiddleName": "",
"PhoneNumber": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/identity/verify_id' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"Address": {
"addressLine1": "",
"addressLine2": ""
},
"Age": "",
"Dob": "",
"Email": "",
"FirstName": "",
"LastName": "",
"MiddleName": "",
"PhoneNumber": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"Address\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\"\n },\n \"Age\": \"\",\n \"Dob\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"LastName\": \"\",\n \"MiddleName\": \"\",\n \"PhoneNumber\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/identity/verify_id", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/identity/verify_id"
payload = {
"Address": {
"addressLine1": "",
"addressLine2": ""
},
"Age": "",
"Dob": "",
"Email": "",
"FirstName": "",
"LastName": "",
"MiddleName": "",
"PhoneNumber": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/identity/verify_id"
payload <- "{\n \"Address\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\"\n },\n \"Age\": \"\",\n \"Dob\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"LastName\": \"\",\n \"MiddleName\": \"\",\n \"PhoneNumber\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/identity/verify_id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"Address\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\"\n },\n \"Age\": \"\",\n \"Dob\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"LastName\": \"\",\n \"MiddleName\": \"\",\n \"PhoneNumber\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/identity/verify_id') do |req|
req.body = "{\n \"Address\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\"\n },\n \"Age\": \"\",\n \"Dob\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"LastName\": \"\",\n \"MiddleName\": \"\",\n \"PhoneNumber\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/identity/verify_id";
let payload = json!({
"Address": json!({
"addressLine1": "",
"addressLine2": ""
}),
"Age": "",
"Dob": "",
"Email": "",
"FirstName": "",
"LastName": "",
"MiddleName": "",
"PhoneNumber": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/identity/verify_id \
--header 'content-type: application/json' \
--data '{
"Address": {
"addressLine1": "",
"addressLine2": ""
},
"Age": "",
"Dob": "",
"Email": "",
"FirstName": "",
"LastName": "",
"MiddleName": "",
"PhoneNumber": ""
}'
echo '{
"Address": {
"addressLine1": "",
"addressLine2": ""
},
"Age": "",
"Dob": "",
"Email": "",
"FirstName": "",
"LastName": "",
"MiddleName": "",
"PhoneNumber": ""
}' | \
http POST {{baseUrl}}/identity/verify_id \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "Address": {\n "addressLine1": "",\n "addressLine2": ""\n },\n "Age": "",\n "Dob": "",\n "Email": "",\n "FirstName": "",\n "LastName": "",\n "MiddleName": "",\n "PhoneNumber": ""\n}' \
--output-document \
- {{baseUrl}}/identity/verify_id
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"Address": [
"addressLine1": "",
"addressLine2": ""
],
"Age": "",
"Dob": "",
"Email": "",
"FirstName": "",
"LastName": "",
"MiddleName": "",
"PhoneNumber": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/identity/verify_id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"identityVerified": true,
"verifiedPeople": [
{
"addresses": [
{
"matchTypeCode": "Match",
"value": "address"
}
],
"age": {
"matchTypeCode": "NA",
"value": "age"
},
"dob": {
"day": {
"matchTypeCode": "NA",
"value": "day"
},
"month": {
"matchTypeCode": "NA",
"value": "month"
},
"year": {
"matchTypeCode": "NA",
"value": "year"
}
},
"emails": [
{
"matchTypeCode": "NA",
"value": "email"
}
],
"firstName": {
"matchTypeCode": "Match",
"value": "firstname"
},
"identityScore": 100,
"lastName": {
"matchTypeCode": "Match",
"value": "lastname"
},
"middleName": {
"matchTypeCode": "Match",
"value": "middlename"
},
"phones": [
{
"matchTypeCode": "NA",
"value": "phone"
}
]
}
]
}
POST
Search (3)
{{baseUrl}}/phone/enrich
BODY json
{
"Phone": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/phone/enrich");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"Phone\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/phone/enrich" {:content-type :json
:form-params {:Phone ""}})
require "http/client"
url = "{{baseUrl}}/phone/enrich"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"Phone\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/phone/enrich"),
Content = new StringContent("{\n \"Phone\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/phone/enrich");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"Phone\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/phone/enrich"
payload := strings.NewReader("{\n \"Phone\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/phone/enrich HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 17
{
"Phone": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/phone/enrich")
.setHeader("content-type", "application/json")
.setBody("{\n \"Phone\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/phone/enrich"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"Phone\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"Phone\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/phone/enrich")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/phone/enrich")
.header("content-type", "application/json")
.body("{\n \"Phone\": \"\"\n}")
.asString();
const data = JSON.stringify({
Phone: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/phone/enrich');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/phone/enrich',
headers: {'content-type': 'application/json'},
data: {Phone: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/phone/enrich';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"Phone":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/phone/enrich',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "Phone": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"Phone\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/phone/enrich")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/phone/enrich',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({Phone: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/phone/enrich',
headers: {'content-type': 'application/json'},
body: {Phone: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/phone/enrich');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
Phone: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/phone/enrich',
headers: {'content-type': 'application/json'},
data: {Phone: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/phone/enrich';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"Phone":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"Phone": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/phone/enrich"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/phone/enrich" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"Phone\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/phone/enrich",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'Phone' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/phone/enrich', [
'body' => '{
"Phone": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/phone/enrich');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'Phone' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'Phone' => ''
]));
$request->setRequestUrl('{{baseUrl}}/phone/enrich');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/phone/enrich' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"Phone": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/phone/enrich' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"Phone": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"Phone\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/phone/enrich", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/phone/enrich"
payload = { "Phone": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/phone/enrich"
payload <- "{\n \"Phone\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/phone/enrich")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"Phone\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/phone/enrich') do |req|
req.body = "{\n \"Phone\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/phone/enrich";
let payload = json!({"Phone": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/phone/enrich \
--header 'content-type: application/json' \
--data '{
"Phone": ""
}'
echo '{
"Phone": ""
}' | \
http POST {{baseUrl}}/phone/enrich \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "Phone": ""\n}' \
--output-document \
- {{baseUrl}}/phone/enrich
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["Phone": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/phone/enrich")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"person": {
"address": {
"city": "city",
"state": "state",
"street": "street",
"unit": "unit",
"zip": "zip"
},
"age": "age",
"email": "email",
"name": {
"firstName": "fistname",
"lastName": "lastname",
"middleName": "m"
}
}
}
POST
Search (POST)
{{baseUrl}}/contact/enrich
BODY json
{
"Address": {
"addressLine1": "",
"addressLine2": ""
},
"Age": "",
"Dob": "",
"Email": "",
"FirstName": "",
"LastName": "",
"MiddleName": "",
"PhoneNumber": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/contact/enrich");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"Address\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\"\n },\n \"Age\": \"\",\n \"Dob\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"LastName\": \"\",\n \"MiddleName\": \"\",\n \"PhoneNumber\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/contact/enrich" {:content-type :json
:form-params {:Address {:addressLine1 ""
:addressLine2 ""}
:Age ""
:Dob ""
:Email ""
:FirstName ""
:LastName ""
:MiddleName ""
:PhoneNumber ""}})
require "http/client"
url = "{{baseUrl}}/contact/enrich"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"Address\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\"\n },\n \"Age\": \"\",\n \"Dob\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"LastName\": \"\",\n \"MiddleName\": \"\",\n \"PhoneNumber\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/contact/enrich"),
Content = new StringContent("{\n \"Address\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\"\n },\n \"Age\": \"\",\n \"Dob\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"LastName\": \"\",\n \"MiddleName\": \"\",\n \"PhoneNumber\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/contact/enrich");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"Address\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\"\n },\n \"Age\": \"\",\n \"Dob\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"LastName\": \"\",\n \"MiddleName\": \"\",\n \"PhoneNumber\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/contact/enrich"
payload := strings.NewReader("{\n \"Address\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\"\n },\n \"Age\": \"\",\n \"Dob\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"LastName\": \"\",\n \"MiddleName\": \"\",\n \"PhoneNumber\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/contact/enrich HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 188
{
"Address": {
"addressLine1": "",
"addressLine2": ""
},
"Age": "",
"Dob": "",
"Email": "",
"FirstName": "",
"LastName": "",
"MiddleName": "",
"PhoneNumber": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/contact/enrich")
.setHeader("content-type", "application/json")
.setBody("{\n \"Address\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\"\n },\n \"Age\": \"\",\n \"Dob\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"LastName\": \"\",\n \"MiddleName\": \"\",\n \"PhoneNumber\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/contact/enrich"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"Address\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\"\n },\n \"Age\": \"\",\n \"Dob\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"LastName\": \"\",\n \"MiddleName\": \"\",\n \"PhoneNumber\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"Address\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\"\n },\n \"Age\": \"\",\n \"Dob\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"LastName\": \"\",\n \"MiddleName\": \"\",\n \"PhoneNumber\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/contact/enrich")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/contact/enrich")
.header("content-type", "application/json")
.body("{\n \"Address\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\"\n },\n \"Age\": \"\",\n \"Dob\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"LastName\": \"\",\n \"MiddleName\": \"\",\n \"PhoneNumber\": \"\"\n}")
.asString();
const data = JSON.stringify({
Address: {
addressLine1: '',
addressLine2: ''
},
Age: '',
Dob: '',
Email: '',
FirstName: '',
LastName: '',
MiddleName: '',
PhoneNumber: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/contact/enrich');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/contact/enrich',
headers: {'content-type': 'application/json'},
data: {
Address: {addressLine1: '', addressLine2: ''},
Age: '',
Dob: '',
Email: '',
FirstName: '',
LastName: '',
MiddleName: '',
PhoneNumber: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/contact/enrich';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"Address":{"addressLine1":"","addressLine2":""},"Age":"","Dob":"","Email":"","FirstName":"","LastName":"","MiddleName":"","PhoneNumber":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/contact/enrich',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "Address": {\n "addressLine1": "",\n "addressLine2": ""\n },\n "Age": "",\n "Dob": "",\n "Email": "",\n "FirstName": "",\n "LastName": "",\n "MiddleName": "",\n "PhoneNumber": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"Address\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\"\n },\n \"Age\": \"\",\n \"Dob\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"LastName\": \"\",\n \"MiddleName\": \"\",\n \"PhoneNumber\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/contact/enrich")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/contact/enrich',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
Address: {addressLine1: '', addressLine2: ''},
Age: '',
Dob: '',
Email: '',
FirstName: '',
LastName: '',
MiddleName: '',
PhoneNumber: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/contact/enrich',
headers: {'content-type': 'application/json'},
body: {
Address: {addressLine1: '', addressLine2: ''},
Age: '',
Dob: '',
Email: '',
FirstName: '',
LastName: '',
MiddleName: '',
PhoneNumber: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/contact/enrich');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
Address: {
addressLine1: '',
addressLine2: ''
},
Age: '',
Dob: '',
Email: '',
FirstName: '',
LastName: '',
MiddleName: '',
PhoneNumber: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/contact/enrich',
headers: {'content-type': 'application/json'},
data: {
Address: {addressLine1: '', addressLine2: ''},
Age: '',
Dob: '',
Email: '',
FirstName: '',
LastName: '',
MiddleName: '',
PhoneNumber: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/contact/enrich';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"Address":{"addressLine1":"","addressLine2":""},"Age":"","Dob":"","Email":"","FirstName":"","LastName":"","MiddleName":"","PhoneNumber":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"Address": @{ @"addressLine1": @"", @"addressLine2": @"" },
@"Age": @"",
@"Dob": @"",
@"Email": @"",
@"FirstName": @"",
@"LastName": @"",
@"MiddleName": @"",
@"PhoneNumber": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/contact/enrich"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/contact/enrich" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"Address\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\"\n },\n \"Age\": \"\",\n \"Dob\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"LastName\": \"\",\n \"MiddleName\": \"\",\n \"PhoneNumber\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/contact/enrich",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'Address' => [
'addressLine1' => '',
'addressLine2' => ''
],
'Age' => '',
'Dob' => '',
'Email' => '',
'FirstName' => '',
'LastName' => '',
'MiddleName' => '',
'PhoneNumber' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/contact/enrich', [
'body' => '{
"Address": {
"addressLine1": "",
"addressLine2": ""
},
"Age": "",
"Dob": "",
"Email": "",
"FirstName": "",
"LastName": "",
"MiddleName": "",
"PhoneNumber": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/contact/enrich');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'Address' => [
'addressLine1' => '',
'addressLine2' => ''
],
'Age' => '',
'Dob' => '',
'Email' => '',
'FirstName' => '',
'LastName' => '',
'MiddleName' => '',
'PhoneNumber' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'Address' => [
'addressLine1' => '',
'addressLine2' => ''
],
'Age' => '',
'Dob' => '',
'Email' => '',
'FirstName' => '',
'LastName' => '',
'MiddleName' => '',
'PhoneNumber' => ''
]));
$request->setRequestUrl('{{baseUrl}}/contact/enrich');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/contact/enrich' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"Address": {
"addressLine1": "",
"addressLine2": ""
},
"Age": "",
"Dob": "",
"Email": "",
"FirstName": "",
"LastName": "",
"MiddleName": "",
"PhoneNumber": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/contact/enrich' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"Address": {
"addressLine1": "",
"addressLine2": ""
},
"Age": "",
"Dob": "",
"Email": "",
"FirstName": "",
"LastName": "",
"MiddleName": "",
"PhoneNumber": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"Address\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\"\n },\n \"Age\": \"\",\n \"Dob\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"LastName\": \"\",\n \"MiddleName\": \"\",\n \"PhoneNumber\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/contact/enrich", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/contact/enrich"
payload = {
"Address": {
"addressLine1": "",
"addressLine2": ""
},
"Age": "",
"Dob": "",
"Email": "",
"FirstName": "",
"LastName": "",
"MiddleName": "",
"PhoneNumber": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/contact/enrich"
payload <- "{\n \"Address\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\"\n },\n \"Age\": \"\",\n \"Dob\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"LastName\": \"\",\n \"MiddleName\": \"\",\n \"PhoneNumber\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/contact/enrich")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"Address\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\"\n },\n \"Age\": \"\",\n \"Dob\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"LastName\": \"\",\n \"MiddleName\": \"\",\n \"PhoneNumber\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/contact/enrich') do |req|
req.body = "{\n \"Address\": {\n \"addressLine1\": \"\",\n \"addressLine2\": \"\"\n },\n \"Age\": \"\",\n \"Dob\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"LastName\": \"\",\n \"MiddleName\": \"\",\n \"PhoneNumber\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/contact/enrich";
let payload = json!({
"Address": json!({
"addressLine1": "",
"addressLine2": ""
}),
"Age": "",
"Dob": "",
"Email": "",
"FirstName": "",
"LastName": "",
"MiddleName": "",
"PhoneNumber": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/contact/enrich \
--header 'content-type: application/json' \
--data '{
"Address": {
"addressLine1": "",
"addressLine2": ""
},
"Age": "",
"Dob": "",
"Email": "",
"FirstName": "",
"LastName": "",
"MiddleName": "",
"PhoneNumber": ""
}'
echo '{
"Address": {
"addressLine1": "",
"addressLine2": ""
},
"Age": "",
"Dob": "",
"Email": "",
"FirstName": "",
"LastName": "",
"MiddleName": "",
"PhoneNumber": ""
}' | \
http POST {{baseUrl}}/contact/enrich \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "Address": {\n "addressLine1": "",\n "addressLine2": ""\n },\n "Age": "",\n "Dob": "",\n "Email": "",\n "FirstName": "",\n "LastName": "",\n "MiddleName": "",\n "PhoneNumber": ""\n}' \
--output-document \
- {{baseUrl}}/contact/enrich
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"Address": [
"addressLine1": "",
"addressLine2": ""
],
"Age": "",
"Dob": "",
"Email": "",
"FirstName": "",
"LastName": "",
"MiddleName": "",
"PhoneNumber": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/contact/enrich")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"person": {
"addresses": [
{
"city": "city",
"firstReportedDate": "date",
"lastReportedDate": "date",
"state": "state",
"street": "street",
"unit": "unit",
"zip": "zip"
}
],
"age": "age",
"emails": [
{
"email": "email"
}
],
"name": {
"firstName": "firstName",
"lastName": "lastname",
"middleName": "middlename"
},
"phones": [
{
"firstReportedDate": "date",
"isConnected": true,
"lastReportedDate": "date",
"number": "phone",
"type": "mobile"
}
]
}
}
POST
Search
{{baseUrl}}/address/autocomplete
BODY json
{
"Input": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/address/autocomplete");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"Input\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/address/autocomplete" {:content-type :json
:form-params {:Input ""}})
require "http/client"
url = "{{baseUrl}}/address/autocomplete"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"Input\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/address/autocomplete"),
Content = new StringContent("{\n \"Input\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/address/autocomplete");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"Input\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/address/autocomplete"
payload := strings.NewReader("{\n \"Input\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/address/autocomplete HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 17
{
"Input": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/address/autocomplete")
.setHeader("content-type", "application/json")
.setBody("{\n \"Input\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/address/autocomplete"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"Input\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"Input\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/address/autocomplete")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/address/autocomplete")
.header("content-type", "application/json")
.body("{\n \"Input\": \"\"\n}")
.asString();
const data = JSON.stringify({
Input: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/address/autocomplete');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/address/autocomplete',
headers: {'content-type': 'application/json'},
data: {Input: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/address/autocomplete';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"Input":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/address/autocomplete',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "Input": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"Input\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/address/autocomplete")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/address/autocomplete',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({Input: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/address/autocomplete',
headers: {'content-type': 'application/json'},
body: {Input: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/address/autocomplete');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
Input: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/address/autocomplete',
headers: {'content-type': 'application/json'},
data: {Input: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/address/autocomplete';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"Input":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"Input": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/address/autocomplete"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/address/autocomplete" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"Input\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/address/autocomplete",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'Input' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/address/autocomplete', [
'body' => '{
"Input": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/address/autocomplete');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'Input' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'Input' => ''
]));
$request->setRequestUrl('{{baseUrl}}/address/autocomplete');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/address/autocomplete' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"Input": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/address/autocomplete' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"Input": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"Input\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/address/autocomplete", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/address/autocomplete"
payload = { "Input": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/address/autocomplete"
payload <- "{\n \"Input\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/address/autocomplete")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"Input\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/address/autocomplete') do |req|
req.body = "{\n \"Input\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/address/autocomplete";
let payload = json!({"Input": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/address/autocomplete \
--header 'content-type: application/json' \
--data '{
"Input": ""
}'
echo '{
"Input": ""
}' | \
http POST {{baseUrl}}/address/autocomplete \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "Input": ""\n}' \
--output-document \
- {{baseUrl}}/address/autocomplete
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["Input": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/address/autocomplete")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"suggestions": [
{
"addressLine1": "house number, street, possible apt",
"addressLine2": "City, State",
"city": "",
"fullAddress": "full address",
"houseNumber": "",
"id": "id",
"postDirection": "",
"preDirection": "",
"state": "",
"streetName": "",
"streetType": ""
}
]
}