PAHUNCH
Mock Engine Active

Pahunch Operating Network APIs

Complete domain-centric mock server instances online for corridor development (Panchgani - Mahabaleshwar - Wai). Organized into 8 functional operating blocks.
Pahunch Trust (Identity & Compliance)
POST /auth/otp/send

Initiate OTP authentication. Sends a 6-digit verification code to the customer or runner.

curl -X POST http://localhost:3000/v1/auth/otp/send \ -H "Content-Type: application/json" \ -H "Idempotency-Key: c619d288-e6e6-4fea-98a6-d0f01e280835" \ -d '{"phone": "+919876543210"}'
POST /auth/otp/verify

Verify OTP and Bind Device. Returns a Bearer JWT, locking session to a hardware fingerprint.

curl -X POST http://localhost:3000/v1/auth/otp/verify \ -H "Content-Type: application/json" \ -H "Idempotency-Key: 2a440a85-d99a-43e0-a0d6-9773bc89b62b" \ -d '{"session_id": "d2ff7316-dfd7-45f3-a857-962d26abcb70", "code": "123456", "device_fingerprint": "mac-m3-xyz"}'
Pahunch Store (Merchant Catalog OS)
GET /merchants/:id/catalog

Retrieve merchant catalog. Returns full item inventory available for consumer ordering.

curl -i http://localhost:3000/v1/merchants/8abe1a87-e60a-4854-bd37-8e743a8b20ba/catalog
PATCH /merchants/:id/catalog/items/:itemId

Toggle item stock availability. Allows merchants to temporarily flag items out-of-stock.

curl -X PATCH http://localhost:3000/v1/merchants/ea0f62ab-f665-42ac-9bad-e108fa7a1724/catalog/items/33903933-c539-4a20-8737-67bcfed9084f \ -H "Content-Type: application/json" \ -d '{"in_stock": false}'
Pahunch Fetch (Order & Task Engine)
POST /tasks

Create Custom Errand Task. Creates an open errand task with instructions and budget caps.

curl -X POST http://localhost:3000/v1/tasks \ -H "Content-Type: application/json" \ -H "Idempotency-Key: a245cd89-b3cf-4810-b428-b2df448a7191" \ -d '{"requester_id": "5860994f-0a08-4cc7-b084-a687068ee92c", "type": "open_task", "instructions": "Get ice cream from Star Pharmacy", "budget_cap_paise": 10000, "source_channel": "app"}'
POST /orders

Place Catalog Order. Creates a structured food/grocery order from a merchant catalog.

curl -X POST http://localhost:3000/v1/orders \ -H "Content-Type: application/json" \ -H "Idempotency-Key: c9ca7d76-e4d4-4d5a-b50f-31de90fde794" \ -d '{"customer_id": "1184e3bf-706b-42b9-97ae-963f8a5c04d2", "merchant_id": "93d61327-dfd6-4391-88c2-4ae4a71607f2", "items": [{"item_id": "78bad835-eccc-4e5d-ae2e-2b1ddfd77385", "qty": 2}]}'
Pahunch Quote (Terrain Pricing Engine)
POST /quotes/estimate

Generate Terrain-Aware Quote. Computes estimates incorporating dynamic hill slope and weather modifiers.

curl -X POST http://localhost:3000/v1/quotes/estimate \ -H "Content-Type: application/json" \ -H "Idempotency-Key: 05e77ef1-9336-4b87-8b41-eec643425089" \ -d '{"pickup_lat": 17.9258, "pickup_lng": 73.8016, "drop_lat": 17.9301, "drop_lng": 73.8122, "slope_degrees": 12}'
Pahunch Tower (Dispatch & Match)
POST /dispatch/match

Match Nearby Runners. Queries closest active eligible runners using PostGIS coordinates.

curl -X POST http://localhost:3000/v1/dispatch/match \ -H "Content-Type: application/json" \ -H "Idempotency-Key: b0af76f7-c985-4e0a-a4f2-f27886765b7c" \ -d '{"lat": 17.9258, "lng": 73.8016}'
POST /assignments/:id/proof

Upload Delivery Proof. Uploads verified photos or OTP codes to Cloudflare R2 bucket.

curl -X POST http://localhost:3000/v1/assignments/f019ece0-c2ac-4e4a-b6fc-30a8fe70dce0/proof \ -H "Content-Type: application/json" \ -H "Idempotency-Key: 89a26d6b-aa38-4992-bf24-ec4d35dfffbd" \ -d '{"proof_type": "DROP_PHOTO", "file_url": "https://r2.pahunch.co.in/proofs/p_001.jpg"}'
Pahunch Ledger (Finance & Double-Entry)
POST /b2c/payment-intents

Create B2C Payment Intent. Initiates a payment hold via Razorpay covering estimate + buffer.

curl -X POST http://localhost:3000/v1/b2c/payment-intents \ -H "Content-Type: application/json" \ -H "Idempotency-Key: 2c985e6d-7bdf-4bcb-a21e-ce075f2d4b66" \ -d '{"customer_id": "b095e320-e947-439e-a3f4-d31cb4f1bcaf", "task_id": "b712ba01-5e10-4ad5-ad6c-95ce883e6b53", "estimated_amount_paise": 9900}'
POST /ledger/transactions

Post General Ledger Transaction. Maker-Checker protected double-entry balanced posting.

curl -X POST http://localhost:3000/v1/ledger/transactions \ -H "Content-Type: application/json" \ -H "Idempotency-Key: ecfe2f9f-9ca9-4b99-b68e-e610326b8676" \ -d '{"narration": "Daily payout", "entries": [{"account_code": "1100-AR", "dr_amount_paise": 4900, "cr_amount_paise": 0}, {"account_code": "4100-PLATFORM-REVENUE", "dr_amount_paise": 0, "cr_amount_paise": 4900}]}'
Pahunch Credit (AR & Invoicing)
POST /ar/pre-dispatch-check

B2B Credit check. Verifies active available credit limits prior to B2B dispatch.

curl -X POST http://localhost:3000/v1/ar/pre-dispatch-check \ -H "Content-Type: application/json" \ -H "Idempotency-Key: 985e6351-84da-4353-9a4b-482a6d0c3376" \ -d '{"b2b_contract_id": "d2c6df4b-b70f-444c-aadd-684a429ef5a5", "estimated_expense_paise": 150000}'