{
  "info": {
    "name": "Saravar — Person API",
    "description": "Saravar person commercial API · مجموعه endpoint های شخص. Set the `api_key` collection variable before sending. `base_url` is preconfigured. هر فراخوانی موفق شامل حداقل کارمزد است. اشخاص دارای حریم‌خصوصی فعال یا opt-out هرگز در پاسخ نمایش داده نمی‌شوند و هزینه‌بر نیستند.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "_postman_id": "saravar-person-collection"
  },
  "auth": {
    "type": "apikey",
    "apikey": [
      { "key": "key", "value": "X-API-KEY", "type": "string" },
      { "key": "value", "value": "{{api_key}}", "type": "string" },
      { "key": "in", "value": "header", "type": "string" }
    ]
  },
  "variable": [
    {
      "key": "base_url",
      "value": "https://www.saravar.com/api",
      "description": "Saravar base URL (production)."
    },
    { "key": "api_key", "value": "", "description": "Your X-API-KEY value." },
    {
      "key": "national_id",
      "value": "1234567890",
      "description": "Sample 10-digit person national ID."
    }
  ],
  "item": [
    {
      "name": "Identity",
      "item": [
        {
          "name": "GET commercial/persons/resolve/",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/commercial/persons/resolve/?national_id={{national_id}}&idempotency_key={{$guid}}",
              "host": ["{{base_url}}"],
              "path": ["commercial", "persons", "resolve", ""],
              "query": [
                {
                  "key": "national_id",
                  "value": "{{national_id}}",
                  "description": "Full 10-digit NID."
                },
                {
                  "key": "masked_national_id",
                  "value": "",
                  "description": "Optional — use with full_name when full NID unknown.",
                  "disabled": true
                },
                {
                  "key": "full_name",
                  "value": "",
                  "description": "Required when masked_national_id is used.",
                  "disabled": true
                },
                {
                  "key": "idempotency_key",
                  "value": "{{$guid}}",
                  "description": "Unique UUID per user intent."
                }
              ]
            },
            "description": "یافتن شخص با NID کامل، یا با NID ماسک‌شده + نام. هزینه: ۱ واحد به ازای هر فراخوانی موفق."
          },
          "response": [
            {
              "name": "Success 200",
              "status": "OK",
              "code": 200,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\"debit_transaction_id\":12345,\"total_charged\":50000,\"data\":{\"id_code\":\"P0000001\",\"full_name\":\"علی رضایی\",\"national_id\":\"1234567890\",\"masked_national_id\":\"123****890\",\"date_of_birth\":\"1370-01-10\",\"father_name\":\"محمد\"}}"
            }
          ]
        }
      ]
    },
    {
      "name": "Roles",
      "item": [
        {
          "name": "GET commercial/persons/{national_id}/roles/",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/commercial/persons/{{national_id}}/roles/?idempotency_key={{$guid}}",
              "host": ["{{base_url}}"],
              "path": ["commercial", "persons", "{{national_id}}", "roles", ""],
              "query": [{ "key": "idempotency_key", "value": "{{$guid}}" }]
            },
            "description": "نقش‌های شرکتی شخص (فعلی و تاریخی) گروه‌بندی‌شده بر اساس شرکت. هزینه: هر گروه‌بندی شرکتی = ۱ واحد."
          },
          "response": [
            {
              "name": "Success 200",
              "status": "OK",
              "code": 200,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\"debit_transaction_id\":12346,\"total_charged\":50000,\"data\":[{\"company\":{\"id_code\":\"C0000001\",\"company_name\":\"شرکت نمونه\"},\"roles\":[{\"role\":{\"id\":1,\"name\":\"مدیرعامل\",\"type\":\"ceo\"},\"date_assigned\":\"1402-03-15\",\"expire_date\":null,\"is_current\":true}]}]}"
            }
          ]
        },
        {
          "name": "POST commercial/persons/role-check/",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"company_national_id\": \"12345678901\",\n  \"person_national_id\": \"{{national_id}}\",\n  \"role_type\": \"ceo\",\n  \"idempotency_key\": \"{{$guid}}\"\n}",
              "options": { "raw": { "language": "json" } }
            },
            "url": {
              "raw": "{{base_url}}/commercial/persons/role-check/",
              "host": ["{{base_url}}"],
              "path": ["commercial", "persons", "role-check", ""]
            },
            "description": "اعتبارسنجی نقش — معادل companies/role-check/. هزینه: ۱ واحد."
          },
          "response": [
            {
              "name": "Success 200",
              "status": "OK",
              "code": 200,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\"debit_transaction_id\":12347,\"total_charged\":50000,\"data\":{\"is_valid\":true,\"role_type\":\"ceo\",\"role_name\":\"مدیرعامل\",\"date_assigned\":\"1402-03-15\",\"expire_date\":null}}"
            }
          ]
        }
      ]
    },
    {
      "name": "Assets",
      "item": [
        {
          "name": "GET commercial/persons/{national_id}/shares/",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/commercial/persons/{{national_id}}/shares/?idempotency_key={{$guid}}",
              "host": ["{{base_url}}"],
              "path": ["commercial", "persons", "{{national_id}}", "shares", ""],
              "query": [{ "key": "idempotency_key", "value": "{{$guid}}" }]
            },
            "description": "سهام‌داری‌های شخص. هزینه: هر رکورد = ۱ واحد."
          },
          "response": [
            {
              "name": "Success 200",
              "status": "OK",
              "code": 200,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\"debit_transaction_id\":12348,\"total_charged\":50000,\"data\":[{\"company_id_code\":\"C0000001\",\"company_name\":\"شرکت نمونه\",\"total_value\":\"5000000000\",\"number_of_shares\":50000,\"percentage\":\"40.00\",\"is_current\":true}]}"
            }
          ]
        },
        {
          "name": "GET commercial/persons/{national_id}/licenses/",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/commercial/persons/{{national_id}}/licenses/?idempotency_key={{$guid}}",
              "host": ["{{base_url}}"],
              "path": ["commercial", "persons", "{{national_id}}", "licenses", ""],
              "query": [{ "key": "idempotency_key", "value": "{{$guid}}" }]
            },
            "description": "مجوزهای کسب‌وکار شخص. هزینه: هر رکورد = ۱ واحد."
          },
          "response": [
            {
              "name": "Success 200",
              "status": "OK",
              "code": 200,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\"debit_transaction_id\":12349,\"total_charged\":50000,\"data\":[{\"type\":\"mojavez.ir\",\"request_number\":\"9876543\",\"license_title\":\"پروانه کسب\",\"organization_title\":\"اتحادیه صنف\",\"issued_at\":\"1402-05-01\",\"expires_at\":\"1407-05-01\",\"status_slug\":\"active\"}]}"
            }
          ]
        },
        {
          "name": "GET commercial/persons/{national_id}/enamads/",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/commercial/persons/{{national_id}}/enamads/?idempotency_key={{$guid}}",
              "host": ["{{base_url}}"],
              "path": ["commercial", "persons", "{{national_id}}", "enamads", ""],
              "query": [{ "key": "idempotency_key", "value": "{{$guid}}" }]
            },
            "description": "اینمادهای متعلق به شخص. هزینه: هر رکورد = ۱ واحد."
          },
          "response": [
            {
              "name": "Success 200",
              "status": "OK",
              "code": 200,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\"debit_transaction_id\":12350,\"total_charged\":50000,\"data\":[{\"enamad_id\":\"12345\",\"domain\":\"example.ir\",\"business_title\":\"فروشگاه اینترنتی نمونه\",\"star_count\":2,\"grant_date\":\"1402-01-10\",\"expiry_date\":\"1406-01-09\",\"status_slug\":\"active\"}]}"
            }
          ]
        },
        {
          "name": "GET commercial/persons/{national_id}/career-history/",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/commercial/persons/{{national_id}}/career-history/?idempotency_key={{$guid}}",
              "host": ["{{base_url}}"],
              "path": ["commercial", "persons", "{{national_id}}", "career-history", ""],
              "query": [{ "key": "idempotency_key", "value": "{{$guid}}" }]
            },
            "description": "تاریخچه شغلی کامل با لینک به اطلاعیه روزنامه رسمی. هزینه: هر رکورد = ۱ واحد."
          },
          "response": [
            {
              "name": "Success 200",
              "status": "OK",
              "code": 200,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\"debit_transaction_id\":12351,\"total_charged\":50000,\"data\":[{\"company_id_code\":\"C0000001\",\"company_name\":\"شرکت نمونه\",\"role_name\":\"عضو هیئت مدیره\",\"role_type\":\"board_member\",\"date_assigned\":\"1398-06-01\",\"expire_date\":\"1401-06-01\",\"is_current\":false,\"legal_note_id_code\":\"N0000123\"}]}"
            }
          ]
        }
      ]
    },
    {
      "name": "Bundle",
      "item": [
        {
          "name": "GET commercial/persons/{national_id}/full-profile/",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/commercial/persons/{{national_id}}/full-profile/?idempotency_key={{$guid}}",
              "host": ["{{base_url}}"],
              "path": ["commercial", "persons", "{{national_id}}", "full-profile", ""],
              "query": [{ "key": "idempotency_key", "value": "{{$guid}}" }]
            },
            "description": "بسته کامل شخص — هویت، نقش‌ها، سهام، مجوزها، اینمادها و تاریخچه شغلی در یک فراخوانی. هزینه: مجموع اجزای موجود × ۰٫۸ (تخفیف ۲۰٪)."
          },
          "response": [
            {
              "name": "Success 200",
              "status": "OK",
              "code": 200,
              "header": [{ "key": "Content-Type", "value": "application/json" }],
              "body": "{\"debit_transaction_id\":12352,\"total_charged\":50000,\"data\":{\"identity\":{\"id_code\":\"P0000001\",\"full_name\":\"علی رضایی\",\"national_id\":\"1234567890\"},\"roles\":[],\"shares\":[],\"licenses\":[],\"enamads\":[],\"career_history\":[]}}"
            }
          ]
        }
      ]
    }
  ]
}
