جدول پکیج های احراز هویت
ابتدا از لیست زیر پکیج موردنظر خود را انتخاب نمایید سپس کد پکیج موردنظر را در ورودی توکن وارد نمایید.
ردیف | نام پکیج | کدپکیج | گام های پکیج |
---|---|---|---|
1 | Package1 | 7161 | سرویس شاهکار و ثبت احوال |
2 | Package2 | 1916 | سرویس شاهکار و ثبت احوال ، سرویس بازخوانی کارت ملی(OCR) |
3 | Package3 | 5433 | سرویس شاهکار و ثبت احوال ، سرویس بازخوانی کارت ملی(OCR) ، سرویس امضای دیجیتال |
4 | Package4 | 9314 | سرویس شاهکار و ثبت احوال ، سرویس بازخوانی کارت ملی(OCR) ، سرویس امضای دیجیتال ، دریافت تصویر شناسنامه فرد |
5 | Package5 | 3282 | سرویس شاهکار و ثبت احوال ، سرویس بازخوانی کارت ملی(OCR) ، سرویس امضای دیجیتال ، دریافت تصویر شناسنامه فرد ، دریافت سریال کارت ملی فرد |
6 | Package6 | 1087 | سرویس شاهکار و ثبت احوال ، سرویس بازخوانی کارت ملی(OCR) ، سرویس امضای دیجیتال ، دریافت تصویر شناسنامه فرد ، دریافت سریال کارت ملی فرد ، پردازش تصویر و ویدیو |
7 | Package7 | 7979 | سرویس شاهکار و ثبت احوال ، سرویس بازخوانی کارت ملی(OCR) ، دریافت سریال کارت ملی فرد ، پردازش تصویر و ویدیو |
8 | Package8 | 2756 | سرویس شاهکار و ثبت احوال ، دریافت سریال کارت ملی فرد ، پردازش تصویر و ویدیو |
9 | Package9 | 6359 | سرویس امضای دیجیتال |
درگاه احرازهویت
دریافت لینک درگاه احراز هویت :
برای فراخوانی این سرویس مراحل زیر را طی کنید:
۱-متد فراخوانی سرویس POST می باشد.
2-در این سرویس شما می توانید لینک درگاه احراز هویت و orderid را دریافت نمایید و پروسه احراز را آغاز نمایید.
https://api.itsaaz.ir/EKyc/AuthorizedWeb
Post
accept: text/plain
Content-Type: application/json-patch+json
{
"username": "test",
"password": "t_86574213@T",
"clientId": "ekyc",
"clientSecret": "f63026a9-912d-8978-ac80-4ae5d63db1ac",
"returnUrl": "string",
"packageCode": "9654",
"formConfigCode": "",
"mobile": "",
"nationalCode": "",
"birthDate": "",
"shahkarInquiry": true,
"civilRegInquiry": true
}
{
"data": {
"redirectUrl": "لینک",
"orderId": "شماره درخواست"
},
"meta": null,
"error": null
}
پارامترهای ورودی
ردیف | پارامتر ورودی | نوع ورودی | توضیحات |
---|---|---|---|
1 | username* | String | نام کاربری |
2 | password* | String | رمز عبور |
3 | clientId* | String | آیدی مشتری |
4 | clientSecret* | String | شناسه مشتری |
5 | returnUrl* | String | لینک بازگشت به صفحه |
6 | NationalCode | String | کدملی فرد |
7 | mobile* | String | شماره موبایل فرد |
8 | BirthDate | String | تاریخ تولد (شمسی04/05/1400) |
9 | packageCode* | String | کد پکیج موردنظر |
10 | shahkarInquiry | bool | تطبیق شماره موبایل و کدملی فرد |
11 | civilRegInquiry | bool | دریافت اطلاعات ثبت احوال فرد |
نمونه کد
var client = new RestClient("https://api-ekyc-sandbox.itsaaz.ir/api/v1/EKyc/AuthorizedWeb");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("accept", "text/plain");
request.AddHeader("Content-Type", "application/json-patch+json");
var body = @"{""username"":"""",""password"":""@P"",""clientId"":"""",""clientSecret"":""d36f2d7a-280e-4427-5daf-481b51703142"",""returnUrl"":""https://google.com/"",""eKycWebType"":4,""mobile"":"""",""nationalCode"":"""",""birthDate"":""56655665""}";
request.AddParameter("application/json-patch+json", body, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request POST 'https://api-ekyc-sandbox.itsaaz.ir/api/v1/EKyc/AuthorizedWeb' \
--header 'accept: text/plain' \
--header 'Content-Type: application/json-patch+json' \
--data-raw '{"username":"","password":"@P","clientId":"","clientSecret":"d36f2d7a-280e-4427-5daf-481b51703142","returnUrl":"https://google.com/","eKycWebType":4,"mobile":"","nationalCode":"","birthDate":"56655665"}'
var headers = {
'accept': 'text/plain',
'Content-Type': 'application/json-patch+json'
};
var request = http.Request('POST', Uri.parse('https://api-ekyc-sandbox.itsaaz.ir/api/v1/EKyc/AuthorizedWeb'));
request.body = json.encode({
"username": "",
"password": "@P",
"clientId": "",
"clientSecret": "d36f2d7a-280e-4427-5daf-481b51703142",
"returnUrl": "https://google.com/",
"eKycWebType": 4,
"mobile": "",
"nationalCode": "",
"birthDate": "56655665"
});
request.headers.addAll(headers);
http.StreamedResponse response = await request.send();
if (response.statusCode == 200) {
print(await response.stream.bytesToString());
}
else {
print(response.reasonPhrase);
}
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api-ekyc-sandbox.itsaaz.ir/api/v1/EKyc/AuthorizedWeb"
method := "POST"
payload := strings.NewReader(`{"username":"","password":"@P","clientId":"","clientSecret":"d36f2d7a-280e-4427-5daf-481b51703142","returnUrl":"https://google.com/","eKycWebType":4,"mobile":"","nationalCode":"","birthDate":"56655665"}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("accept", "text/plain")
req.Header.Add("Content-Type", "application/json-patch+json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
POST /api/v1/EKyc/AuthorizedWeb HTTP/1.1
Host: api-ekyc-sandbox.itsaaz.ir
accept: text/plain
Content-Type: application/json-patch+json
Content-Length: 202
{"username":"","password":"@P","clientId":"","clientSecret":"d36f2d7a-280e-4427-5daf-481b51703142","returnUrl":"https://google.com/","eKycWebType":4,"mobile":"","nationalCode":"","birthDate":"56655665"}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json-patch+json");
RequestBody body = RequestBody.create(mediaType, "{\"username\":\"\",\"password\":\"@P\",\"clientId\":\"\",\"clientSecret\":\"d36f2d7a-280e-4427-5daf-481b51703142\",\"returnUrl\":\"https://google.com/\",\"eKycWebType\":4,\"mobile\":\"\",\"nationalCode\":\"\",\"birthDate\":\"56655665\"}");
Request request = new Request.Builder()
.url("https://api-ekyc-sandbox.itsaaz.ir/api/v1/EKyc/AuthorizedWeb")
.method("POST", body)
.addHeader("accept", "text/plain")
.addHeader("Content-Type", "application/json-patch+json")
.build();
Response response = client.newCall(request).execute();
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.post("https://api-ekyc-sandbox.itsaaz.ir/api/v1/EKyc/AuthorizedWeb")
.header("accept", "text/plain")
.header("Content-Type", "application/json-patch+json")
.body("{\"username\":\"\",\"password\":\"@P\",\"clientId\":\"\",\"clientSecret\":\"d36f2d7a-280e-4427-5daf-481b51703142\",\"returnUrl\":\"https://google.com/\",\"eKycWebType\":4,\"mobile\":\"\",\"nationalCode\":\"\",\"birthDate\":\"56655665\"}")
.asString();
var myHeaders = new Headers();
myHeaders.append("accept", "text/plain");
myHeaders.append("Content-Type", "application/json-patch+json");
var raw = JSON.stringify({
"username": "",
"password": "@P",
"clientId": "",
"clientSecret": "d36f2d7a-280e-4427-5daf-481b51703142",
"returnUrl": "https://google.com/",
"eKycWebType": 4,
"mobile": "",
"nationalCode": "",
"birthDate": "56655665"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api-ekyc-sandbox.itsaaz.ir/api/v1/EKyc/AuthorizedWeb", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
var settings = {
"url": "https://api-ekyc-sandbox.itsaaz.ir/api/v1/EKyc/AuthorizedWeb",
"method": "POST",
"timeout": 0,
"headers": {
"accept": "text/plain",
"Content-Type": "application/json-patch+json"
},
"data": JSON.stringify({
"username": "",
"password": "@P",
"clientId": "",
"clientSecret": "d36f2d7a-280e-4427-5daf-481b51703142",
"returnUrl": "https://google.com/",
"eKycWebType": 4,
"mobile": "",
"nationalCode": "",
"birthDate": "56655665"
}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var data = JSON.stringify({
"username": "",
"password": "@P",
"clientId": "",
"clientSecret": "d36f2d7a-280e-4427-5daf-481b51703142",
"returnUrl": "https://google.com/",
"eKycWebType": 4,
"mobile": "",
"nationalCode": "",
"birthDate": "56655665"
});
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function() {
if(this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://api-ekyc-sandbox.itsaaz.ir/api/v1/EKyc/AuthorizedWeb");
xhr.setRequestHeader("accept", "text/plain");
xhr.setRequestHeader("Content-Type", "application/json-patch+json");
xhr.send(data);
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_URL, "https://api-ekyc-sandbox.itsaaz.ir/api/v1/EKyc/AuthorizedWeb");
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "accept: text/plain");
headers = curl_slist_append(headers, "Content-Type: application/json-patch+json");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
const char *data = "{\"username\":\"\",\"password\":\"@P\",\"clientId\":\"\",\"clientSecret\":\"d36f2d7a-280e-4427-5daf-481b51703142\",\"returnUrl\":\"https://google.com/\",\"eKycWebType\":4,\"mobile\":\"\",\"nationalCode\":\"\",\"birthDate\":\"56655665\"}";
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data);
res = curl_easy_perform(curl);
}
curl_easy_cleanup(curl);
var axios = require('axios');
var data = JSON.stringify({
"username": "",
"password": "@P",
"clientId": "",
"clientSecret": "d36f2d7a-280e-4427-5daf-481b51703142",
"returnUrl": "https://google.com/",
"eKycWebType": 4,
"mobile": "",
"nationalCode": "",
"birthDate": "56655665"
});
var config = {
method: 'post',
url: 'https://api-ekyc-sandbox.itsaaz.ir/api/v1/EKyc/AuthorizedWeb',
headers: {
'accept': 'text/plain',
'Content-Type': 'application/json-patch+json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var https = require('follow-redirects').https;
var fs = require('fs');
var options = {
'method': 'POST',
'hostname': 'api-ekyc-sandbox.itsaaz.ir',
'path': '/api/v1/EKyc/AuthorizedWeb',
'headers': {
'accept': 'text/plain',
'Content-Type': 'application/json-patch+json'
},
'maxRedirects': 20
};
var req = https.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function (chunk) {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
res.on("error", function (error) {
console.error(error);
});
});
var postData = JSON.stringify({
"username": "",
"password": "@P",
"clientId": "",
"clientSecret": "d36f2d7a-280e-4427-5daf-481b51703142",
"returnUrl": "https://google.com/",
"eKycWebType": 4,
"mobile": "",
"nationalCode": "",
"birthDate": "56655665"
});
req.write(postData);
req.end();
var request = require('request');
var options = {
'method': 'POST',
'url': 'https://api-ekyc-sandbox.itsaaz.ir/api/v1/EKyc/AuthorizedWeb',
'headers': {
'accept': 'text/plain',
'Content-Type': 'application/json-patch+json'
},
body: JSON.stringify({
"username": "",
"password": "@P",
"clientId": "",
"clientSecret": "d36f2d7a-280e-4427-5daf-481b51703142",
"returnUrl": "https://google.com/",
"eKycWebType": 4,
"mobile": "",
"nationalCode": "",
"birthDate": "56655665"
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
var unirest = require('unirest');
var req = unirest('POST', 'https://api-ekyc-sandbox.itsaaz.ir/api/v1/EKyc/AuthorizedWeb')
.headers({
'accept': 'text/plain',
'Content-Type': 'application/json-patch+json'
})
.send(JSON.stringify({
"username": "",
"password": "@P",
"clientId": "",
"clientSecret": "d36f2d7a-280e-4427-5daf-481b51703142",
"returnUrl": "https://google.com/",
"eKycWebType": 4,
"mobile": "",
"nationalCode": "",
"birthDate": "56655665"
}))
.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.raw_body);
});
#import <Foundation/Foundation.h>
dispatch_semaphore_t sema = dispatch_semaphore_create(0);
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://api-ekyc-sandbox.itsaaz.ir/api/v1/EKyc/AuthorizedWeb"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
NSDictionary *headers = @{
@"accept": @"text/plain",
@"Content-Type": @"application/json-patch+json"
};
[request setAllHTTPHeaderFields:headers];
NSData *postData = [[NSData alloc] initWithData:[@"{\"username\":\"\",\"password\":\"@P\",\"clientId\":\"\",\"clientSecret\":\"d36f2d7a-280e-4427-5daf-481b51703142\",\"returnUrl\":\"https://google.com/\",\"eKycWebType\":4,\"mobile\":\"\",\"nationalCode\":\"\",\"birthDate\":\"56655665\"}" dataUsingEncoding:NSUTF8StringEncoding]];
[request setHTTPBody:postData];
[request setHTTPMethod:@"POST"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
dispatch_semaphore_signal(sema);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSError *parseError = nil;
NSDictionary *responseDictionary = [NSJSONSerialization JSONObjectWithData:data options:0 error:&parseError];
NSLog(@"%@",responseDictionary);
dispatch_semaphore_signal(sema);
}
}];
[dataTask resume];
dispatch_semaphore_wait(sema, DISPATCH_TIME_FOREVER);
open Lwt
open Cohttp
open Cohttp_lwt_unix
let postData = ref "{\"username\":\"\",\"password\":\"@P\",\"clientId\":\"\",\"clientSecret\":\"d36f2d7a-280e-4427-5daf-481b51703142\",\"returnUrl\":\"https://google.com/\",\"eKycWebType\":4,\"mobile\":\"\",\"nationalCode\":\"\",\"birthDate\":\"56655665\"}";;
let reqBody =
let uri = Uri.of_string "https://api-ekyc-sandbox.itsaaz.ir/api/v1/EKyc/AuthorizedWeb" in
let headers = Header.init ()
|> fun h -> Header.add h "accept" "text/plain"
|> fun h -> Header.add h "Content-Type" "application/json-patch+json"
in
let body = Cohttp_lwt.Body.of_string !postData in
Client.call ~headers ~body `POST uri >>= fun (_resp, body) ->
body |> Cohttp_lwt.Body.to_string >|= fun body -> body
let () =
let respBody = Lwt_main.run reqBody in
print_endline (respBody)
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api-ekyc-sandbox.itsaaz.ir/api/v1/EKyc/AuthorizedWeb',
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 =>'{"username":"","password":"@P","clientId":"","clientSecret":"d36f2d7a-280e-4427-5daf-481b51703142","returnUrl":"https://google.com/","eKycWebType":4,"mobile":"","nationalCode":"","birthDate":"56655665"}',
CURLOPT_HTTPHEADER => array(
'accept: text/plain',
'Content-Type: application/json-patch+json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://api-ekyc-sandbox.itsaaz.ir/api/v1/EKyc/AuthorizedWeb');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
'follow_redirects' => TRUE
));
$request->setHeader(array(
'accept' => 'text/plain',
'Content-Type' => 'application/json-patch+json'
));
$request->setBody('{"username":"","password":"@P","clientId":"","clientSecret":"d36f2d7a-280e-4427-5daf-481b51703142","returnUrl":"https://google.com/","eKycWebType":4,"mobile":"","nationalCode":"","birthDate":"56655665"}');
try {
$response = $request->send();
if ($response->getStatus() == 200) {
echo $response->getBody();
}
else {
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
$response->getReasonPhrase();
}
}
catch(HTTP_Request2_Exception $e) {
echo 'Error: ' . $e->getMessage();
}
<?php
$client = new http\Client;
$request = new http\Client\Request;
$request->setRequestUrl('https://api-ekyc-sandbox.itsaaz.ir/api/v1/EKyc/AuthorizedWeb');
$request->setRequestMethod('POST');
$body = new http\Message\Body;
$body->append('{"username":"","password":"@P","clientId":"","clientSecret":"d36f2d7a-280e-4427-5daf-481b51703142","returnUrl":"https://google.com/","eKycWebType":4,"mobile":"","nationalCode":"","birthDate":"56655665"}');
$request->setBody($body);
$request->setOptions(array());
$request->setHeaders(array(
'accept' => 'text/plain',
'Content-Type' => 'application/json-patch+json'
));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("accept", "text/plain")
$headers.Add("Content-Type", "application/json-patch+json")
$body = "{`"username`":`"`",`"password`":`"@P`",`"clientId`":`"`",`"clientSecret`":`"d36f2d7a-280e-4427-5daf-481b51703142`",`"returnUrl`":`"https://google.com/`",`"eKycWebType`":4,`"mobile`":`"`",`"nationalCode`":`"`",`"birthDate`":`"56655665`"}"
$response = Invoke-RestMethod 'https://api-ekyc-sandbox.itsaaz.ir/api/v1/EKyc/AuthorizedWeb' -Method 'POST' -Headers $headers -Body $body
$response | ConvertTo-Json
import http.client
import json
conn = http.client.HTTPSConnection("api-ekyc-sandbox.itsaaz.ir")
payload = json.dumps({
"username": "",
"password": "@P",
"clientId": "",
"clientSecret": "d36f2d7a-280e-4427-5daf-481b51703142",
"returnUrl": "https://google.com/",
"eKycWebType": 4,
"mobile": "",
"nationalCode": "",
"birthDate": "56655665"
})
headers = {
'accept': 'text/plain',
'Content-Type': 'application/json-patch+json'
}
conn.request("POST", "/api/v1/EKyc/AuthorizedWeb", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
import json
url = "https://api-ekyc-sandbox.itsaaz.ir/api/v1/EKyc/AuthorizedWeb"
payload = json.dumps({
"username": "",
"password": "@P",
"clientId": "",
"clientSecret": "d36f2d7a-280e-4427-5daf-481b51703142",
"returnUrl": "https://google.com/",
"eKycWebType": 4,
"mobile": "",
"nationalCode": "",
"birthDate": "56655665"
})
headers = {
'accept': 'text/plain',
'Content-Type': 'application/json-patch+json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "json"
require "net/http"
url = URI("https://api-ekyc-sandbox.itsaaz.ir/api/v1/EKyc/AuthorizedWeb")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept"] = "text/plain"
request["Content-Type"] = "application/json-patch+json"
request.body = JSON.dump({
"username": "",
"password": "@P",
"clientId": "",
"clientSecret": "d36f2d7a-280e-4427-5daf-481b51703142",
"returnUrl": "https://google.com/",
"eKycWebType": 4,
"mobile": "",
"nationalCode": "",
"birthDate": "56655665"
})
response = https.request(request)
puts response.read_body
printf '{"username":"","password":"@P","clientId":"","clientSecret":"d36f2d7a-280e-4427-5daf-481b51703142","returnUrl":"https://google.com/","eKycWebType":4,"mobile":"","nationalCode":"","birthDate":"56655665"}'| http --follow --timeout 3600 POST 'https://api-ekyc-sandbox.itsaaz.ir/api/v1/EKyc/AuthorizedWeb' \
accept:'text/plain' \
Content-Type:'application/json-patch+json'
wget --no-check-certificate --quiet \
--method POST \
--timeout=0 \
--header 'accept: text/plain' \
--header 'Content-Type: application/json-patch+json' \
--body-data '{"username":"","password":"@P","clientId":"","clientSecret":"d36f2d7a-280e-4427-5daf-481b51703142","returnUrl":"https://google.com/","eKycWebType":4,"mobile":"","nationalCode":"","birthDate":"56655665"}' \
'https://api-ekyc-sandbox.itsaaz.ir/api/v1/EKyc/AuthorizedWeb'
import Foundation
#if canImport(FoundationNetworking)
import FoundationNetworking
#endif
var semaphore = DispatchSemaphore (value: 0)
let parameters = "{\"username\":\"\",\"password\":\"@P\",\"clientId\":\"\",\"clientSecret\":\"d36f2d7a-280e-4427-5daf-481b51703142\",\"returnUrl\":\"https://google.com/\",\"eKycWebType\":4,\"mobile\":\"\",\"nationalCode\":\"\",\"birthDate\":\"56655665\"}"
let postData = parameters.data(using: .utf8)
var request = URLRequest(url: URL(string: "https://api-ekyc-sandbox.itsaaz.ir/api/v1/EKyc/AuthorizedWeb")!,timeoutInterval: Double.infinity)
request.addValue("text/plain", forHTTPHeaderField: "accept")
request.addValue("application/json-patch+json", forHTTPHeaderField: "Content-Type")
request.httpMethod = "POST"
request.httpBody = postData
let task = URLSession.shared.dataTask(with: request) { data, response, error in
guard let data = data else {
print(String(describing: error))
semaphore.signal()
return
}
print(String(data: data, encoding: .utf8)!)
semaphore.signal()
}
task.resume()
semaphore.wait()
سرویس دریافت پروفایل کاربر:
برای فراخوانی این سرویس مراحل زیر را طی کنید:
۱-متد فراخوانی سرویس POST می باشد.
2-در این سرویس شما می توانید اطلاعات پروفایل کابر را توسط orderid دریافت نمایید.
https://api.itsaaz.ir/ekyc/personprofile
Post
ClientId: yekpay
Authorization: Basic YOUR-TOKEN
Content-Type: application/json
{
"orderId": "7857c653-9632-48d6-aa92-b74a7f281a1d"
}
{
"data": {
"orderId": "شماره درخواست",
"status": "وضعیت",
"firstName": "نام",
"lastName": "نام خانوادگی",
"birthDate": "تاریخ تولد",
"fatherName": "نام پدر",
"nationalCode": "کدملی",
"mobile": "شماره همراه",
"serialNationalCard": "شماره کارت ملی",
"nationalCardExpirationDate": "تاریخ انقضای کارت ملی",
"nationalCardFrontImage": "عکس روی کارت ملی",
"nationalCardBackImage": "عکس پشت کارت ملی",
"ncPersonPhoto": "عکس ثبت احوالی فرد",
"signature": "امضا",
"gender": "جنسیت",
"identityId": شماره شناسایی,
"isDead": در قید حیات نیست,
"certifFirstPageImage": "عکس صفحه اول شناسنامه",
"certifSecondPageImage": "عکس صفحه دوم شناسنامه",
"personSelfPhoto": " عکس شخص"
},
"meta": null,
"error": null
}
پارامترهای ورودی
ردیف | پارامتر ورودی | نوع ورودی | توضیحات |
---|---|---|---|
1 | orderId | String | شماره درخواست |
نمونه کد
var client = new RestClient("https://api.itsaaz.ir/ekyc/personprofile");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("ClientId", "yekpay");
request.AddHeader("Authorization", "Basic YOUR-TOKEN");
request.AddHeader("Content-Type", "application/json");
var body = @"{" + "\n" +
@" ""orderId"": ""7857c653-9632-48d6-aa92-b74a7f281a1d""" + "\n" +
@"}";
request.AddParameter("application/json", body, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request POST 'https://api.itsaaz.ir/ekyc/personprofile' \
--header 'ClientId: yekpay' \
--header 'Authorization: Basic YOUR-TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
"orderId": "7857c653-9632-48d6-aa92-b74a7f281a1d"
}'
var headers = {
'ClientId': 'yekpay',
'Authorization': 'Basic YOUR-TOKEN',
'Content-Type': 'application/json'
};
var request = http.Request('POST', Uri.parse('https://api.itsaaz.ir/ekyc/personprofile'));
request.body = json.encode({
"orderId": "7857c653-9632-48d6-aa92-b74a7f281a1d"
});
request.headers.addAll(headers);
http.StreamedResponse response = await request.send();
if (response.statusCode == 200) {
print(await response.stream.bytesToString());
}
else {
print(response.reasonPhrase);
}
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.itsaaz.ir/ekyc/personprofile"
method := "POST"
payload := strings.NewReader(`{
"orderId": "7857c653-9632-48d6-aa92-b74a7f281a1d"
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("ClientId", "yekpay")
req.Header.Add("Authorization", "Basic YOUR-TOKEN")
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
POST /ekyc/personprofile HTTP/1.1
Host: api.itsaaz.ir
ClientId: yekpay
Authorization: Basic YOUR-TOKEN
Content-Type: application/json
Content-Length: 57
{
"orderId": "7857c653-9632-48d6-aa92-b74a7f281a1d"
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"orderId\": \"7857c653-9632-48d6-aa92-b74a7f281a1d\"\n}");
Request request = new Request.Builder()
.url("https://api.itsaaz.ir/ekyc/personprofile")
.method("POST", body)
.addHeader("ClientId", "yekpay")
.addHeader("Authorization", "Basic YOUR-TOKEN")
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.post("https://api.itsaaz.ir/ekyc/personprofile")
.header("ClientId", "yekpay")
.header("Authorization", "Basic YOUR-TOKEN")
.header("Content-Type", "application/json")
.body("{\n \"orderId\": \"7857c653-9632-48d6-aa92-b74a7f281a1d\"\n}")
.asString();
var myHeaders = new Headers();
myHeaders.append("ClientId", "yekpay");
myHeaders.append("Authorization", "Basic YOUR-TOKEN");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"orderId": "7857c653-9632-48d6-aa92-b74a7f281a1d"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.itsaaz.ir/ekyc/personprofile", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
var settings = {
"url": "https://api.itsaaz.ir/ekyc/personprofile",
"method": "POST",
"timeout": 0,
"headers": {
"ClientId": "yekpay",
"Authorization": "Basic YOUR-TOKEN",
"Content-Type": "application/json"
},
"data": JSON.stringify({
"orderId": "7857c653-9632-48d6-aa92-b74a7f281a1d"
}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var data = JSON.stringify({
"orderId": "7857c653-9632-48d6-aa92-b74a7f281a1d"
});
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function() {
if(this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://api.itsaaz.ir/ekyc/personprofile");
xhr.setRequestHeader("ClientId", "yekpay");
xhr.setRequestHeader("Authorization", "Basic YOUR-TOKEN");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.send(data);
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_URL, "https://api.itsaaz.ir/ekyc/personprofile");
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "ClientId: yekpay");
headers = curl_slist_append(headers, "Authorization: Basic YOUR-TOKEN");
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
const char *data = "{\n \"orderId\": \"7857c653-9632-48d6-aa92-b74a7f281a1d\"\n}";
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data);
res = curl_easy_perform(curl);
}
curl_easy_cleanup(curl);
var axios = require('axios');
var data = JSON.stringify({
"orderId": "7857c653-9632-48d6-aa92-b74a7f281a1d"
});
var config = {
method: 'post',
url: 'https://api.itsaaz.ir/ekyc/personprofile',
headers: {
'ClientId': 'yekpay',
'Authorization': 'Basic YOUR-TOKEN',
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var https = require('follow-redirects').https;
var fs = require('fs');
var options = {
'method': 'POST',
'hostname': 'api.itsaaz.ir',
'path': '/ekyc/personprofile',
'headers': {
'ClientId': 'yekpay',
'Authorization': 'Basic YOUR-TOKEN',
'Content-Type': 'application/json'
},
'maxRedirects': 20
};
var req = https.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function (chunk) {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
res.on("error", function (error) {
console.error(error);
});
});
var postData = JSON.stringify({
"orderId": "7857c653-9632-48d6-aa92-b74a7f281a1d"
});
req.write(postData);
req.end();
var request = require('request');
var options = {
'method': 'POST',
'url': 'https://api.itsaaz.ir/ekyc/personprofile',
'headers': {
'ClientId': 'yekpay',
'Authorization': 'Basic YOUR-TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"orderId": "7857c653-9632-48d6-aa92-b74a7f281a1d"
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
var unirest = require('unirest');
var req = unirest('POST', 'https://api.itsaaz.ir/ekyc/personprofile')
.headers({
'ClientId': 'yekpay',
'Authorization': 'Basic YOUR-TOKEN',
'Content-Type': 'application/json'
})
.send(JSON.stringify({
"orderId": "7857c653-9632-48d6-aa92-b74a7f281a1d"
}))
.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.raw_body);
});
#import <Foundation/Foundation.h>
dispatch_semaphore_t sema = dispatch_semaphore_create(0);
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://api.itsaaz.ir/ekyc/personprofile"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
NSDictionary *headers = @{
@"ClientId": @"yekpay",
@"Authorization": @"Basic YOUR-TOKEN",
@"Content-Type": @"application/json"
};
[request setAllHTTPHeaderFields:headers];
NSData *postData = [[NSData alloc] initWithData:[@"{\n \"orderId\": \"7857c653-9632-48d6-aa92-b74a7f281a1d\"\n}" dataUsingEncoding:NSUTF8StringEncoding]];
[request setHTTPBody:postData];
[request setHTTPMethod:@"POST"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
dispatch_semaphore_signal(sema);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSError *parseError = nil;
NSDictionary *responseDictionary = [NSJSONSerialization JSONObjectWithData:data options:0 error:&parseError];
NSLog(@"%@",responseDictionary);
dispatch_semaphore_signal(sema);
}
}];
[dataTask resume];
dispatch_semaphore_wait(sema, DISPATCH_TIME_FOREVER);
open Lwt
open Cohttp
open Cohttp_lwt_unix
let postData = ref "{\n \"orderId\": \"7857c653-9632-48d6-aa92-b74a7f281a1d\"\n}";;
let reqBody =
let uri = Uri.of_string "https://api.itsaaz.ir/ekyc/personprofile" in
let headers = Header.init ()
|> fun h -> Header.add h "ClientId" "yekpay"
|> fun h -> Header.add h "Authorization" "Basic YOUR-TOKEN"
|> fun h -> Header.add h "Content-Type" "application/json"
in
let body = Cohttp_lwt.Body.of_string !postData in
Client.call ~headers ~body `POST uri >>= fun (_resp, body) ->
body |> Cohttp_lwt.Body.to_string >|= fun body -> body
let () =
let respBody = Lwt_main.run reqBody in
print_endline (respBody)
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.itsaaz.ir/ekyc/personprofile',
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 =>'{
"orderId": "7857c653-9632-48d6-aa92-b74a7f281a1d"
}',
CURLOPT_HTTPHEADER => array(
'ClientId: yekpay',
'Authorization: Basic YOUR-TOKEN',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://api.itsaaz.ir/ekyc/personprofile');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
'follow_redirects' => TRUE
));
$request->setHeader(array(
'ClientId' => 'yekpay',
'Authorization' => 'Basic YOUR-TOKEN',
'Content-Type' => 'application/json'
));
$request->setBody('{\n "orderId": "7857c653-9632-48d6-aa92-b74a7f281a1d"\n}');
try {
$response = $request->send();
if ($response->getStatus() == 200) {
echo $response->getBody();
}
else {
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
$response->getReasonPhrase();
}
}
catch(HTTP_Request2_Exception $e) {
echo 'Error: ' . $e->getMessage();
}
<?php
$client = new http\Client;
$request = new http\Client\Request;
$request->setRequestUrl('https://api.itsaaz.ir/ekyc/personprofile');
$request->setRequestMethod('POST');
$body = new http\Message\Body;
$body->append('{
"orderId": "7857c653-9632-48d6-aa92-b74a7f281a1d"
}');
$request->setBody($body);
$request->setOptions(array());
$request->setHeaders(array(
'ClientId' => 'yekpay',
'Authorization' => 'Basic YOUR-TOKEN',
'Content-Type' => 'application/json'
));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("ClientId", "yekpay")
$headers.Add("Authorization", "Basic YOUR-TOKEN")
$headers.Add("Content-Type", "application/json")
$body = "{`n `"orderId`": `"7857c653-9632-48d6-aa92-b74a7f281a1d`"`n}"
$response = Invoke-RestMethod 'https://api.itsaaz.ir/ekyc/personprofile' -Method 'POST' -Headers $headers -Body $body
$response | ConvertTo-Json
import http.client
import json
conn = http.client.HTTPSConnection("api.itsaaz.ir")
payload = json.dumps({
"orderId": "7857c653-9632-48d6-aa92-b74a7f281a1d"
})
headers = {
'ClientId': 'yekpay',
'Authorization': 'Basic YOUR-TOKEN',
'Content-Type': 'application/json'
}
conn.request("POST", "/ekyc/personprofile", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
import json
url = "https://api.itsaaz.ir/ekyc/personprofile"
payload = json.dumps({
"orderId": "7857c653-9632-48d6-aa92-b74a7f281a1d"
})
headers = {
'ClientId': 'yekpay',
'Authorization': 'Basic YOUR-TOKEN',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "json"
require "net/http"
url = URI("https://api.itsaaz.ir/ekyc/personprofile")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["ClientId"] = "yekpay"
request["Authorization"] = "Basic YOUR-TOKEN"
request["Content-Type"] = "application/json"
request.body = JSON.dump({
"orderId": "7857c653-9632-48d6-aa92-b74a7f281a1d"
})
response = https.request(request)
puts response.read_body
printf '{
"orderId": "7857c653-9632-48d6-aa92-b74a7f281a1d"
}'| http --follow --timeout 3600 POST 'https://api.itsaaz.ir/ekyc/personprofile' \
ClientId:'yekpay' \
Authorization:'Basic YOUR-TOKEN' \
Content-Type:'application/json'
wget --no-check-certificate --quiet \
--method POST \
--timeout=0 \
--header 'ClientId: yekpay' \
--header 'Authorization: Basic YOUR-TOKEN' \
--header 'Content-Type: application/json' \
--body-data '{
"orderId": "7857c653-9632-48d6-aa92-b74a7f281a1d"
}' \
'https://api.itsaaz.ir/ekyc/personprofile'
import Foundation
#if canImport(FoundationNetworking)
import FoundationNetworking
#endif
var semaphore = DispatchSemaphore (value: 0)
let parameters = "{\n \"orderId\": \"7857c653-9632-48d6-aa92-b74a7f281a1d\"\n}"
let postData = parameters.data(using: .utf8)
var request = URLRequest(url: URL(string: "https://api.itsaaz.ir/ekyc/personprofile")!,timeoutInterval: Double.infinity)
request.addValue("yekpay", forHTTPHeaderField: "ClientId")
request.addValue("Basic YOUR-TOKEN", forHTTPHeaderField: "Authorization")
request.addValue("application/json", forHTTPHeaderField: "Content-Type")
request.httpMethod = "POST"
request.httpBody = postData
let task = URLSession.shared.dataTask(with: request) { data, response, error in
guard let data = data else {
print(String(describing: error))
semaphore.signal()
return
}
print(String(data: data, encoding: .utf8)!)
semaphore.signal()
}
task.resume()
semaphore.wait()
سرویس دریافت وضعیت احراز کاربر:
برای فراخوانی این سرویس مراحل زیر را طی کنید:
۱-متد فراخوانی سرویس POST می باشد.
https://api.itsaaz.ir/ekyc/personStatus
Post
ClientId: yekpay
Authorization: Basic YOUR-TOKEN
Content-Type: application/json
{
"orderId": "7857c653-9632-48d6-aa92-b74a7f281a1d"
}
{
"data": {
"hasFinished": false,
"status": "آغاز احراز"
},
"meta": null,
"error": null
}
لیست وضعیت های احراز:
پارامترهای ورودی
ردیف | پارامتر ورودی | نوع ورودی | توضیحات |
---|---|---|---|
1 | orderId | String | شماره درخواست |
نمونه کد
var client = new RestClient("https://api.itsaaz.ir/ekyc/personStatus");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("ClientId", "yekpay");
request.AddHeader("Authorization", "Basic YOUR-TOKEN");
request.AddHeader("Content-Type", "application/json");
var body = @"{" + "\n" +
@" ""orderId"": ""7857c653-9632-48d6-aa92-b74a7f281a1d""" + "\n" +
@"}";
request.AddParameter("application/json", body, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location --request POST 'https://api.itsaaz.ir/ekyc/personStatus' \
--header 'ClientId: yekpay' \
--header 'Authorization: Basic YOUR-TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
"orderId": "7857c653-9632-48d6-aa92-b74a7f281a1d"
}'
var headers = {
'ClientId': 'yekpay',
'Authorization': 'Basic YOUR-TOKEN',
'Content-Type': 'application/json'
};
var request = http.Request('POST', Uri.parse('https://api.itsaaz.ir/ekyc/personStatus'));
request.body = json.encode({
"orderId": "7857c653-9632-48d6-aa92-b74a7f281a1d"
});
request.headers.addAll(headers);
http.StreamedResponse response = await request.send();
if (response.statusCode == 200) {
print(await response.stream.bytesToString());
}
else {
print(response.reasonPhrase);
}
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.itsaaz.ir/ekyc/personStatus"
method := "POST"
payload := strings.NewReader(`{
"orderId": "7857c653-9632-48d6-aa92-b74a7f281a1d"
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("ClientId", "yekpay")
req.Header.Add("Authorization", "Basic YOUR-TOKEN")
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
POST /ekyc/personStatus HTTP/1.1
Host: api.itsaaz.ir
ClientId: yekpay
Authorization: Basic YOUR-TOKEN
Content-Type: application/json
Content-Length: 57
{
"orderId": "7857c653-9632-48d6-aa92-b74a7f281a1d"
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"orderId\": \"7857c653-9632-48d6-aa92-b74a7f281a1d\"\n}");
Request request = new Request.Builder()
.url("https://api.itsaaz.ir/ekyc/personStatus")
.method("POST", body)
.addHeader("ClientId", "yekpay")
.addHeader("Authorization", "Basic YOUR-TOKEN")
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.post("https://api.itsaaz.ir/ekyc/personStatus")
.header("ClientId", "yekpay")
.header("Authorization", "Basic YOUR-TOKEN")
.header("Content-Type", "application/json")
.body("{\n \"orderId\": \"7857c653-9632-48d6-aa92-b74a7f281a1d\"\n}")
.asString();
var myHeaders = new Headers();
myHeaders.append("ClientId", "yekpay");
myHeaders.append("Authorization", "Basic YOUR-TOKEN");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"orderId": "7857c653-9632-48d6-aa92-b74a7f281a1d"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.itsaaz.ir/ekyc/personStatus", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
var settings = {
"url": "https://api.itsaaz.ir/ekyc/personStatus",
"method": "POST",
"timeout": 0,
"headers": {
"ClientId": "yekpay",
"Authorization": "Basic YOUR-TOKEN",
"Content-Type": "application/json"
},
"data": JSON.stringify({
"orderId": "7857c653-9632-48d6-aa92-b74a7f281a1d"
}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var data = JSON.stringify({
"orderId": "7857c653-9632-48d6-aa92-b74a7f281a1d"
});
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function() {
if(this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://api.itsaaz.ir/ekyc/personStatus");
xhr.setRequestHeader("ClientId", "yekpay");
xhr.setRequestHeader("Authorization", "Basic YOUR-TOKEN");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.send(data);
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_URL, "https://api.itsaaz.ir/ekyc/personStatus");
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "ClientId: yekpay");
headers = curl_slist_append(headers, "Authorization: Basic YOUR-TOKEN");
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
const char *data = "{\n \"orderId\": \"7857c653-9632-48d6-aa92-b74a7f281a1d\"\n}";
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data);
res = curl_easy_perform(curl);
}
curl_easy_cleanup(curl);
var axios = require('axios');
var data = JSON.stringify({
"orderId": "7857c653-9632-48d6-aa92-b74a7f281a1d"
});
var config = {
method: 'post',
url: 'https://api.itsaaz.ir/ekyc/personStatus',
headers: {
'ClientId': 'yekpay',
'Authorization': 'Basic YOUR-TOKEN',
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var https = require('follow-redirects').https;
var fs = require('fs');
var options = {
'method': 'POST',
'hostname': 'api.itsaaz.ir',
'path': '/ekyc/personStatus',
'headers': {
'ClientId': 'yekpay',
'Authorization': 'Basic YOUR-TOKEN',
'Content-Type': 'application/json'
},
'maxRedirects': 20
};
var req = https.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function (chunk) {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
res.on("error", function (error) {
console.error(error);
});
});
var postData = JSON.stringify({
"orderId": "7857c653-9632-48d6-aa92-b74a7f281a1d"
});
req.write(postData);
req.end();
var request = require('request');
var options = {
'method': 'POST',
'url': 'https://api.itsaaz.ir/ekyc/personStatus',
'headers': {
'ClientId': 'yekpay',
'Authorization': 'Basic YOUR-TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"orderId": "7857c653-9632-48d6-aa92-b74a7f281a1d"
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
var unirest = require('unirest');
var req = unirest('POST', 'https://api.itsaaz.ir/ekyc/personStatus')
.headers({
'ClientId': 'yekpay',
'Authorization': 'Basic YOUR-TOKEN',
'Content-Type': 'application/json'
})
.send(JSON.stringify({
"orderId": "7857c653-9632-48d6-aa92-b74a7f281a1d"
}))
.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.raw_body);
});
#import <Foundation/Foundation.h>
dispatch_semaphore_t sema = dispatch_semaphore_create(0);
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://api.itsaaz.ir/ekyc/personStatus"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
NSDictionary *headers = @{
@"ClientId": @"yekpay",
@"Authorization": @"Basic YOUR-TOKEN",
@"Content-Type": @"application/json"
};
[request setAllHTTPHeaderFields:headers];
NSData *postData = [[NSData alloc] initWithData:[@"{\n \"orderId\": \"7857c653-9632-48d6-aa92-b74a7f281a1d\"\n}" dataUsingEncoding:NSUTF8StringEncoding]];
[request setHTTPBody:postData];
[request setHTTPMethod:@"POST"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
dispatch_semaphore_signal(sema);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSError *parseError = nil;
NSDictionary *responseDictionary = [NSJSONSerialization JSONObjectWithData:data options:0 error:&parseError];
NSLog(@"%@",responseDictionary);
dispatch_semaphore_signal(sema);
}
}];
[dataTask resume];
dispatch_semaphore_wait(sema, DISPATCH_TIME_FOREVER);
open Lwt
open Cohttp
open Cohttp_lwt_unix
let postData = ref "{\n \"orderId\": \"7857c653-9632-48d6-aa92-b74a7f281a1d\"\n}";;
let reqBody =
let uri = Uri.of_string "https://api.itsaaz.ir/ekyc/personStatus" in
let headers = Header.init ()
|> fun h -> Header.add h "ClientId" "yekpay"
|> fun h -> Header.add h "Authorization" "Basic YOUR-TOKEN"
|> fun h -> Header.add h "Content-Type" "application/json"
in
let body = Cohttp_lwt.Body.of_string !postData in
Client.call ~headers ~body `POST uri >>= fun (_resp, body) ->
body |> Cohttp_lwt.Body.to_string >|= fun body -> body
let () =
let respBody = Lwt_main.run reqBody in
print_endline (respBody)
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.itsaaz.ir/ekyc/personStatus',
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 =>'{
"orderId": "7857c653-9632-48d6-aa92-b74a7f281a1d"
}',
CURLOPT_HTTPHEADER => array(
'ClientId: yekpay',
'Authorization: Basic YOUR-TOKEN',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://api.itsaaz.ir/ekyc/personStatus');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
'follow_redirects' => TRUE
));
$request->setHeader(array(
'ClientId' => 'yekpay',
'Authorization' => 'Basic YOUR-TOKEN',
'Content-Type' => 'application/json'
));
$request->setBody('{\n "orderId": "7857c653-9632-48d6-aa92-b74a7f281a1d"\n}');
try {
$response = $request->send();
if ($response->getStatus() == 200) {
echo $response->getBody();
}
else {
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
$response->getReasonPhrase();
}
}
catch(HTTP_Request2_Exception $e) {
echo 'Error: ' . $e->getMessage();
}
<?php
$client = new http\Client;
$request = new http\Client\Request;
$request->setRequestUrl('https://api.itsaaz.ir/ekyc/personStatus');
$request->setRequestMethod('POST');
$body = new http\Message\Body;
$body->append('{
"orderId": "7857c653-9632-48d6-aa92-b74a7f281a1d"
}');
$request->setBody($body);
$request->setOptions(array());
$request->setHeaders(array(
'ClientId' => 'yekpay',
'Authorization' => 'Basic YOUR-TOKEN',
'Content-Type' => 'application/json'
));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("ClientId", "yekpay")
$headers.Add("Authorization", "Basic YOUR-TOKEN")
$headers.Add("Content-Type", "application/json")
$body = "{`n `"orderId`": `"7857c653-9632-48d6-aa92-b74a7f281a1d`"`n}"
$response = Invoke-RestMethod 'https://api.itsaaz.ir/ekyc/personStatus' -Method 'POST' -Headers $headers -Body $body
$response | ConvertTo-Json
import http.client
import json
conn = http.client.HTTPSConnection("api.itsaaz.ir")
payload = json.dumps({
"orderId": "7857c653-9632-48d6-aa92-b74a7f281a1d"
})
headers = {
'ClientId': 'yekpay',
'Authorization': 'Basic YOUR-TOKEN',
'Content-Type': 'application/json'
}
conn.request("POST", "/ekyc/personStatus", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
import json
url = "https://api.itsaaz.ir/ekyc/personStatus"
payload = json.dumps({
"orderId": "7857c653-9632-48d6-aa92-b74a7f281a1d"
})
headers = {
'ClientId': 'yekpay',
'Authorization': 'Basic YOUR-TOKEN',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "json"
require "net/http"
url = URI("https://api.itsaaz.ir/ekyc/personStatus")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["ClientId"] = "yekpay"
request["Authorization"] = "Basic YOUR-TOKEN"
request["Content-Type"] = "application/json"
request.body = JSON.dump({
"orderId": "7857c653-9632-48d6-aa92-b74a7f281a1d"
})
response = https.request(request)
puts response.read_body
printf '{
"orderId": "7857c653-9632-48d6-aa92-b74a7f281a1d"
}'| http --follow --timeout 3600 POST 'https://api.itsaaz.ir/ekyc/personStatus' \
ClientId:'yekpay' \
Authorization:'Basic YOUR-TOKEN' \
Content-Type:'application/json'
wget --no-check-certificate --quiet \
--method POST \
--timeout=0 \
--header 'ClientId: yekpay' \
--header 'Authorization: Basic YOUR-TOKEN' \
--header 'Content-Type: application/json' \
--body-data '{
"orderId": "7857c653-9632-48d6-aa92-b74a7f281a1d"
}' \
'https://api.itsaaz.ir/ekyc/personStatus'
import Foundation
#if canImport(FoundationNetworking)
import FoundationNetworking
#endif
var semaphore = DispatchSemaphore (value: 0)
let parameters = "{\n \"orderId\": \"7857c653-9632-48d6-aa92-b74a7f281a1d\"\n}"
let postData = parameters.data(using: .utf8)
var request = URLRequest(url: URL(string: "https://api.itsaaz.ir/ekyc/personStatus")!,timeoutInterval: Double.infinity)
request.addValue("yekpay", forHTTPHeaderField: "ClientId")
request.addValue("Basic YOUR-TOKEN", forHTTPHeaderField: "Authorization")
request.addValue("application/json", forHTTPHeaderField: "Content-Type")
request.httpMethod = "POST"
request.httpBody = postData
let task = URLSession.shared.dataTask(with: request) { data, response, error in
guard let data = data else {
print(String(describing: error))
semaphore.signal()
return
}
print(String(data: data, encoding: .utf8)!)
semaphore.signal()
}
task.resume()
semaphore.wait()