Requests
Status Request
Upon completion of a verification request, you can inquire about the verification status by accessing the status endpoint. You’ll have to provide the reference ID for the desired verification and you will be promptly informed about the status of that verification.
Endpoint
POSThttps://api.facia.ai/status
Authorization:
client-secret: 'your_client_secret_key_here'Description:
Make sure to include the client-secret
in the headers for proper authorization. otherwise, you may encounter status:403 Forbidden.
Request Body Samples:
- HTTP
- Javascript
- Curl
- PHP
- Python
- Ruby
- java
- C#
- Go
//POST /status HTTP/1.1
//Host: api.facia.ai
//client-secret:
//Content-Type: application/json
{
"reference_id": "123456789012345"
}
var myHeaders = new Headers();
myHeaders.append("client-secret", "ABC1231231XYZ12321312");
myHeaders.append("Content-Type", "application/x-www-form-urlencoded");
var urlencoded = new URLSearchParams();
urlencoded.append("reference_id", "123456789012345");
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: urlencoded,
redirect: 'follow'
};
fetch("https://api.facia.ai/status", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
curl --location 'https://api.facia.ai/status' \
--header 'client-secret;' \
--header 'Content-Type: application/json' \
--data '{
"reference_id": "DFG6TYJHGR567YH"
}'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.facia.ai/status',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => 'reference_id=123456789012345',
CURLOPT_HTTPHEADER => array(
'client-secret: ABC1231231XYZ12321312',
'Content-Type: application/x-www-form-urlencoded'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import requests
url = "https://api.facia.ai/status"
payload='reference_id=123456789012345' headers = {
'client-secret': 'ABC1231231XYZ12321312',
'Content-Type': 'application/x-www-form-urlencoded'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "json"
require "net/http"
url = URI("https://api.facia.ai/status")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["client-secret"] = ""
request["Content-Type"] = "application/json"
request.body = JSON.dump({
"reference_id": "DFG6TYJHGR567YH"
})
response = https.request(request)
puts response.read_body
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.nio.charset.StandardCharsets;
public class CurlExample {
public static void main(String[] args) throws Exception {
String url = "https://api.facia.ai/status";
String postData = "reference_id=123456789012345";
String clientSecret = "ABC1231231XYZ12321312";
URL apiUrl = new URL(url);
HttpURLConnection connection = (HttpURLConnection) apiUrl.openConnection();
connection.setRequestMethod("POST");
connection.setDoOutput(true);
connection.setDoInput(true);
connection.setRequestProperty("client-secret", clientSecret);
connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
try (OutputStream os = connection.getOutputStream()) {
byte[] postDataBytes = postData.getBytes(StandardCharsets.UTF_8);
os.write(postDataBytes);
os.flush();
}
try (BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()))) {
String inputLine;
StringBuilder response = new StringBuilder();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
System.out.println(response.toString());
} finally {
connection.disconnect();
}
}
}
using System;
using System.IO;
using System.Net;
using System.Text;
class Program
{
static void Main()
{
string url = "https://api.facia.ai/status";
string postData = "reference_id=123456789012345";
string clientSecret = "ABC1231231XYZ12321312";
WebRequest request = WebRequest.Create(url);
request.Method = "POST";
request.Headers.Add("client-secret", clientSecret);
request.ContentType = "application/x-www-form-urlencoded";
using (StreamWriter writer = new StreamWriter(request.GetRequestStream()))
{
writer.Write(postData);
}
try
{
using (WebResponse response = request.GetResponse())
using (Stream dataStream = response.GetResponseStream())
using (StreamReader reader = new StreamReader(dataStream))
{
string responseFromServer = reader.ReadToEnd();
Console.WriteLine(responseFromServer);
}
}
catch (WebException ex)
{
Console.WriteLine(ex.Message);
}
}
}
package main
import (
"bytes"
"fmt"
"io/ioutil"
"net/http"
)
func main() {
url := "https://api.facia.ai/status"
postData := "reference_id=123456789012345"
clientSecret := "ABC1231231XYZ12321312"
req, err := http.NewRequest("POST", url, bytes.NewBufferString(postData))
if err != nil {
fmt.Println("Error creating request:", err)
return
}
req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
req.Header.Set("client-secret", clientSecret)
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
fmt.Println("Error making request:", err)
return
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
fmt.Println("Error reading response:", err)
return
}
fmt.Println(string(body))
}
Request Parameter
Parameters | Description |
---|---|
reference_id | Required: Yes Type: String Example: reference_id="123456789012345" The reference id of the request against which the status should be retrieved. |
Response Sample
{
"status": true,
"message": "Success",
"result": {
"data": {
"reference_id": "123456789012345",
"type": "photo_id_match",
"status": "ACCEPTED",
"similarity_score": 0.9115378856658936,
"similarity_status": 1,
"quick_liveness_image": "https://app.facia.ai/backend/api/get-proof/d2p4Z04wTWxUN3Q0WjhPYmJhc283bWVWOUh2clpHTnQ6NjVhNTBjNWM1MDEwMmI5NDdlMGEwMGI7",
"video": null,
"id_card_image": "https://app.facia.ai/backend/api/get-proof/TFhaYThwdzdVNldFOGlERm80QWtNaVgzMUVzVUZsV1Q6NjVhNTBjNWM1MDEwMmI5NDdlMGEwMGJ2",
"video_frame_1": null,
"video_frame_2": null
}
}
}
Kyc Response Sample
{
"status": true,
"message": "Success",
"result": {
"data": {
"reference_id": "D4107871AC5FXXX",
"type": "kyc",
"status": "DECLINED",
"decline_reason": "AML screening failed",
"liveness_proof": "https://api.facia.ai/get-proof/eVVUXXX....",
"aml_screening": {
"match_status": "Potential Match",
"case_status": "Passed",
"pagination": {
"current_page": 1,
"records_per_page": 160,
"total_pages": 1,
"total_records": 20
},
"results": [
{
"birth_incorporation_date": [
"1947-03-10"
],
"categories": [
"Businessperson",
"SIP",
"PEP"
],
"countries": [
"International",
"Canada"
],
"data": {
"additional_information": {
"twitter_handle": [
"akimcampbell"
]
},
"identification_documents": [],
"legal_notice": [
"The information contained in this report is derived from public sources such as Official Government Websites, Global Watchlists, Compliance Reports, Published Research Articles and News Sources. Facia® is not the source of the data and is not responsible for the content of third party sources. Facia® does not determine any positive or negative risks associated with the profiled entity. These decisions are solely determined by our clients as mandated by their applicable regulatory obligations."
],
"linked_entities": [
{
"relation": [
"spouse"
],
"details": [
"Canadian actor, playwright, and pianist"
],
"name": [
"Hershey Felder"
]
},
{
"relation": [
"spouse"
],
"details": [
"Canadian mathematician, chess master, chess writer, chess official (1925-2012)"
],
"name": [
"Nathan Divinsky"
]
}
],
"sanction_details": [],
"summary": {
"address": [],
"alias": [
"Kim Campbellová",
"Avril Phaedra Douglas Campbell",
"Кэмпбелл, Ким",
"Avril Phædra Douglas Campbell",
"کیم کمپبل",
"კიმ კემპბელი",
"キム・キャンベル",
"金·坎贝尔",
"Кім Кэмпбел",
"킴 캠벨",
"Ким Кембъл",
"Κιμ Κάμπελ",
"کم کیمبل",
"किम क्याम्पबेल",
"كيم كامبل",
"Kim Campbell",
"קים קמפבל",
"Քիմ Քեմփբել",
"Ким Кэмпбелл",
"Кім Кемпбелл",
"Ким Кэмбелл",
"Ким Кембел",
"Kim Kempbel"
],
"category": [
"PEP"
],
"country": [
"Canada"
],
"date_of_birth": [
"1947-03-10"
],
"date_of_death": [],
"description": [],
"designation": [],
"education": [
"Prince of Wales Secondary School",
"Peter A. Allard School of Law",
"University of British Columbia",
"The Royal Conservatory of Music",
"London School of Economics and Political Science"
],
"email": [],
"entity_type": [
"Person"
],
"first_name": [
"Avril"
],
"gender": [
"female"
],
"keywords": [
"National government"
],
"last_name": [
"Campbell"
],
"name": [
"Kim Campbell"
],
"nationality": [
"Canada"
],
"net_worth": [],
"notes": [
"19th Prime Minister of Canada in 1993"
],
"occupation": [
"Politician"
],
"phone": [],
"place_of_birth": [
"Port Alberni Canada",
"Port Alberni"
],
"place_of_death": [],
"political_party": [],
"position": [
"Prime Minister of Canada (1993-1993)",
"member of the House of Commons of Canada"
],
"position_occupancies": [
"member of the House of Commons of Canada"
],
"religion": [
"Anglican Church of Canada"
],
"suffix": [],
"title": [],
"website": [
"http://www.kimcampbell.com/"
]
}
},
"entity_types": [
"Entity",
"Person"
],
"id": "TZVsTJNDuSkerVtLPzxyDK",
"matched_alias": "",
"matched_names": [
{
"matched_name": "Kim Campbell",
"matching_fields": {},
"record_id": "TZVsTJNDuSkerVtLPzxyDK",
"score": "100",
"source_ids": [
"431699"
]
},
{
"matched_name": "Kim Campbell",
"matching_fields": {
"alias": false,
"birth_incorporation_date": true,
"image": false,
"profile_name": true
},
"record_id": "L8ayNgJBRH4FtzLfGstxLN",
"score": "100",
"source_ids": [
"17109391",
"431871"
]
}
],
"matched_rca": "",
"name": "Kim Campbell",
"relevance_status": {
"alias": false,
"birth_incorporation_date": false,
"category": true,
"country": false,
"entity_type": false,
"image_match": false,
"potential_match": false,
"profile_name": true,
"rca_name": false,
"unique_identifier": false
},
"risk_audit": {
"category_rules": {
"business": {
"absolute_score": 10,
"selected": false,
"weightage": 50,
"weighted_score": 0
},
"businessperson": {
"absolute_score": 10,
"weightage": 50,
"weighted_score": 5.0
},
"fitness and probity": {
"absolute_score": 80,
"selected": false,
"weightage": 50,
"weighted_score": 0
},
"insolvency": {
"absolute_score": 80,
"selected": false,
"weightage": 50,
"weighted_score": 0
},
"pep": {
"absolute_score": 70,
"weightage": 50,
"weighted_score": 35.0
},
"pep level 1": {
"absolute_score": 70,
"selected": false,
"weightage": 50,
"weighted_score": 0
},
"pep level 2": {
"absolute_score": 49,
"selected": false,
"weightage": 50,
"weighted_score": 0
},
"pep level 3": {
"absolute_score": 40,
"selected": false,
"weightage": 50,
"weighted_score": 0
},
"pep level 4": {
"absolute_score": 25,
"selected": false,
"weightage": 50,
"weighted_score": 0
},
"rca": {
"absolute_score": 49,
"selected": false,
"weightage": 50,
"weighted_score": 0
},
"sanctions": {
"absolute_score": 100,
"selected": false,
"weightage": 50,
"weighted_score": 0
},
"sie": {
"absolute_score": 90,
"selected": false,
"weightage": 50,
"weighted_score": 0
},
"sip": {
"absolute_score": 90,
"selected": true,
"weightage": 50,
"weighted_score": 45.0
},
"warnings and regulatory enforcement": {
"absolute_score": 90,
"selected": false,
"weightage": 50,
"weighted_score": 0
}
},
"country_rules": {
"afghanistan": {
"absolute_score": 75.71,
"selected": false,
"weightage": 50,
"weighted_score": 0
},
"albania": {
"absolute_score": 38.63,
"selected": false,
"weightage": 50,
"weighted_score": 0
}
}
},
"risk_decision": "Failed",
"risk_level": "High",
"risk_score": 95,
"risk_score_engine_id": "65ce1f26a74c6232ed9ce828",
"risk_title": "AML Default Risk",
"risk_view": {
"categories": {
"risk_level": "Medium",
"risk_scores": {
"Businessperson": 10,
"PEP": 70,
"SIP": 90
},
"score": 45.0,
"weightage": 50
},
"countries": {
"risk_level": "Medium",
"risk_scores": {
"Canada": 25.41,
"International": 100
},
"score": 50.0,
"weightage": 50
},
"crimes": {
"risk_level": "Low",
"risk_scores": {},
"score": 0,
"weightage": 0
},
"custom_list": {
"risk_level": "Low",
"risk_scores": {},
"score": 0,
"weightage": 0
}
},
"source_details": [
{
"categories": [
"PEP",
"Businessperson",
"SIP"
],
"countries": [
"International"
],
"data": {
"additional_information": {
"twitter_handle": [
"akimcampbell"
]
},
"identification_documents": [],
"legal_notice": [
"The information contained in this report is derived from public sources such as Official Government Websites, Global Watchlists, Compliance Reports, Published Research Articles and News Sources. Facias® is not the source of the data and is not responsible for the content of third party sources. Facia® does not determine any positive or negative risks associated with the profiled entity. These decisions are solely determined by our clients as mandated by their applicable regulatory obligations."
],
"linked_entities": [
{
"relation": [
"spouse"
],
"details": [
"Canadian actor, playwright, and pianist"
],
"name": [
"Hershey Felder"
]
},
{
"relation": [
"spouse"
],
"details": [
"Canadian mathematician, chess master, chess writer, chess official (1925-2012)"
],
"name": [
"Nathan Divinsky"
]
}
],
"sanction_details": [],
"summary": {
"address": [],
"alias": [
"Kim Campbellová",
"Avril Phaedra Douglas Campbell",
"Кэмпбелл, Ким",
"Avril Phædra Douglas Campbell",
"کیم کمپبل",
"კიმ კემპბელი",
"キム・キャンベル",
"金·坎贝尔",
"Кім Кэмпбел",
"킴 캠벨",
"Ким Кембъл",
"Κιμ Κάμπελ",
"کم کیمبل",
"किम क्याम्पबेल",
"كيم كامبل",
"Kim Campbell",
"קים קמפבל",
"Քիմ Քեմփբել",
"Ким Кэмпбелл",
"Кім Кемпбелл",
"Ким Кэмбелл",
"Ким Кембел",
"Kim Kempbel"
],
"category": [
"PEP"
],
"country": [
"Canada"
],
"date_of_birth": [
"1947-03-10"
],
"date_of_death": [],
"description": [],
"designation": [],
"education": [
"Prince of Wales Secondary School",
"Peter A. Allard School of Law",
"University of British Columbia",
"The Royal Conservatory of Music",
"London School of Economics and Political Science"
],
"email": [],
"entity_type": [
"Person"
],
"first_name": [
"Avril"
],
"gender": [
"female"
],
"keywords": [
"National government"
],
"last_name": [
"Campbell"
],
"name": [
"Kim Campbell"
],
"nationality": [
"Canada"
],
"net_worth": [],
"notes": [
"19th Prime Minister of Canada in 1993"
],
"occupation": [
"Politician"
],
"phone": [],
"place_of_birth": [
"Port Alberni Canada",
"Port Alberni"
],
"place_of_death": [],
"political_party": [],
"position": [
"Prime Minister of Canada (1993-1993)",
"member of the House of Commons of Canada"
],
"position_occupancies": [
"member of the House of Commons of Canada"
],
"religion": [
"Anglican Church of Canada"
],
"suffix": [],
"title": [],
"website": [
"http://www.kimcampbell.com/"
]
}
},
"description": "Pantheon is project that uses biographical data to expose patterns of human collective memory. Pantheon contains data on more than 70k biographies, which Pantheon distributes through a powerful data visualization engine centered on locations, occupations, and biographies. Pantheon's biographical data contains information on the age, occupation, place of birth, and place of death, of historical characters with a presence in more than 15 language editions of Wikipedia. Pantheon also uses real-time data from the Wikipedia API to show the dynamics of attention received by historical characters in different Wikipedia language editions.",
"publisher": "Pantheon World",
"url": "https://pantheon.world/"
},
{
"categories": [
"PEP"
],
"countries": [
"Canada"
],
"data": {
"additional_information": {
"twitter_handle": [
"akimcampbell"
]
},
"identification_documents": [],
"legal_notice": [
"The information contained in this report is derived from public sources such as Official Government Websites, Global Watchlists, Compliance Reports, Published Research Articles and News Sources. Facia® is not the source of the data and is not responsible for the content of third party sources. Facia® does not determine any positive or negative risks associated with the profiled entity. These decisions are solely determined by our clients as mandated by their applicable regulatory obligations."
],
"linked_entities": [
{
"relation": [
"spouse"
],
"details": [
"Canadian actor, playwright, and pianist"
],
"name": [
"Hershey Felder"
]
},
{
"relation": [
"spouse"
],
"details": [
"Canadian mathematician, chess master, chess writer, chess official (1925-2012)"
],
"name": [
"Nathan Divinsky"
]
}
],
"sanction_details": [],
"summary": {
"address": [],
"alias": [
"Kim Campbellová",
"Avril Phaedra Douglas Campbell",
"Кэмпбелл, Ким",
"Avril Phædra Douglas Campbell",
"کیم کمپبل",
"კიმ კემპბელი",
"キム・キャンベル",
"金·坎贝尔",
"Кім Кэмпбел",
"킴 캠벨",
"Ким Кембъл",
"Κιμ Κάμπελ",
"کم کیمبل",
"किम क्याम्पबेल",
"كيم كامبل",
"Kim Campbell",
"קים קמפבל",
"Քիմ Քեմփբել",
"Ким Кэмпбелл",
"Кім Кемпбелл",
"Ким Кэмбелл",
"Ким Кембел",
"Kim Kempbel"
],
"category": [
"PEP"
],
"country": [
"Canada"
],
"date_of_birth": [
"1947-03-10"
],
"date_of_death": [],
"description": [],
"designation": [],
"education": [
"Prince of Wales Secondary School",
"Peter A. Allard School of Law",
"University of British Columbia",
"The Royal Conservatory of Music",
"London School of Economics and Political Science"
],
"email": [],
"entity_type": [
"Person"
],
"first_name": [
"Avril"
],
"gender": [
"female"
],
"keywords": [
"National government"
],
"last_name": [
"Campbell"
],
"name": [
"Kim Campbell"
],
"nationality": [
"Canada"
],
"net_worth": [],
"notes": [
"19th Prime Minister of Canada in 1993"
],
"occupation": [
"Politician"
],
"phone": [],
"place_of_birth": [
"Port Alberni Canada",
"Port Alberni"
],
"place_of_death": [],
"political_party": [],
"position": [
"Prime Minister of Canada (1993-1993)",
"member of the House of Commons of Canada"
],
"position_occupancies": [
"member of the House of Commons of Canada"
],
"religion": [
"Anglican Church of Canada"
],
"suffix": [],
"title": [],
"website": [
"http://www.kimcampbell.com/"
]
}
},
"description": "Wikidata serves as the source of much of the data related to politically exposed persons (PEPs). The Wikidata importer will also traverse family and personal relationships that are documented in the database and import relatives and close associates whereever these are stated.",
"publisher": "Wikidata",
"url": "https://www.wikidata.org/wiki/Wikidata:Main_Page"
}
]
}
],
"searched_name": "John Doe",
"total_records": 20
},
"kyb_result": {
"status": "pending",
"business_name": "bank",
"registration_number": null,
"countries": [
"GB"
],
"search_filters": "contains",
"total_records": 1,
"results": [
{
"kyb_response_id": "6853adc8e18fXXXX",
"country_code": "GB",
"name": "Test Company",
"registration_number": "11133322",
"registration_date": "14-12-1996 15:13:47",
"type": "Private Limited",
"status": "active",
"fetch_status": "pending",
"extensive_data": []
}
]
},
"document_proofs": {
"fronside_proof": "https://api.facia.ai/get-doc-proof/7f6XXX....",
"backside_proof": "https://api.facia.ai/get-doc-proof/c871XXX..."
},
"document_ocr_results": {
"name": {
"first_name": "john",
"middle_name": null,
"last_name": "doe",
"full_name": "john doe"
},
"dob": "1997-01-12",
"expiry_date": "2026-12-14",
"issue_date": "2016-12-14",
"document_number": "352011234567",
"selected_type": [
"id_card"
],
"supported_types": [
"id_card",
"passport",
"driving_license",
"credit_or_debit_card"
]
}
}
}
}
Response Parameter
Parameter | Description |
---|---|
status | Type: Boolean Example: true or false Indicates whether the request was successful ( true ) or not (false ). |
message | Type: String Descriptive message corresponding to the request status. |
errors | Type: Object (present only if status is false )Contains errors explaining why the request failed. |
result.data.reference_id | Type: String Example: "D4107871AC5FXXX" Unique transaction identifier generated by the system. |
result.data.status | Type: String Values: ACCEPTED / DECLINED The final verification result status. |
result.data.decline_reason | Type: String Example: "AML screening failed" Detailed reason provided when status is DECLINED . |
result.data.liveness_proof | Type: URL String Example: "https://api.facia.ai/get-proof/eVVUXXX" URL of the liveness image. |
result.data.document_proofs | Type: Object Contains: frontside_proof , backside_proof URLs of the document images. |
result.data.document_ocr_results | Type: Object Contains: Extracted name, DOB, and other document details from OCR. |
result.data.document_additional_data | Type: Object Contains: Additional data relevant to the document. |
result.data.aml_screening | Type: Object Contains: Detailed results of AML screening when performed. |
result.data.similarity_status | Type: String Example: similarity_status=1 1 means matched, 0 means not matched. |
result.data.similarity_score | Type: String Example: similarity_score=0.98 |
result.data.quick_liveness_image | Deprecated. Use proof_url instead.The URL contains the image proof that was provided/captured for the verification. Example: https://app.facia.ai/backend/api/get-proof/d2p4Z... |
result.data.proof_url | Type: URL String The URL containing the image proof. Example: https://app.facia.ai/backend/api/get-proof/d2p4Z... |
result.data.video | Type: String (URL) Contains the recorded video of the image proof during the verification process. |
result.data.id_card_image | Type: String (Base64 or URL) Contains the second image frame provided under face match service. |
result.data.under_18 | Type: Integer Example: under_18=50 Probability that the individual is under 18, expressed as a percentage. null if age is not detected. |
result.data.under_21 | Type: Integer Example: under_21=100 Probability that the individual is under 21, expressed as a percentage. null if age is not detected. |
To seamlessly access the image, please retrieve it within 15 minutes otherwise, the link will expire and you will have to make an API call again.
Delete Request
After completing a transaction, you may use the delete request endpoint to delete the transaction. Please provide the reference ID for that request, and you will promptly be informed about the deletion of the transaction.
Endpoint
POSThttps://api.facia.ai/delete
Authorization:
Token Type: BearerDescription:
This API utilizes Access token or Client-Secret key in header for authentication.
You can use your client_id and client_secret key when using the "/request-access-token" endpoint to obtain a Bearer token for authorization while connecting to this API. For additional details on Authorization, click Here
Request Body Samples:
- HTTP
- Javascript
- Curl
- PHP
- Python
- Ruby
- Java
- C#
- Go
//POST /delete HTTP/1.1
//Host: api.facia.ai
//client-secret:
//Content-Type: application/json
{
"reference_id": "reference to be deleted",
"comment": "add_your_comment_here"
}
var myHeaders = new Headers();
myHeaders.append("client-secret", "ABC1231231XYZ12321312");
myHeaders.append("Content-Type", "application/x-www-form-urlencoded");
var urlencoded = new URLSearchParams();
urlencoded.append("reference_id", "123456789012345");
urlencoded.append("comment", "your_comment");
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: urlencoded,
redirect: 'follow'
};
fetch("https://api.facia.ai/delete", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
curl --location 'https://api.facia.ai/delete' \
--header 'client-secret;' \
--header 'Content-Type: application/json' \
--data '{
"reference_id": "JHR53TYTHYW18I9",
"comment": "add_your_comment_here"
}'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.facia.ai/delete',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => 'reference_id=123456789012345&comment=your_comment',
CURLOPT_HTTPHEADER => array(
'client-secret: ABC1231231XYZ12321312',
'Content-Type: application/x-www-form-urlencoded'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import requests
url = "https://api.facia.ai/delete"
payload='reference_id=123456789012345&comment=your_comment' headers = {
'client-secret': 'ABC1231231XYZ12321312',
'Content-Type': 'application/x-www-form-urlencoded'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
require 'net/http'
url = URI("https://api.facia.ai/delete")
payload = 'reference_id=123456789012345&comment=your_comment'
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true if url.scheme == 'https'
request = Net::HTTP::Post.new(url)
request['client-secret'] = 'ABC1231231XYZ12321312'
request['Content-Type'] = 'application/x-www-form-urlencoded'
request.body = payload
response = http.request(request)
puts response.read_body
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.nio.charset.StandardCharsets;
public class Main {
public static void main(String[] args) throws IOException {
String url = "https://api.facia.ai/delete";
String payload = "reference_id=123456789012345&comment=your_comment";
URL apiUrl = new URL(url);
HttpURLConnection connection = (HttpURLConnection) apiUrl.openConnection();
connection.setRequestMethod("POST");
connection.setRequestProperty("client-secret", "ABC1231231XYZ12321312");
connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
connection.setDoOutput(true);
try (OutputStream os = connection.getOutputStream()) {
byte[] postDataBytes = payload.getBytes(StandardCharsets.UTF_8);
os.write(postDataBytes);
}
try (BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()))) {
String inputLine;
StringBuilder response = new StringBuilder();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
System.out.println(response.toString());
} catch (IOException e) {
System.out.println("Error reading response: " + e.getMessage());
} finally {
connection.disconnect();
}
}
}
using System;
using System.Net.Http;
using System.Threading.Tasks;
class Program
{
static async Task Main()
{
string url = "https://api.facia.ai/delete";
string payload = "reference_id=123456789012345&comment=your_comment";
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("client-secret", "ABC1231231XYZ12321312");
client.DefaultRequestHeaders.Add("Content-Type", "application/x-www-form-urlencoded");
HttpResponseMessage response = await client.PostAsync(url, new StringContent(payload));
if (response.IsSuccessStatusCode)
{
string responseContent = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseContent);
}
else
{
Console.WriteLine($"Error: {response.StatusCode} - {response.ReasonPhrase}");
}
}
}
}
package main
import (
"bytes"
"fmt"
"io/ioutil"
"net/http"
)
func main() {
url := "https://api.facia.ai/delete"
payload := "reference_id=123456789012345&comment=your_comment"
req, err := http.NewRequest("POST", url, bytes.NewBufferString(payload))
if err != nil {
fmt.Println("Error creating request:", err)
return
}
req.Header.Set("client-secret", "ABC1231231XYZ12321312")
req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
fmt.Println("Error making request:", err)
return
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
fmt.Println("Error reading response:", err)
return
}
fmt.Println(string(body))
}
Request Parameter
Parameters | Description |
---|---|
reference_id | Required: Yes Type: String Example: reference_id="123456789012345" This is the unique reference ID of request which needs to be deleted. |
comment | Required:Yes Type: String Maximum: 255 characters Add a comment why the request is deleted for your future reference. |
Response Sample
{
"status": true,
"message": "Transaction has been deleted successfully!",
"result": {
"data": []
}
}
Rate Limiting
To maintain optimal performance and ensure fair utilization of our service, Facia implements request limits for both Production and demo accounts. There are 60 requests that can be generated in one minute.
Please note that the rate limit mentioned is subject to change. If you require a different rate limit or have specific needs, please contact our Tech Support Team at [email protected] to discuss the possibility of adjusting the rate limit for your account.