درگاه احراز هویت آنلاین

مشاهده سرویس ها

سرویس های هوش مصنوعی

مشاهده سرویس ها

سرویس های استعلامی

مشاهده سرویس ها

سرویس های احراز هویت

مشاهده سرویس ها

صدور امضا دیجیتال

مشاهده سرویس ها

استعلام اطلاعات شرکت

مشاهده سرویس ها

سرویس نئوبانک

مشاهده سرویس ها

سجام آنلاین

بزودی

شارژ و بسته اینترنتی

بزودی

کارگر و کارفرما

بزودی

قوه قضائیه هوشمند

بزودی

سرویس دریافت توکن



برای فراخوانی این سرویس مراحل زیر را طی کنید:
۱-متد فراخوانی سرویس POST می باشد.


  https://api.itsaaz.ir/identity/token
        

  Post
        

  Content-Type: application/x-www-form-urlencoded
        

  grant_type= "password" 
  client_id= "ekyc"
  Client_secret= "f63026a9-912d-8978-ac80-4ae5d63db1ac" 
  username= "test"
  password= "t_86574213@T"
        

  {
    "access_token": "توکن",
    "expires_in": مدت استفاده,
    "token_type": "نوع توکن",
    "refresh_token": "رفرش توکن",
    "scope": "محدوده"
  }       
        

پارامترهای ورودی

ردیف پارامتر ورودی نوع ورودی توضیحات
1 Grant_type String
2 Client_id String
3 Client_secret String
4 username String
4 password String

نمونه کد


  var client = new RestClient("https://api.itsaaz.ir/identity/token");
  client.Timeout = -1;
  var request = new RestRequest(Method.POST);
  request.AddHeader("Content-Type", "application/x-www-form-urlencoded");
  request.AddParameter("grant_type", "password");
  request.AddParameter("client_id", "test");
  request.AddParameter("Client_secret", "66c0af3a-ff89-8390-3b07-cf88a25e5f3f");
  request.AddParameter("username", "test");
  request.AddParameter("password", "t_86574213@H");
  IRestResponse response = client.Execute(request);
  Console.WriteLine(response.Content);
        

  curl --location --request POST 'https://api.itsaaz.ir/identity/token' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data-urlencode 'grant_type=password' \
  --data-urlencode 'client_id=test' \
  --data-urlencode 'Client_secret=66c0af3a-ff89-8390-3b07-cf88a25e5f3f' \
  --data-urlencode 'username=test' \
  --data-urlencode 'password=t_86574213@H'
        

  var headers = {
    'Content-Type': 'application/x-www-form-urlencoded'
  };
  var request = http.Request('POST', Uri.parse('https://api.itsaaz.ir/identity/token'));
  request.bodyFields = {
    'grant_type': 'password',
    'client_id': 'test',
    'Client_secret': '66c0af3a-ff89-8390-3b07-cf88a25e5f3f',
    'username': 'test',
    'password': 't_86574213@H'
  };
  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/identity/token"
    method := "POST"
  
    payload := strings.NewReader("grant_type=password&client_id=test&Client_secret=66c0af3a-ff89-8390-3b07-cf88a25e5f3f&username=test&password=t_86574213%40H")
  
    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, payload)
  
    if err != nil {
      fmt.Println(err)
      return
    }
    req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
  
    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 /identity/token HTTP/1.1
  Host: api.itsaaz.ir
  Content-Type: application/x-www-form-urlencoded
  Content-Length: 123
  
  grant_type=password&client_id=test&Client_secret=66c0af3a-ff89-8390-3b07-cf88a25e5f3f&username=test&password=t_86574213%40H
        

    OkHttpClient client = new OkHttpClient().newBuilder()
    .build();
  MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
  RequestBody body = RequestBody.create(mediaType, "grant_type=password&client_id=test&Client_secret=66c0af3a-ff89-8390-3b07-cf88a25e5f3f&username=test&password=t_86574213@H");
  Request request = new Request.Builder()
    .url("https://api.itsaaz.ir/identity/token")
    .method("POST", body)
    .addHeader("Content-Type", "application/x-www-form-urlencoded")
    .build();
  Response response = client.newCall(request).execute();

            

  Unirest.setTimeouts(0, 0);
  HttpResponse<String> response = Unirest.post("https://api.itsaaz.ir/identity/token")
    .header("Content-Type", "application/x-www-form-urlencoded")
    .field("grant_type", "password")
    .field("client_id", "test")
    .field("Client_secret", "66c0af3a-ff89-8390-3b07-cf88a25e5f3f")
    .field("username", "test")
    .field("password", "t_86574213@H")
    .asString();
  
  
            

  var myHeaders = new Headers();
  myHeaders.append("Content-Type", "application/x-www-form-urlencoded");
  
  var urlencoded = new URLSearchParams();
  urlencoded.append("grant_type", "password");
  urlencoded.append("client_id", "test");
  urlencoded.append("Client_secret", "66c0af3a-ff89-8390-3b07-cf88a25e5f3f");
  urlencoded.append("username", "test");
  urlencoded.append("password", "t_86574213@H");
  
  var requestOptions = {
    method: 'POST',
    headers: myHeaders,
    body: urlencoded,
    redirect: 'follow'
  };
  
  fetch("https://api.itsaaz.ir/identity/token", requestOptions)
    .then(response => response.text())
    .then(result => console.log(result))
    .catch(error => console.log('error', error));
            

  var settings = {
    "url": "https://api.itsaaz.ir/identity/token",
    "method": "POST",
    "timeout": 0,
    "headers": {
      "Content-Type": "application/x-www-form-urlencoded"
    },
    "data": {
      "grant_type": "password",
      "client_id": "test",
      "Client_secret": "66c0af3a-ff89-8390-3b07-cf88a25e5f3f",
      "username": "test",
      "password": "t_86574213@H"
    }
  };

  $.ajax(settings).done(function (response) {
    console.log(response);
  });
            

  var data = "grant_type=password&client_id=test&Client_secret=66c0af3a-ff89-8390-3b07-cf88a25e5f3f&username=test&password=t_86574213%40H";

  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/identity/token");
  xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
  
  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/identity/token");
    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, "Content-Type: application/x-www-form-urlencoded");
    curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
    const char *data = "grant_type=password&client_id=test&Client_secret=66c0af3a-ff89-8390-3b07-cf88a25e5f3f&username=test&password=t_86574213%40H";
    curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data);
    res = curl_easy_perform(curl);
  }
  curl_easy_cleanup(curl);
  

        

  var axios = require('axios');
  var qs = require('qs');
  var data = qs.stringify({
    'grant_type': 'password',
    'client_id': 'test',
    'Client_secret': '66c0af3a-ff89-8390-3b07-cf88a25e5f3f',
    'username': 'test',
    'password': 't_86574213@H' 
  });
  var config = {
    method: 'post',
    url: 'https://api.itsaaz.ir/identity/token',
    headers: { 
      'Content-Type': 'application/x-www-form-urlencoded'
    },
    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 qs = require('querystring');
  
  var options = {
    'method': 'POST',
    'hostname': 'api.itsaaz.ir',
    'path': '/identity/token',
    'headers': {
      'Content-Type': 'application/x-www-form-urlencoded'
    },
    '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 = qs.stringify({
    'grant_type': 'password',
    'client_id': 'test',
    'Client_secret': '66c0af3a-ff89-8390-3b07-cf88a25e5f3f',
    'username': 'test',
    'password': 't_86574213@H'
  });
  
  req.write(postData);
  
  req.end();
            

  var request = require('request');
  var options = {
    'method': 'POST',
    'url': 'https://api.itsaaz.ir/identity/token',
    'headers': {
      'Content-Type': 'application/x-www-form-urlencoded'
    },
    form: {
      'grant_type': 'password',
      'client_id': 'test',
      'Client_secret': '66c0af3a-ff89-8390-3b07-cf88a25e5f3f',
      'username': 'test',
      'password': 't_86574213@H'
    }
  };
  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/identity/token')
    .headers({
      'Content-Type': 'application/x-www-form-urlencoded'
    })
    .send('grant_type=password')
    .send('client_id=test')
    .send('Client_secret=66c0af3a-ff89-8390-3b07-cf88a25e5f3f')
    .send('username=test')
    .send('password=t_86574213@H')
    .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/identity/token"]
    cachePolicy:NSURLRequestUseProtocolCachePolicy
    timeoutInterval:10.0];
  NSDictionary *headers = @{
    @"Content-Type": @"application/x-www-form-urlencoded"
  };
  
  [request setAllHTTPHeaderFields:headers];
  NSMutableData *postData = [[NSMutableData alloc] initWithData:[@"grant_type=password" dataUsingEncoding:NSUTF8StringEncoding]];
  [postData appendData:[@"&client_id=test" dataUsingEncoding:NSUTF8StringEncoding]];
  [postData appendData:[@"&Client_secret=66c0af3a-ff89-8390-3b07-cf88a25e5f3f" dataUsingEncoding:NSUTF8StringEncoding]];
  [postData appendData:[@"&username=test" dataUsingEncoding:NSUTF8StringEncoding]];
  [postData appendData:[@"&password=t_86574213@H" 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 "grant_type=password&client_id=test&Client_secret=66c0af3a-ff89-8390-3b07-cf88a25e5f3f&username=test&password=t_86574213%40H";;
  
  let reqBody = 
    let uri = Uri.of_string "https://api.itsaaz.ir/identity/token" in
    let headers = Header.init ()
      |> fun h -> Header.add h "Content-Type" "application/x-www-form-urlencoded"
    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/identity/token',
    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 => 'grant_type=password&client_id=test&Client_secret=66c0af3a-ff89-8390-3b07-cf88a25e5f3f&username=test&password=t_86574213%40H',
    CURLOPT_HTTPHEADER => array(
      'Content-Type: application/x-www-form-urlencoded'
    ),
  ));
  
  $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/identity/token');
  $request->setMethod(HTTP_Request2::METHOD_POST);
  $request->setConfig(array(
    'follow_redirects' => TRUE
  ));
  $request->setHeader(array(
    'Content-Type' => 'application/x-www-form-urlencoded'
  ));
  $request->addPostParameter(array(
    'grant_type' => 'password',
    'client_id' => 'test',
    'Client_secret' => '66c0af3a-ff89-8390-3b07-cf88a25e5f3f',
    'username' => 'test',
    'password' => 't_86574213@H'
  ));
  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/identity/token');
  $request->setRequestMethod('POST');
  $body = new http\Message\Body;
  $body->append(new http\QueryString(array(
    'grant_type' => 'password',
    'client_id' => 'test',
    'Client_secret' => '66c0af3a-ff89-8390-3b07-cf88a25e5f3f',
    'username' => 'test',
    'password' => 't_86574213@H')));$request->setBody($body);
  $request->setOptions(array());
  $request->setHeaders(array(
    'Content-Type' => 'application/x-www-form-urlencoded'
  ));
  $client->enqueue($request)->send();
  $response = $client->getResponse();
  echo $response->getBody();
  
            

  $headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
  $headers.Add("Content-Type", "application/x-www-form-urlencoded")

  $body = "grant_type=password&client_id=test&Client_secret=66c0af3a-ff89-8390-3b07-cf88a25e5f3f&username=test&password=t_86574213%40H"

  $response = Invoke-RestMethod 'https://api.itsaaz.ir/identity/token' -Method 'POST' -Headers $headers -Body $body
  $response | ConvertTo-Json
        

  import http.client

  conn = http.client.HTTPSConnection("api.itsaaz.ir")
  payload = 'grant_type=password&client_id=test&Client_secret=66c0af3a-ff89-8390-3b07-cf88a25e5f3f&username=test&password=t_86574213%40H'
  headers = {
    'Content-Type': 'application/x-www-form-urlencoded'
  }
  conn.request("POST", "/identity/token", payload, headers)
  res = conn.getresponse()
  data = res.read()
  print(data.decode("utf-8"))
            

  import requests

  url = "https://api.itsaaz.ir/identity/token"

  payload='grant_type=password&client_id=test&Client_secret=66c0af3a-ff89-8390-3b07-cf88a25e5f3f&username=test&password=t_86574213%40H'
  headers = {
    'Content-Type': 'application/x-www-form-urlencoded'
  }

  response = requests.request("POST", url, headers=headers, data=payload)

  print(response.text)

            

  require "uri"
  require "net/http"

  url = URI("https://api.itsaaz.ir/identity/token")

  https = Net::HTTP.new(url.host, url.port)
  https.use_ssl = true

  request = Net::HTTP::Post.new(url)
  request["Content-Type"] = "application/x-www-form-urlencoded"
  request.body = "grant_type=password&client_id=test&Client_secret=66c0af3a-ff89-8390-3b07-cf88a25e5f3f&username=test&password=t_86574213%40H"

  response = https.request(request)
  puts response.read_body
      
        

  http --ignore-stdin --form --follow --timeout 3600 POST 'https://api.itsaaz.ir/identity/token' \
  'grant_type'='password' \
  'client_id'='test' \
  'Client_secret'='66c0af3a-ff89-8390-3b07-cf88a25e5f3f' \
  'username'='test' \
  'password'='t_86574213@H' \
  Content-Type:'application/x-www-form-urlencoded'
            

  wget --no-check-certificate --quiet \
    --method POST \
    --timeout=0 \
    --header 'Content-Type: application/x-www-form-urlencoded' \
    --body-data 'grant_type=password&client_id=test&Client_secret=66c0af3a-ff89-8390-3b07-cf88a25e5f3f&username=test&password=t_86574213%40H' \
    'https://api.itsaaz.ir/identity/token'
            

  import Foundation
  #if canImport(FoundationNetworking)
  import FoundationNetworking
  #endif

  var semaphore = DispatchSemaphore (value: 0)

  let parameters = "grant_type=password&client_id=test&Client_secret=66c0af3a-ff89-8390-3b07-cf88a25e5f3f&username=test&password=t_86574213%40H"
  let postData =  parameters.data(using: .utf8)

  var request = URLRequest(url: URL(string: "https://api.itsaaz.ir/identity/token")!,timeoutInterval: Double.infinity)
  request.addValue("application/x-www-form-urlencoded", 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- پس از فراخوانی سرویس، اطلاعات کاربر مطابق آنچه در جدول پارامتر های خروجی نمایش داده شده است، ارسال می شود.


  https://api.itsaaz.ir/ai/shahkar/verifyMobile
        

  Post
        

  accept: application/json
  Authorization: Bearer YOUR-TOKEN
  Content-Type: application/json-patch+json
        

  {
    "mobile":"",
    "nationalCode":""
  }
        

  {
    "data": true,
    "meta": null,
    "error": null
  }
        

پارامترهای ورودی

ردیف پارامتر ورودی نوع ورودی توضیحات
1 NationalCode String کدملی فرد
2 mobile String شماره موبایل فرد

نمونه کد


  var client = new RestClient("https://api.itsaaz.ir/ai/shahkar/verifyMobile");
  client.Timeout = -1;
  var request = new RestRequest(Method.POST);
  request.AddHeader("accept", "application/json");
  request.AddHeader("Authorization", "Bearer YOUR-TOKEN");
  request.AddHeader("Content-Type", "application/json-patch+json");
  var body = @"{""mobile"":""09124260197"",""nationalCode"":""1229603905"",""clientId"":""string""}";
  request.AddParameter("application/json-patch+json", body,  ParameterType.RequestBody);
  IRestResponse response = client.Execute(request);
  Console.WriteLine(response.Content);
        

  curl --location --request POST 'https://api.itsaaz.ir/ai/shahkar/verifyMobile' \
  --header 'accept: application/json' \
  --header 'Authorization: Bearer YOUR-TOKEN' \
  --header 'Content-Type: application/json-patch+json' \
  --data-raw '{"mobile":"09124260197","nationalCode":"1229603905","clientId":"string"}'
        

  var headers = {
    'Content-Type': 'application/x-www-form-urlencoded'
  };
  var headers = {
    'accept': 'application/json',
    'Authorization': 'Bearer YOUR-TOKEN',
    'Content-Type': 'application/json-patch+json'
  };
  var request = http.Request('POST', Uri.parse('https://api.itsaaz.ir/ai/shahkar/verifyMobile'));
  request.body = json.encode({
    "mobile": "09124260197",
    "nationalCode": "1229603905",
    "clientId": "string"
  });
  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/ai/shahkar/verifyMobile"
    method := "POST"
  
    payload := strings.NewReader(`{"mobile":"09124260197","nationalCode":"1229603905","clientId":"string"}`)
  
    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, payload)
  
    if err != nil {
      fmt.Println(err)
      return
    }
    req.Header.Add("accept", "application/json")
    req.Header.Add("Authorization", "Bearer YOUR-TOKEN")
    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 /ai/shahkar/verifyMobile HTTP/1.1
  Host: api.itsaaz.ir
  accept: application/json
  Authorization: Bearer YOUR-TOKEN
  Content-Type: application/json-patch+json
  Content-Length: 72
  
  {"mobile":"09124260197","nationalCode":"1229603905","clientId":"string"}
        

    OkHttpClient client = new OkHttpClient().newBuilder()
    .build();
  MediaType mediaType = MediaType.parse("application/json-patch+json");
  RequestBody body = RequestBody.create(mediaType, "{\"mobile\":\"09124260197\",\"nationalCode\":\"1229603905\",\"clientId\":\"string\"}");
  Request request = new Request.Builder()
    .url("https://api.itsaaz.ir/ai/shahkar/verifyMobile")
    .method("POST", body)
    .addHeader("accept", "application/json")
    .addHeader("Authorization", "Bearer YOUR-TOKEN")
    .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.itsaaz.ir/ai/shahkar/verifyMobile")
    .header("accept", "application/json")
    .header("Authorization", "Bearer YOUR-TOKEN")
    .header("Content-Type", "application/json-patch+json")
    .body("{\"mobile\":\"09124260197\",\"nationalCode\":\"1229603905\",\"clientId\":\"string\"}")
    .asString();
  
  
            

  var myHeaders = new Headers();
  myHeaders.append("accept", "application/json");
  myHeaders.append("Authorization", "Bearer YOUR-TOKEN");
  myHeaders.append("Content-Type", "application/json-patch+json");
  
  var raw = JSON.stringify({
    "mobile": "09124260197",
    "nationalCode": "1229603905",
    "clientId": "string"
  });
  
  var requestOptions = {
    method: 'POST',
    headers: myHeaders,
    body: raw,
    redirect: 'follow'
  };
  
  fetch("https://api.itsaaz.ir/ai/shahkar/verifyMobile", requestOptions)
    .then(response => response.text())
    .then(result => console.log(result))
    .catch(error => console.log('error', error));
            

  var settings = {
    "url": "https://api.itsaaz.ir/ai/shahkar/verifyMobile",
    "method": "POST",
    "timeout": 0,
    "headers": {
      "accept": "application/json",
      "Authorization": "Bearer YOUR-TOKEN",
      "Content-Type": "application/json-patch+json"
    },
    "data": JSON.stringify({
      "mobile": "09124260197",
      "nationalCode": "1229603905",
      "clientId": "string"
    }),
  };
  
  $.ajax(settings).done(function (response) {
    console.log(response);
  });
            

  var data = JSON.stringify({
    "mobile": "09124260197",
    "nationalCode": "1229603905",
    "clientId": "string"
  });
  
  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/ai/shahkar/verifyMobile");
  xhr.setRequestHeader("accept", "application/json");
  xhr.setRequestHeader("Authorization", "Bearer YOUR-TOKEN");
  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.itsaaz.ir/ai/shahkar/verifyMobile");
    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: application/json");
    headers = curl_slist_append(headers, "Authorization: Bearer YOUR-TOKEN");
    headers = curl_slist_append(headers, "Content-Type: application/json-patch+json");
    curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
    const char *data = "{\"mobile\":\"09124260197\",\"nationalCode\":\"1229603905\",\"clientId\":\"string\"}";
    curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data);
    res = curl_easy_perform(curl);
  }
  curl_easy_cleanup(curl);
  
        

  var axios = require('axios');
  var data = JSON.stringify({
    "mobile": "09124260197",
    "nationalCode": "1229603905",
    "clientId": "string"
  });
  
  var config = {
    method: 'post',
    url: 'https://api.itsaaz.ir/ai/shahkar/verifyMobile',
    headers: { 
      'accept': 'application/json', 
      'Authorization': 'Bearer YOUR-TOKEN', 
      '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.itsaaz.ir',
    'path': '/ai/shahkar/verifyMobile',
    'headers': {
      'accept': 'application/json',
      'Authorization': 'Bearer YOUR-TOKEN',
      '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({
    "mobile": "09124260197",
    "nationalCode": "1229603905",
    "clientId": "string"
  });
  
  req.write(postData);
  
  req.end();
            

  var request = require('request');
  var options = {
    'method': 'POST',
    'url': 'https://api.itsaaz.ir/ai/shahkar/verifyMobile',
    'headers': {
      'accept': 'application/json',
      'Authorization': 'Bearer YOUR-TOKEN',
      'Content-Type': 'application/json-patch+json'
    },
    body: JSON.stringify({
      "mobile": "09124260197",
      "nationalCode": "1229603905",
      "clientId": "string"
    })
  
  };
  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/ai/shahkar/verifyMobile')
    .headers({
      'accept': 'application/json',
      'Authorization': 'Bearer YOUR-TOKEN',
      'Content-Type': 'application/json-patch+json'
    })
    .send(JSON.stringify({
      "mobile": "09124260197",
      "nationalCode": "1229603905",
      "clientId": "string"
    }))
    .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/ai/shahkar/verifyMobile"]
    cachePolicy:NSURLRequestUseProtocolCachePolicy
    timeoutInterval:10.0];
  NSDictionary *headers = @{
    @"accept": @"application/json",
    @"Authorization": @"Bearer YOUR-TOKEN",
    @"Content-Type": @"application/json-patch+json"
  };
  
  [request setAllHTTPHeaderFields:headers];
  NSData *postData = [[NSData alloc] initWithData:[@"{\"mobile\":\"09124260197\",\"nationalCode\":\"1229603905\",\"clientId\":\"string\"}" 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 "{\"mobile\":\"09124260197\",\"nationalCode\":\"1229603905\",\"clientId\":\"string\"}";;
  
  let reqBody = 
    let uri = Uri.of_string "https://api.itsaaz.ir/ai/shahkar/verifyMobile" in
    let headers = Header.init ()
      |> fun h -> Header.add h "accept" "application/json"
      |> fun h -> Header.add h "Authorization" "Bearer YOUR-TOKEN"
      |> 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.itsaaz.ir/ai/shahkar/verifyMobile',
    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 =>'{"mobile":"09124260197","nationalCode":"1229603905","clientId":"string"}',
    CURLOPT_HTTPHEADER => array(
      'accept: application/json',
      'Authorization: Bearer YOUR-TOKEN',
      '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.itsaaz.ir/ai/shahkar/verifyMobile');
  $request->setMethod(HTTP_Request2::METHOD_POST);
  $request->setConfig(array(
    'follow_redirects' => TRUE
  ));
  $request->setHeader(array(
    'accept' => 'application/json',
    'Authorization' => 'Bearer YOUR-TOKEN',
    'Content-Type' => 'application/json-patch+json'
  ));
  $request->setBody('{"mobile":"09124260197","nationalCode":"1229603905","clientId":"string"}');
  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/ai/shahkar/verifyMobile');
  $request->setRequestMethod('POST');
  $body = new http\Message\Body;
  $body->append('{"mobile":"09124260197","nationalCode":"1229603905","clientId":"string"}');
  $request->setBody($body);
  $request->setOptions(array());
  $request->setHeaders(array(
    'accept' => 'application/json',
    'Authorization' => 'Bearer YOUR-TOKEN',
    '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", "application/json")
  $headers.Add("Authorization", "Bearer YOUR-TOKEN")
  $headers.Add("Content-Type", "application/json-patch+json")
  
  $body = "{`"mobile`":`"09124260197`",`"nationalCode`":`"1229603905`",`"clientId`":`"string`"}"
  
  $response = Invoke-RestMethod 'https://api.itsaaz.ir/ai/shahkar/verifyMobile' -Method 'POST' -Headers $headers -Body $body
  $response | ConvertTo-Json
        

  import http.client
  import json
  
  conn = http.client.HTTPSConnection("api.itsaaz.ir")
  payload = json.dumps({
    "mobile": "09124260197",
    "nationalCode": "1229603905",
    "clientId": "string"
  })
  headers = {
    'accept': 'application/json',
    'Authorization': 'Bearer YOUR-TOKEN',
    'Content-Type': 'application/json-patch+json'
  }
  conn.request("POST", "/ai/shahkar/verifyMobile", payload, headers)
  res = conn.getresponse()
  data = res.read()
  print(data.decode("utf-8"))
            

  import requests
  import json
  
  url = "https://api.itsaaz.ir/ai/shahkar/verifyMobile"
  
  payload = json.dumps({
    "mobile": "09124260197",
    "nationalCode": "1229603905",
    "clientId": "string"
  })
  headers = {
    'accept': 'application/json',
    'Authorization': 'Bearer YOUR-TOKEN',
    '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.itsaaz.ir/ai/shahkar/verifyMobile")
  
  https = Net::HTTP.new(url.host, url.port)
  https.use_ssl = true
  
  request = Net::HTTP::Post.new(url)
  request["accept"] = "application/json"
  request["Authorization"] = "Bearer YOUR-TOKEN"
  request["Content-Type"] = "application/json-patch+json"
  request.body = JSON.dump({
    "mobile": "09124260197",
    "nationalCode": "1229603905",
    "clientId": "string"
  })
  
  response = https.request(request)
  puts response.read_body
  
        

  printf '{"mobile":"09124260197","nationalCode":"1229603905","clientId":"string"}'| http  --follow --timeout 3600 POST 'https://api.itsaaz.ir/ai/shahkar/verifyMobile' \
  accept:'application/json' \
  Authorization:'Bearer YOUR-TOKEN' \
  Content-Type:'application/json-patch+json'
            

  wget --no-check-certificate --quiet \
  --method POST \
  --timeout=0 \
  --header 'accept: application/json' \
  --header 'Authorization: Bearer YOUR-TOKEN' \
  --header 'Content-Type: application/json-patch+json' \
  --body-data '{"mobile":"09124260197","nationalCode":"1229603905","clientId":"string"}' \
   'https://api.itsaaz.ir/ai/shahkar/verifyMobile'
            

  import Foundation
  #if canImport(FoundationNetworking)
  import FoundationNetworking
  #endif
  
  var semaphore = DispatchSemaphore (value: 0)
  
  let parameters = "{\"mobile\":\"09124260197\",\"nationalCode\":\"1229603905\",\"clientId\":\"string\"}"
  let postData = parameters.data(using: .utf8)
  
  var request = URLRequest(url: URL(string: "https://api.itsaaz.ir/ai/shahkar/verifyMobile")!,timeoutInterval: Double.infinity)
  request.addValue("application/json", forHTTPHeaderField: "accept")
  request.addValue("Bearer YOUR-TOKEN", forHTTPHeaderField: "Authorization")
  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- پس از فراخوانی سرویس، اطلاعات کاربر مطابق آنچه در جدول پارامتر های خروجی نمایش داده شده است، ارسال می شود.


  https://api.itsaaz.ir/ai/civilRegistryGetData
        

          Post
        

  accept: application/json
  Authorization: Bearer YOUR-TOKEN
  Content-Type: application/json
        

  {
    "nationalCode": "",
    "birthDate": "1375/01/02"
  }
        

  {
    "data": {
      "birthDate": "تاریخ تولد",
      "lastName": "نام خانوادگی",
      "fatherName": "نام پدر",
      "gender": جنسیت,
      "firstName": "نام",
      "nationalCode": "کد ملی",
      "identityId": "شماره شناسایی",
      "isDead": در قید حیات نیست,
      "isMatch": تطابق داشتن,
      "message": "پیام"
    },
    "meta": null,
    "error": null
  }
        

پارامترهای ورودی

ردیف پارامتر ورودی نوع ورودی توضیحات
1 NationalCode String کدملی فرد
2 BirthDate date تاریخ تولد(شمسی)

نمونه کد


  var client = new RestClient("https://api.itsaaz.ir/ai/civilRegistryGetData");
  client.Timeout = -1;
  var request = new RestRequest(Method.POST);
  request.AddHeader("accept", "application/json");
  request.AddHeader("Authorization", "Bearer YOUR-TOKEN");
  request.AddHeader("Content-Type", "application/json");
  var body = @"{
  " + "\n" +
  @"  ""nationalCode"": ""1272134059"",
  " + "\n" +
  @"  ""birthDate"": ""1375/01/02""
  " + "\n" +
  @"}
  " + "\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/ai/civilRegistryGetData' \
  --header 'accept: application/json' \
  --header 'Authorization: Bearer YOUR-TOKEN' \
  --header 'Content-Type: application/json' \
  --data-raw '{
  
    "nationalCode": "1272134059",
  
    "birthDate": "1375/01/02"
  
  }
  
  '
        

  var headers = {
    'accept': 'application/json',
    'Authorization': 'Bearer YOUR-TOKEN',
    'Content-Type': 'application/json'
  };
  var request = http.Request('POST', Uri.parse('https://api.itsaaz.ir/ai/civilRegistryGetData'));
  request.body = json.encode({
    "nationalCode": "1272134059",
    "birthDate": "1375/01/02"
  });
  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/ai/civilRegistryGetData"
    method := "POST"
  
    payload := strings.NewReader(`{`+"
  "+`
    "nationalCode": "1272134059",`+"
  "+`
    "birthDate": "1375/01/02"`+"
  "+`
  }`+"
  "+`
  `)
  
    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, payload)
  
    if err != nil {
      fmt.Println(err)
      return
    }
    req.Header.Add("accept", "application/json")
    req.Header.Add("Authorization", "Bearer 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 /ai/civilRegistryGetData HTTP/1.1
  Host: api.itsaaz.ir
  accept: application/json
  Authorization: Bearer YOUR-TOKEN
  Content-Type: application/json
  Content-Length: 68
  
  {
  
    "nationalCode": "1272134059",
  
    "birthDate": "1375/01/02"
  
  }
  
  
        

    OkHttpClient client = new OkHttpClient().newBuilder()
    .build();
  MediaType mediaType = MediaType.parse("application/json");
  RequestBody body = RequestBody.create(mediaType, "{\r\n  \"nationalCode\": \"1272134059\",\r\n  \"birthDate\": \"1375/01/02\"\r\n}\r\n");
  Request request = new Request.Builder()
    .url("https://api.itsaaz.ir/ai/civilRegistryGetData")
    .method("POST", body)
    .addHeader("accept", "application/json")
    .addHeader("Authorization", "Bearer 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/ai/civilRegistryGetData")
    .header("accept", "application/json")
    .header("Authorization", "Bearer YOUR-TOKEN")
    .header("Content-Type", "application/json")
    .body("{\r\n  \"nationalCode\": \"1272134059\",\r\n  \"birthDate\": \"1375/01/02\"\r\n}\r\n")
    .asString();
  
  
            

  var myHeaders = new Headers();
  myHeaders.append("accept", "application/json");
  myHeaders.append("Authorization", "Bearer YOUR-TOKEN");
  myHeaders.append("Content-Type", "application/json");
  
  var raw = JSON.stringify({
    "nationalCode": "1272134059",
    "birthDate": "1375/01/02"
  });
  
  var requestOptions = {
    method: 'POST',
    headers: myHeaders,
    body: raw,
    redirect: 'follow'
  };
  
  fetch("https://api.itsaaz.ir/ai/civilRegistryGetData", requestOptions)
    .then(response => response.text())
    .then(result => console.log(result))
    .catch(error => console.log('error', error));
            

  var settings = {
    "url": "https://api.itsaaz.ir/ai/civilRegistryGetData",
    "method": "POST",
    "timeout": 0,
    "headers": {
      "accept": "application/json",
      "Authorization": "Bearer YOUR-TOKEN",
      "Content-Type": "application/json"
    },
    "data": JSON.stringify({
      "nationalCode": "1272134059",
      "birthDate": "1375/01/02"
    }),
  };
  
  $.ajax(settings).done(function (response) {
    console.log(response);
  });
            

  var data = JSON.stringify({
    "nationalCode": "1272134059",
    "birthDate": "1375/01/02"
  });
  
  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/ai/civilRegistryGetData");
  xhr.setRequestHeader("accept", "application/json");
  xhr.setRequestHeader("Authorization", "Bearer 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/ai/civilRegistryGetData");
    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: application/json");
    headers = curl_slist_append(headers, "Authorization: Bearer YOUR-TOKEN");
    headers = curl_slist_append(headers, "Content-Type: application/json");
    curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
    const char *data = "{\r\n  \"nationalCode\": \"1272134059\",\r\n  \"birthDate\": \"1375/01/02\"\r\n}\r\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({
    "nationalCode": "1272134059",
    "birthDate": "1375/01/02"
  });
  
  var config = {
    method: 'post',
    url: 'https://api.itsaaz.ir/ai/civilRegistryGetData',
    headers: { 
      'accept': 'application/json', 
      'Authorization': 'Bearer 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': '/ai/civilRegistryGetData',
    'headers': {
      'accept': 'application/json',
      'Authorization': 'Bearer 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({
    "nationalCode": "1272134059",
    "birthDate": "1375/01/02"
  });
  
  req.write(postData);
  
  req.end();
            

  var request = require('request');
  var options = {
    'method': 'POST',
    'url': 'https://api.itsaaz.ir/ai/civilRegistryGetData',
    'headers': {
      'accept': 'application/json',
      'Authorization': 'Bearer YOUR-TOKEN',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      "nationalCode": "1272134059",
      "birthDate": "1375/01/02"
    })
  
  };
  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/ai/civilRegistryGetData')
    .headers({
      'accept': 'application/json',
      'Authorization': 'Bearer YOUR-TOKEN',
      'Content-Type': 'application/json'
    })
    .send(JSON.stringify({
      "nationalCode": "1272134059",
      "birthDate": "1375/01/02"
    }))
    .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/ai/civilRegistryGetData"]
    cachePolicy:NSURLRequestUseProtocolCachePolicy
    timeoutInterval:10.0];
  NSDictionary *headers = @{
    @"accept": @"application/json",
    @"Authorization": @"Bearer YOUR-TOKEN",
    @"Content-Type": @"application/json"
  };
  
  [request setAllHTTPHeaderFields:headers];
  NSData *postData = [[NSData alloc] initWithData:[@"{\r\n  \"nationalCode\": \"1272134059\",\r\n  \"birthDate\": \"1375/01/02\"\r\n}\r\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 "{\r\n  \"nationalCode\": \"1272134059\",\r\n  \"birthDate\": \"1375/01/02\"\r\n}\r\n";;
  
  let reqBody = 
    let uri = Uri.of_string "https://api.itsaaz.ir/ai/civilRegistryGetData" in
    let headers = Header.init ()
      |> fun h -> Header.add h "accept" "application/json"
      |> fun h -> Header.add h "Authorization" "Bearer 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/ai/civilRegistryGetData',
    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 =>'{
  
    "nationalCode": "1272134059",
  
    "birthDate": "1375/01/02"
  
  }
  
  ',
    CURLOPT_HTTPHEADER => array(
      'accept: application/json',
      'Authorization: Bearer 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/identity/token');
  $request->setMethod(HTTP_Request2::METHOD_POST);
  $request->setConfig(array(
    'follow_redirects' => TRUE
  ));
  $request->setHeader(array(
    'Content-Type' => 'application/x-www-form-urlencoded'
  ));
  $request->addPostParameter(array(
    'grant_type' => 'password',
    'client_id' => 'test',
    'Client_secret' => '66c0af3a-ff89-8390-3b07-cf88a25e5f3f',
    'username' => 'test',
    'password' => 't_86574213@H'
  ));
  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/ai/civilRegistryGetData');
  $request->setRequestMethod('POST');
  $body = new http\Message\Body;
  $body->append('{
  
    "nationalCode": "1272134059",
  
    "birthDate": "1375/01/02"
  
  }
  
  ');
  $request->setBody($body);
  $request->setOptions(array());
  $request->setHeaders(array(
    'accept' => 'application/json',
    'Authorization' => 'Bearer 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("accept", "application/json")
  $headers.Add("Authorization", "Bearer YOUR-TOKEN")
  $headers.Add("Content-Type", "application/json")
  
  $body = "{
  `n  `"nationalCode`": `"1272134059`",
  `n  `"birthDate`": `"1375/01/02`"
  `n}
  `n"
  
  $response = Invoke-RestMethod 'https://api.itsaaz.ir/ai/civilRegistryGetData' -Method 'POST' -Headers $headers -Body $body
  $response | ConvertTo-Json
        

  import http.client
  import json
  
  conn = http.client.HTTPSConnection("api.itsaaz.ir")
  payload = json.dumps({
    "nationalCode": "1272134059",
    "birthDate": "1375/01/02"
  })
  headers = {
    'accept': 'application/json',
    'Authorization': 'Bearer YOUR-TOKEN',
    'Content-Type': 'application/json'
  }
  conn.request("POST", "/ai/civilRegistryGetData", payload, headers)
  res = conn.getresponse()
  data = res.read()
  print(data.decode("utf-8"))
            

  import requests
  import json
  
  url = "https://api.itsaaz.ir/ai/civilRegistryGetData"
  
  payload = json.dumps({
    "nationalCode": "1272134059",
    "birthDate": "1375/01/02"
  })
  headers = {
    'accept': 'application/json',
    'Authorization': 'Bearer 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/ai/civilRegistryGetData")
  
  https = Net::HTTP.new(url.host, url.port)
  https.use_ssl = true
  
  request = Net::HTTP::Post.new(url)
  request["accept"] = "application/json"
  request["Authorization"] = "Bearer YOUR-TOKEN"
  request["Content-Type"] = "application/json"
  request.body = JSON.dump({
    "nationalCode": "1272134059",
    "birthDate": "1375/01/02"
  })
  
  response = https.request(request)
  puts response.read_body
  
      
        

  printf '{
    "nationalCode": "1272134059",
    "birthDate": "1375/01/02"
  }
  '| http  --follow --timeout 3600 POST 'https://api.itsaaz.ir/ai/civilRegistryGetData' \
   accept:'application/json' \
   Authorization:'Bearer YOUR-TOKEN' \
   Content-Type:'application/json'
            

  wget --no-check-certificate --quiet \
  --method POST \
  --timeout=0 \
  --header 'accept: application/json' \
  --header 'Authorization: Bearer YOUR-TOKEN' \
  --header 'Content-Type: application/json' \
  --body-data '{

  "nationalCode": "1272134059",

  "birthDate": "1375/01/02"

}

' \
   'https://api.itsaaz.ir/ai/civilRegistryGetData'
            

  import Foundation
  #if canImport(FoundationNetworking)
  import FoundationNetworking
  #endif
  
  var semaphore = DispatchSemaphore (value: 0)
  
  let parameters = "{\r\n  \"nationalCode\": \"1272134059\",\r\n  \"birthDate\": \"1375/01/02\"\r\n}\r\n"
  let postData = parameters.data(using: .utf8)
  
  var request = URLRequest(url: URL(string: "https://api.itsaaz.ir/ai/civilRegistryGetData")!,timeoutInterval: Double.infinity)
  request.addValue("application/json", forHTTPHeaderField: "accept")
  request.addValue("Bearer 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()
  
        



توجه داشته باشید در صورتیکه کدملی و شماره شناسنامه یکسان باشد مقدار identityId صفر بازگردانده می شود

جدول خطاها

ردیف کد خطا توضیحات
1 400 اطلاعات وارد شده نادرست است
2 401 توکن نامعتبراست
3 403 عدم دسترسی
4 404 کاربر با این مشخصات پیدانشد(عدم تطبیق)
5 429 تعداد درخواست بیش از حد مجاز است