{
  "info": {
    "name": "FaraidPro Estate API",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "description": "Set apiKey to an fp_test_… key to try it safely."
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://www.faraidpro.com/api/v1"
    },
    {
      "key": "apiKey",
      "value": "fp_test_REPLACE_ME"
    },
    {
      "key": "estateId",
      "value": ""
    }
  ],
  "item": [
    {
      "name": "Compute estate",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Authorization",
            "value": "Bearer {{apiKey}}"
          },
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "key": "Idempotency-Key",
            "value": "{{$guid}}"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/estates",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "estates"
          ]
        },
        "body": {
          "mode": "raw",
          "raw": "{\n  \"reference\": \"CASE-1042\",\n  \"madhab\": \"hanafi\",\n  \"jurisdiction\": \"PK\",\n  \"currency\": \"PKR\",\n  \"deceased\": {\n    \"name\": \"Ahmad Khan\",\n    \"gender\": \"male\",\n    \"dateOfDeath\": \"2025-03-01\"\n  },\n  \"heirs\": [\n    {\n      \"type\": \"wife\",\n      \"count\": 1\n    },\n    {\n      \"type\": \"son\",\n      \"count\": 2\n    },\n    {\n      \"type\": \"daughter\",\n      \"count\": 1\n    }\n  ],\n  \"assets\": [\n    {\n      \"id\": \"house\",\n      \"type\": \"house\",\n      \"label\": \"House\",\n      \"valuationMinor\": \"1500000000\",\n      \"divisible\": false\n    },\n    {\n      \"id\": \"bank\",\n      \"type\": \"bank\",\n      \"label\": \"Bank\",\n      \"valuationMinor\": \"2500000000\"\n    },\n    {\n      \"id\": \"land\",\n      \"type\": \"land_nahri\",\n      \"label\": \"Nahri land\",\n      \"valuationMinor\": \"3000000000\",\n      \"quantity\": 4,\n      \"unit\": \"acre\"\n    }\n  ],\n  \"deductions\": [\n    {\n      \"category\": \"funeral\",\n      \"label\": \"Burial\",\n      \"amountMinor\": \"5000000\"\n    },\n    {\n      \"category\": \"mahr\",\n      \"label\": \"Deferred mahr\",\n      \"amountMinor\": \"20000000\"\n    }\n  ],\n  \"allocation\": {\n    \"strategy\": \"compensate\",\n    \"locks\": [\n      {\n        \"assetId\": \"house\",\n        \"heirId\": \"wife:0\"\n      }\n    ]\n  },\n  \"pdf\": {\n    \"language\": \"en\"\n  }\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "Compute estate (Ja'fari, branches)",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Authorization",
            "value": "Bearer {{apiKey}}"
          },
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "key": "Idempotency-Key",
            "value": "{{$guid}}"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/estates",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "estates"
          ]
        },
        "body": {
          "mode": "raw",
          "raw": "{\n  \"reference\": \"CASE-1043\",\n  \"madhab\": \"jafari\",\n  \"jurisdiction\": \"IR\",\n  \"currency\": \"IRR\",\n  \"deceased\": {\n    \"name\": \"Hossein Karimi\",\n    \"gender\": \"male\",\n    \"dateOfDeath\": \"2025-06-10\"\n  },\n  \"heirs\": [\n    {\n      \"type\": \"wife\",\n      \"count\": 1\n    },\n    {\n      \"type\": \"sonOfDaughter\",\n      \"count\": 1,\n      \"branch\": \"Fatima\"\n    },\n    {\n      \"type\": \"daughterOfDaughter\",\n      \"count\": 2,\n      \"branch\": \"Zaynab\"\n    }\n  ],\n  \"estateValueMinor\": \"12000000000\",\n  \"pdf\": false\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "Batch",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Authorization",
            "value": "Bearer {{apiKey}}"
          },
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/estates/batch",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "estates",
            "batch"
          ]
        },
        "body": {
          "mode": "raw",
          "raw": "{\n  \"estates\": [\n    {\n      \"reference\": \"CASE-1042\",\n      \"madhab\": \"hanafi\",\n      \"jurisdiction\": \"PK\",\n      \"currency\": \"PKR\",\n      \"deceased\": {\n        \"name\": \"Ahmad Khan\",\n        \"gender\": \"male\",\n        \"dateOfDeath\": \"2025-03-01\"\n      },\n      \"heirs\": [\n        {\n          \"type\": \"wife\",\n          \"count\": 1\n        },\n        {\n          \"type\": \"son\",\n          \"count\": 2\n        },\n        {\n          \"type\": \"daughter\",\n          \"count\": 1\n        }\n      ],\n      \"assets\": [\n        {\n          \"id\": \"house\",\n          \"type\": \"house\",\n          \"label\": \"House\",\n          \"valuationMinor\": \"1500000000\",\n          \"divisible\": false\n        },\n        {\n          \"id\": \"bank\",\n          \"type\": \"bank\",\n          \"label\": \"Bank\",\n          \"valuationMinor\": \"2500000000\"\n        },\n        {\n          \"id\": \"land\",\n          \"type\": \"land_nahri\",\n          \"label\": \"Nahri land\",\n          \"valuationMinor\": \"3000000000\",\n          \"quantity\": 4,\n          \"unit\": \"acre\"\n        }\n      ],\n      \"deductions\": [\n        {\n          \"category\": \"funeral\",\n          \"label\": \"Burial\",\n          \"amountMinor\": \"5000000\"\n        },\n        {\n          \"category\": \"mahr\",\n          \"label\": \"Deferred mahr\",\n          \"amountMinor\": \"20000000\"\n        }\n      ],\n      \"allocation\": {\n        \"strategy\": \"compensate\",\n        \"locks\": [\n          {\n            \"assetId\": \"house\",\n            \"heirId\": \"wife:0\"\n          }\n        ]\n      },\n      \"pdf\": {\n        \"language\": \"en\"\n      }\n    }\n  ]\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "Get estate",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Authorization",
            "value": "Bearer {{apiKey}}"
          },
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/estates/{{estateId}}",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "estates",
            "{{estateId}}"
          ]
        }
      }
    },
    {
      "name": "Get PDF link",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Authorization",
            "value": "Bearer {{apiKey}}"
          },
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/estates/{{estateId}}/pdf",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "estates",
            "{{estateId}}",
            "pdf"
          ]
        }
      }
    },
    {
      "name": "Register webhook",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Authorization",
            "value": "Bearer {{apiKey}}"
          },
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/webhooks",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "webhooks"
          ]
        },
        "body": {
          "mode": "raw",
          "raw": "{\n  \"url\": \"https://example.com/hooks/faraidpro\",\n  \"events\": [\n    \"estate.computed\"\n  ]\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "List webhooks",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Authorization",
            "value": "Bearer {{apiKey}}"
          },
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/webhooks",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "webhooks"
          ]
        }
      }
    },
    {
      "name": "Usage",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Authorization",
            "value": "Bearer {{apiKey}}"
          },
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/usage",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "usage"
          ]
        }
      }
    }
  ]
}
