Overview
The Deposits Account National Code Match API validates whether the provided national code belongs to the owner of the specified deposit account or IBAN. For IBAN requests the upstream response contains a simple match flag.
این API برای تطابق کد ملی ارسال شده با کد ملی صاحب سپرده استفاده میشود. در صورت تطابق، اطلاعات سپرده و وضعیت تطابق برگردانده میشود و در صورت عدم تطابق یا نبود دسترسی، خطای مناسب ارائه میگردد.
/api/services/deposits-account-national-code-match/
The Deposits Account National Code Match API validates whether the provided national code belongs to the owner of the specified deposit account or IBAN. For IBAN requests the upstream response contains a simple match flag.
Send both headers in every request:
Authorization: Token YOUR_AUTH_TOKEN
X-Unique-Code: YOUR_UNIQUE_CODE
Bank-Id: MELIIRBank-Id header is required when querying by deposit account number. For IBAN lookups, the service currently accepts empty Bank-Id values.
Send a POST request with JSON body:
{
"account": "0219950976002",
"national_code": "4640229534",
"bank_id": ""
}برای شبا میتوانید مقدار account را برابر IBAN قرار دهید و bank_id را خالی بفرستید.
Ensure the national code matches the account owner's identity.
Successful responses include owner name, deposit metadata, and the match flag. Error responses follow the platform's standard structure with operation_time, ref_id, and detailed errors.
Common platform error codes:
| پارامتر | نوع | اجباری | توضیحات | مثال |
|---|---|---|---|---|
account
|
String | اجباری |
شماره سپرده یا شبا. برای شبا باید با IR شروع شود و ۲۶ کاراکتر باشد.
اعتبارسنجی: IBAN: طول ۲۶، پس از IR فقط ارقام. Account: فقط عددی، حداقل ۶ رقم. |
IR110170000000219950976002
|
national_code
|
String | اجباری |
کد ملی صاحب سپرده. برای اشخاص حقیقی ۱۰ رقم، اشخاص حقوقی ۱۱ رقم و اتباع بین ۱۲ تا ۱۵ رقم.
اعتبارسنجی: Numeric, length 10/11/12-15, checksum اعمال برای اشخاص حقیقی. |
4640229534
|
bank_id
|
String | اختیاری |
شناسه بانک مقصد. در صورت نامشخص بودن، مقدار خالی ارسال کنید؛ بعضی بانکها مقدار مشخص میخواهند.
اعتبارسنجی: Optional string. برای بانکهایی که شناسه مشخص دارند مقدار مناسب ارسال شود. |
- |
Example using Python requests library.
import requests
url = "https://inquiry.sepal.ir/api/services/deposits-account-national-code-match/"
headers = {
"Authorization": "Token YOUR_AUTH_TOKEN",
"X-Unique-Code": "YOUR_UNIQUE_CODE",
"Content-Type": "application/json",
}
payload = {
"account": "0219950976002",
"national_code": "4640229534",
"bank_id": ""
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
Command-line cURL example.
curl -X POST "https://inquiry.sepal.ir/api/services/deposits-account-national-code-match/" \
-H "Authorization: Token YOUR_AUTH_TOKEN" \
-H "X-Unique-Code: YOUR_UNIQUE_CODE" \
-H "Content-Type: application/json" \
-d '{
"account": "0219950976002",
"national_code": "4640229534",
"bank_id": ""
}'
پاسخ موفق شامل اطلاعات سپرده و وضعیت تطابق.
{
"amount": "integer",
"success": "boolean",
"request_ref": "string",
"error_message": "null",
"response_data": {
"match": "boolean",
"ref_id": "string",
"operation_time": "integer"
},
"response_time_ms": "integer"
}
{
"amount": 15000,
"success": true,
"request_ref": "PAKM32SOR28OTCUAJX2V3UF7J8XQJT33",
"error_message": null,
"response_data": {
"match": true,
"ref_id": "9e7ff9f3-a0e9-43e5-9ec8-6d90b993dda2",
"operation_time": 1762691215312
},
"response_time_ms": 220
}
پارامتر ورودی نامعتبر است.
{
"error": {
"errors": "list",
"ref_id": "string",
"operation_time": "integer"
},
"success": "boolean"
}
{
"error": {
"errors": [
{
"code": "1002",
"message": "ارسال شناسه بانک در header اجباری می باشد",
"reference": "BANK-ID"
}
],
"ref_id": "c527a9c1-04bd-49ed-b113-bba1e493c243",
"operation_time": 1762673346784
},
"success": false
}
دسترسی به بانک مورد نظر برای برنامه فعال نشده است.
{
"error": {
"errors": "list",
"ref_id": "string",
"operation_time": "integer"
},
"success": "boolean"
}
{
"error": {
"errors": [
{
"code": "1027",
"message": "دسترسی این برنامه برای بانک درخواست شده برقرار نمی باشد"
}
],
"ref_id": "35e36e3f-70e8-4451-bdfb-601575c8b0ee",
"operation_time": 1762673401463
},
"success": false
}