{
  "info": {
    "name": "Lawneu App API",
    "_postman_id": "9c3b6e5b-6c26-4ed4-8b87-lawneuappapi",
    "description": "Lawneu Booking and Advocate App API collection. Set collection variables before running.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://page.law.indias.cloud/api/v1"
    },
    {
      "key": "masterKey",
      "value": "SET_IN_POSTMAN"
    },
    {
      "key": "advocateId",
      "value": "1"
    },
    {
      "key": "caseId",
      "value": "CASE-1234"
    },
    {
      "key": "txnReferenceId",
      "value": "TXN-1234"
    },
    {
      "key": "advocateMobile",
      "value": "919999999999"
    },
    {
      "key": "countryCode",
      "value": "IN"
    },
    {
      "key": "countryName",
      "value": "India"
    },
    {
      "key": "currencyCode",
      "value": "INR"
    }
  ],
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{masterKey}}",
        "type": "string"
      }
    ]
  },
  "item": [
    {
      "name": "Advocates",
      "item": [
        {
          "name": "Check Subdomain",
          "request": {
            "method": "GET",
            "url": "{{baseUrl}}/subdomains/check?subdomain=adv-sharma"
          }
        },
        {
          "name": "Create Advocate Website",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Master-Key",
                "value": "{{masterKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\"subdomain\":\"adv-sharma\",\"advocateName\":\"Adv. Sharma\",\"tagline\":\"Clear legal guidance\",\"bio\":\"Civil and property matters\",\"experience\":\"5+ Years\",\"court\":\"District Court\",\"education\":\"LL.B\",\"approach\":\"Client-first\",\"countryCode\":\"{{countryCode}}\",\"countryName\":\"{{countryName}}\",\"state\":\"Delhi\",\"city\":\"New Delhi\",\"county\":\"Central Delhi\",\"defaultCurrency\":\"{{currencyCode}}\",\"contactPhone\":\"+91 98765 43210\",\"contactEmail\":\"adv@example.com\",\"contactAddress\":\"Delhi\",\"createMailAccount\":true}"
            },
            "url": "{{baseUrl}}/advocates/create"
          }
        },
        {
          "name": "Update Advocate Profile",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Master-Key",
                "value": "{{masterKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\"advocate_id\":{{advocateId}},\"name\":\"Advocate Arjun Mehta\",\"tagline\":\"Updated legal guidance\",\"countryCode\":\"{{countryCode}}\",\"countryName\":\"{{countryName}}\",\"state\":\"Delhi\",\"city\":\"New Delhi\",\"defaultCurrency\":\"{{currencyCode}}\",\"isAcceptingBookings\":true}"
            },
            "url": "{{baseUrl}}/advocates/update"
          }
        },
        {
          "name": "Get Advocate Profile",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Master-Key",
                "value": "{{masterKey}}"
              }
            ],
            "url": "{{baseUrl}}/advocates/profile?advocate_id={{advocateId}}"
          }
        },
        {
          "name": "Services Create Or Update",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Master-Key",
                "value": "{{masterKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\"advocate_id\":{{advocateId}},\"title\":\"Civil Law\",\"description\":\"Civil disputes and property matters\",\"iconUrl\":\"https://example.com/icon.png\"}"
            },
            "url": "{{baseUrl}}/advocates/services"
          }
        },
        {
          "name": "Gallery Update URLs",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Master-Key",
                "value": "{{masterKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\"advocate_id\":{{advocateId}},\"gallery_urls\":[\"https://example.com/photo1.jpg\",\"https://example.com/photo2.jpg\"]}"
            },
            "url": "{{baseUrl}}/advocates/gallery"
          }
        }
      ]
    },
    {
      "name": "Cases And Orders",
      "item": [
        {
          "name": "Initiate Case",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Master-Key",
                "value": "{{masterKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\"clientName\":\"Ravi Kumar\",\"advocateId\":\"{{advocateId}}\",\"title\":\"Property consultation\",\"category\":\"Civil\",\"initialDescription\":\"Need advice\",\"countryCode\":\"{{countryCode}}\",\"countryName\":\"{{countryName}}\",\"state\":\"Delhi\",\"city\":\"New Delhi\",\"currencyCode\":\"{{currencyCode}}\",\"agreedRetainerAmount\":2500}"
            },
            "url": "{{baseUrl}}/cases/initiate"
          }
        },
        {
          "name": "My Cases",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Master-Key",
                "value": "{{masterKey}}"
              }
            ],
            "url": "{{baseUrl}}/cases/my-cases?advocate_id={{advocateId}}"
          }
        },
        {
          "name": "Case Payment Status",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Master-Key",
                "value": "{{masterKey}}"
              }
            ],
            "url": "{{baseUrl}}/cases/payment?caseId={{caseId}}"
          }
        },
        {
          "name": "Update Case Payment Ledger",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Master-Key",
                "value": "{{masterKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\"caseId\":\"{{caseId}}\",\"paymentTotal\":50000,\"paymentPaid\":20000,\"currencyCode\":\"{{currencyCode}}\",\"countryCode\":\"{{countryCode}}\",\"countryName\":\"{{countryName}}\"}"
            },
            "url": "{{baseUrl}}/cases/payment"
          }
        },
        {
          "name": "Add Case Receipt",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Master-Key",
                "value": "{{masterKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\"caseId\":\"{{caseId}}\",\"label\":\"Retainer Deposit Received\",\"amount\":20000,\"currencyCode\":\"{{currencyCode}}\",\"countryCode\":\"{{countryCode}}\",\"countryName\":\"{{countryName}}\",\"date\":\"2026-06-19\",\"method\":\"UPI\",\"note\":\"Client advance\"}"
            },
            "url": "{{baseUrl}}/cases/receipts"
          }
        },
        {
          "name": "Create Pairing",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Master-Key",
                "value": "{{masterKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\"action\":\"create\",\"caseId\":\"{{caseId}}\",\"clientName\":\"Ravi Kumar\",\"clientMobile\":\"918888888888\"}"
            },
            "url": "{{baseUrl}}/cases/pairing"
          }
        },
        {
          "name": "Add Case File Metadata",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Master-Key",
                "value": "{{masterKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\"caseId\":\"{{caseId}}\",\"fileName\":\"petition.pdf\",\"storagePath\":\"https://example.com/petition.pdf\",\"uploadedBy\":\"ADVOCATE\"}"
            },
            "url": "{{baseUrl}}/cases/files"
          }
        }
      ]
    },
    {
      "name": "Payments",
      "item": [
        {
          "name": "Initiate Payment",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Master-Key",
                "value": "{{masterKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\"advocate_id\":{{advocateId}},\"caseId\":\"{{caseId}}\",\"amount\":500,\"currencyCode\":\"{{currencyCode}}\",\"countryCode\":\"{{countryCode}}\",\"countryName\":\"{{countryName}}\",\"transactionPurpose\":\"Consultation\",\"paymentGatewayMode\":\"UPI\"}"
            },
            "url": "{{baseUrl}}/payments/initiate"
          }
        },
        {
          "name": "Payment Detail",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Master-Key",
                "value": "{{masterKey}}"
              }
            ],
            "url": "{{baseUrl}}/payments/detail?txnReferenceId={{txnReferenceId}}"
          }
        },
        {
          "name": "Update Payment Status",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Master-Key",
                "value": "{{masterKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\"txnReferenceId\":\"{{txnReferenceId}}\",\"status\":\"SUCCESS\"}"
            },
            "url": "{{baseUrl}}/payments/update-status"
          }
        },
        {
          "name": "Initiate Payout",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Master-Key",
                "value": "{{masterKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\"payoutAmount\":500,\"currencyCode\":\"{{currencyCode}}\",\"countryCode\":\"{{countryCode}}\",\"countryName\":\"{{countryName}}\",\"targetPayoutType\":\"UPI\",\"upiId\":\"advocate@upi\"}"
            },
            "url": "{{baseUrl}}/payments/payout"
          }
        }
      ]
    },
    {
      "name": "AI Draft",
      "item": [
        {
          "name": "Generate AI Draft",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Master-Key",
                "value": "{{masterKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\"draftType\":\"LEGAL_NOTICE\",\"statePartiesDetail\":\"Client vs opposite party facts\",\"specificClausesOverride\":\"Add payment demand clause\",\"countryCode\":\"{{countryCode}}\",\"countryName\":\"{{countryName}}\"}"
            },
            "url": "{{baseUrl}}/ai/generate-draft"
          }
        }
      ]
    },
    {
      "name": "Booking Inbox And Legal Requests",
      "item": [
        {
          "name": "Message List",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Master-Key",
                "value": "{{masterKey}}"
              }
            ],
            "url": "{{baseUrl}}/messages.php?action=list"
          }
        },
        {
          "name": "Reply Message",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Master-Key",
                "value": "{{masterKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\"booking_id\":15,\"message\":\"Thank you. We can schedule your consultation tomorrow.\"}"
            },
            "url": "{{baseUrl}}/messages.php?action=reply"
          }
        },
        {
          "name": "Create Legal Request",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\"advocate_mobile\":\"{{advocateMobile}}\",\"client_name\":\"Ravi Kumar\",\"client_mobile\":\"918888888888\",\"client_email\":\"client@example.com\",\"client_country\":\"India\",\"client_state\":\"Delhi\",\"client_city\":\"New Delhi\",\"legal_issue\":\"Property dispute\",\"details\":\"Need help reviewing property documents.\"}"
            },
            "url": "{{baseUrl}}/legal_requests.php?action=create"
          }
        },
        {
          "name": "List Legal Requests",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Master-Key",
                "value": "{{masterKey}}"
              }
            ],
            "url": "{{baseUrl}}/legal_requests.php?action=list"
          }
        }
      ]
    }
  ]
}
