You need to enable JavaScript to use this application.
POST استعلام

Deposits Account Mobile Match API

این API برای تطبیق شماره موبایل ارسال شده با شماره موبایل صاحب سپرده/شبا استفاده می‌شود. در حال حاضر این سرویس فقط برای بانک تجارت (Bank-Id = BKBPIR / BTEJIR) فعال است.

POST /api/services/deposits-account-mobile-match/
نیاز به احراز هویت Token 60 requests/minute

مستندات

Overview

Overview

The Deposits Account Mobile Match API allows you to verify whether a given mobile number belongs to the owner of a specific deposit account or IBAN. Currently this service is only available for Tejarat Bank (Bank-Id: BKBPIR / BTEJIR).

Authentication

Authentication

This API requires token-based authentication and a unique code header:

Authorization: Token YOUR_AUTH_TOKEN
X-Unique-Code: YOUR_UNIQUE_CODE

Request Format

Request Format

Send a POST request with application/json body:

{
  "account": "IR120570077700000725422001",
  "mobile": "09385853296"
}

Only Tejarat Bank is currently supported. The backend will automatically send Bank-Id: BKBPIR in the request.

Response Format

Response Format

Successful responses include a match flag and the normalized mobile number in response_data. The operation_time and ref_id fields can be used for auditing and support.

Best Practices

Best Practices

  • Validate account/IBAN and mobile formats on the client before sending requests.
  • Log and store ref_id and operation_time for troubleshooting.
  • Handle platform error codes (e.g., 1027) and show user-friendly messages.

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

پارامتر نوع اجباری توضیحات مثال
account String اجباری شماره سپرده یا شبا. برای شبا باید با IR شروع شود و ۲۶ کاراکتر باشد.
اعتبارسنجی: IBAN: طول ۲۶، پس از IR فقط ارقام. Account: فقط عددی، حداقل ۶ رقم.
IR120570077700000725422001
mobile String اجباری شماره موبایل صاحب سپرده/شبا (فرمت داخلی 09... یا بین‌المللی +98/0098).
اعتبارسنجی: باید با 09، +98 یا 0098 شروع شود، حداکثر ۲۰ کاراکتر.
09385853296

مثال‌های کد

Python Example

Example using Python requests library.

import requests

url = "https://inquiry.sepal.ir/api/services/deposits-account-mobile-match/"
headers = {
    "Authorization": "Token YOUR_AUTH_TOKEN",
    "X-Unique-Code": "YOUR_UNIQUE_CODE",
    "Content-Type": "application/json",
}
payload = {
    "account": "IR120570077700000725422001",
    "mobile": "09385853296"
}

response = requests.post(url, json=payload, headers=headers)
print(response.json())
C# Example

Example using C# HttpClient.

using System;
using System.Net.Http;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;

class Program
{
    static async Task Main()
    {
        var client = new HttpClient();
        client.DefaultRequestHeaders.Add("Authorization", "Token YOUR_AUTH_TOKEN");
        client.DefaultRequestHeaders.Add("X-Unique-Code", "YOUR_UNIQUE_CODE");

        var payload = new
        {
            account = "IR120570077700000725422001",
            mobile = "09385853296"
        };

        var json = JsonSerializer.Serialize(payload);
        var content = new StringContent(json, Encoding.UTF8, "application/json");

        var response = await client.PostAsync(
            "https://inquiry.sepal.ir/api/services/deposits-account-mobile-match/",
            content
        );

        var result = await response.Content.ReadAsStringAsync();
        Console.WriteLine(result);
    }
}
PHP Example

Example using PHP cURL.

<?php

$url = "https://inquiry.sepal.ir/api/services/deposits-account-mobile-match/";
$data = [
    "account" => "IR120570077700000725422001",
    "mobile" => "09385853296"
];

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Token YOUR_AUTH_TOKEN",
    "X-Unique-Code: YOUR_UNIQUE_CODE",
    "Content-Type: application/json"
]);

$response = curl_exec($ch);
curl_close($ch);

echo $response;
?>
cURL Example

Command-line cURL example.

curl -X POST "https://inquiry.sepal.ir/api/services/deposits-account-mobile-match/" \
  -H "Authorization: Token YOUR_AUTH_TOKEN" \
  -H "X-Unique-Code: YOUR_UNIQUE_CODE" \
  -H "Content-Type: application/json" \
  -d '{
    "account": "IR120570077700000725422001",
    "mobile": "09385853296"
  }'

فرمت پاسخ

200
پاسخ موفق

پاسخ موفق شامل شماره موبایل، نتیجه تطبیق و متادیتای سپال‌یار.

ساختار پاسخ:
{
  "amount": "integer",
  "success": "boolean",
  "request_ref": "string",
  "error_message": "null",
  "response_data": {
    "match": "boolean",
    "mobile": "string",
    "ref_id": "string",
    "operation_time": "integer"
  },
  "response_time_ms": "integer"
}
مثال پاسخ:
{
  "amount": 15000,
  "success": true,
  "request_ref": "ABC123XYZ456DEF789",
  "error_message": null,
  "response_data": {
    "match": true,
    "mobile": "09385853296",
    "ref_id": "54854cb0-dbe4-433a-b800-062015b63b81",
    "operation_time": 1763287828519
  },
  "response_time_ms": 250
}
400
خطا

پارامترهای ورودی نامعتبر هستند یا تصویر/اطلاعات ناقص است.

ساختار پاسخ:
{
  "error": {
    "errors": "list",
    "ref_id": "string",
    "operation_time": "integer"
  },
  "success": "boolean"
}
مثال پاسخ:
{
  "error": {
    "errors": [
      {
        "code": "1001",
        "message": "ارسال شماره حساب یا موبایل نامعتبر است."
      }
    ],
    "ref_id": "4d43a9dc-7cb1-4e61-8d10-4e2cdb2c9d23",
    "operation_time": 1762691215312
  },
  "success": false
}
403
خطا

دسترسی برنامه برای بانک تجارت (BTEJIR/BKBPIR) فعال نشده است.

ساختار پاسخ:
{
  "error": {
    "errors": "list",
    "ref_id": "string",
    "operation_time": "integer"
  },
  "success": "boolean"
}
مثال پاسخ:
{
  "error": {
    "errors": [
      {
        "code": "1027",
        "message": "دسترسی این برنامه برای بانک درخواست شده برقرار نمی باشد"
      }
    ],
    "ref_id": "7713c9e3-0b54-4a72-8a01-17fb37ee0ede",
    "operation_time": 1762691215312
  },
  "success": false
}