Overview
این API با شناسه ملی ۱۱ رقمی شرکت، مشخصات ثبتی را برمیگرداند (نام، شماره و تاریخ ثبت، سرمایه، آدرس، کد پستی، وضعیت، نوع ثبت).
احراز هویت: Authorization: Token … و X-Unique-Code. فقط از IPهای ثبتشده مجاز است.
Returns registered company details (title, registration number/date, capital, address, postal code, status, registration type) by Iranian company national ID (11 digits). Successful calls charge the wallet.
/api/services/company-info/
این API با شناسه ملی ۱۱ رقمی شرکت، مشخصات ثبتی را برمیگرداند (نام، شماره و تاریخ ثبت، سرمایه، آدرس، کد پستی، وضعیت، نوع ثبت).
احراز هویت: Authorization: Token … و X-Unique-Code. فقط از IPهای ثبتشده مجاز است.
فقط در صورت موفقیت استعلام از کیف پول کسر میشود. خطای پارامتر یا شکست بالادست بدون کسر ثبت میشود.
Every request is checked against the IP list registered on your account (dashboard → security settings). Requests from any other IP — or from any IP when no IP is registered — are rejected with 403 IP_NOT_ALLOWED (checked right after token authentication, before the provider is called; nothing is charged).
{
"success": false,
"error": {
"code": "IP_NOT_ALLOWED",
"message": "درخواست از آدرس IP ثبتنشده ارسال شده است. فقط IPهای ثبتشده مجاز هستند.",
"details": {"client_ip": "203.0.113.10"}
}
}details.client_ip shows the IP the server saw; register exactly that public IP of your server.
| پارامتر | نوع | اجباری | توضیحات | مثال |
|---|---|---|---|---|
company_national_id
|
String | اجباری |
Iranian company national ID (شناسه ملی شرکت), exactly 11 digits.
اعتبارسنجی: Exactly 11 numeric digits. |
14007651115
|
Example using Python requests.
import requests
url = "https://inquiry.sepal.ir/api/services/company-info/"
headers = {
"Authorization": "Token YOUR_AUTH_TOKEN",
"X-Unique-Code": "YOUR_UNIQUE_CODE",
"Content-Type": "application/json",
}
payload = {"company_national_id": "14007651115"}
print(requests.post(url, json=payload, headers=headers).json())
Command-line cURL example.
curl -X POST "https://inquiry.sepal.ir/api/services/company-info/" \
-H "Authorization: Token YOUR_AUTH_TOKEN" \
-H "X-Unique-Code: YOUR_UNIQUE_CODE" \
-H "Content-Type: application/json" \
-d '{"company_national_id": "14007651115"}'
Company registration details returned; wallet charged.
{
"amount": "integer",
"success": "boolean",
"request_ref": "string",
"response_data": "object",
"response_time_ms": "integer"
}
{
"amount": 25000,
"success": true,
"request_ref": "ABCDEFGHIJKLMNOPQRSTUVWXYZ012345",
"error_message": null,
"response_data": {
"title": "تست",
"ref_id": "5ad39615-933c-4326-a0c8-25a3706d7f2f",
"status": "فعال",
"address": "استان تهران - منطقه 7 ، سیدخندان ، پلاک 2 ، طبقه دوم",
"capital": 200000000000,
"company_id": "14007651115",
"postal_code": "1111111111",
"operation_time": 1762629953669,
"registration_no": "111111",
"registration_date": "2018-06-13T00:00:00",
"registration_type_title": "سهامی خاص",
"persian_registration_date": "1397/3/23"
},
"response_time_ms": 2100
}
Invalid company_national_id.
{
"error": "object",
"success": "boolean"
}
{
"error": {
"code": "INVALID_PARAMETERS",
"details": {
"company_national_id": [
"شناسه ملی شرکت باید ۱۱ رقم باشد."
]
},
"message": "پارامترهای ورودی نامعتبر است."
},
"success": false
}
Missing or invalid Authorization token / X-Unique-Code. Body is DRF's {"detail": ...} (no success/error envelope). No charge.
{
"detail": "string"
}
{
"detail": "Invalid registration source credentials. Token or unique code is incorrect or inactive."
}
Wallet balance is below the service tariff (25,000 Rials), or in-flight requests already reserve it. The provider is not called. No charge.
{
"error": {
"code": "string",
"details": "object (optional)",
"message": "string"
},
"success": "boolean (false)"
}
{
"error": {
"code": "INSUFFICIENT_BALANCE",
"message": "موجودی ناکافی. موجودی فعلی: 0 ریال، مبلغ مورد نیاز: 25,000 ریال"
},
"success": false
}
Request IP is not in the account's registered IP list (or no IP is registered). Register the server IP in the dashboard. No charge.
{
"error": {
"code": "string",
"details": {
"client_ip": "string"
},
"message": "string"
},
"success": "boolean (false)"
}
{
"error": {
"code": "IP_NOT_ALLOWED",
"details": {
"client_ip": "203.0.113.10"
},
"message": "درخواست از آدرس IP ثبتنشده ارسال شده است. فقط IPهای ثبتشده مجاز هستند."
},
"success": false
}
Upstream provider unreachable or failed. When the provider answers with its own 5xx, that status is returned with error.errors[0].code = SERVICE_UNAVAILABLE. No charge.
{
"error": {
"code": "string",
"details": "object (optional)",
"message": "string"
},
"success": "boolean (false)"
}
{
"error": {
"code": "SERVICE_ERROR",
"message": "سرویس استعلام در دسترس نیست. لطفاً دوباره تلاش کنید."
},
"success": false
}