Partner API

Use Plan Overview from your own website.

Send a verified mobile number and we create the buyer's account and layouts under it. Upload layouts, track plot sales and take layout payments, with the same prices and rules as this app.

Before you start

API key

The app owner adds a secret named PARTNER_API_KEY and shares it with you privately. Send it on every request.

Server only

Call the API from your website's server, never from the visitor's browser, so the key stays secret. Only send mobile numbers you have verified by OTP.

Base address

https://energetic-egret-33.convex.site/partner/v1

Header on every request

Authorization: Bearer YOUR_KEY

Typical flow

  1. 1The buyer verifies their mobile number on your website (OTP).
  2. 2Call POST /users with that number.
  3. 3Call POST /layouts with the picture, location and acres. Note the layout id and billing.
  4. 4If billing is "due", call POST /pay and send the buyer to checkoutUrl. Save orderId.
  5. 5When the buyer returns, call GET /payment. "paid" means the layout is unlocked.
  6. 6Update plot sales any time with POST /plots/status.
  7. 7Optional: call POST /link so the buyer can open their layouts in this app.

No mobile number? The buyer simply signs up on this app with the normal Sign In button.

Endpoints

POST/users

Create or find a buyer's account

Send a mobile number your website has verified by OTP. The same number always finds the same account.

  • mobile10-digit Indian mobile number (+91, 0 or spaces are fine)
  • nameoptionalBuyer's name

Example

curl -X POST https://energetic-egret-33.convex.site/partner/v1/users \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"mobile":"9876543210","name":"Asha Patil"}'

Reply

{ "mobile": "+919876543210", "created": true, "freeLayoutAvailable": true }
GET/layouts?mobile=...

List the buyer's layouts

Every layout under this mobile number, with its area, price and paid status.

Example

curl "https://energetic-egret-33.convex.site/partner/v1/layouts?mobile=9876543210" \
  -H "Authorization: Bearer YOUR_KEY"

Reply

{ "layouts": [ { "id": "abc123", "name": "Green Acres", "billing": "due", "acres": 3, "pricePaise": 100000 } ] }
POST/layouts

Upload a new layout

Send as a form upload (multipart/form-data) with the layout picture.

  • mobileBuyer's mobile number
  • nameLayout name
  • lat, lngMap position of the picture's centre
  • widthMWidth of the picture on the ground, in metres
  • areaAcresLand area in acres (sets the price)
  • rotationoptionalTurn in degrees, default 0
  • opacityoptional0 to 1, default 0.9
  • imageJPG, PNG or WebP, up to 15 MB

Example

curl -X POST https://energetic-egret-33.convex.site/partner/v1/layouts \
  -H "Authorization: Bearer YOUR_KEY" \
  -F mobile=9876543210 -F name="Green Acres" \
  -F lat=19.99 -F lng=73.78 -F widthM=300 -F areaAcres=3 \
  -F image=@layout.jpg

Reply

{ "layout": { "id": "abc123", "name": "Green Acres", "billing": "due", "acres": 3, "pricePaise": 100000 } }
GET/layout?mobile=...&id=...

Read one layout with its plots

The layout's price, paid status and every plot with its number, area and sales status.

Example

curl "https://energetic-egret-33.convex.site/partner/v1/layout?mobile=9876543210&id=abc123" \
  -H "Authorization: Bearer YOUR_KEY"

Reply

{ "layout": { "id": "abc123", "billing": "paid", ... }, "plots": [ { "number": "12", "status": "sold", ... } ] }
POST/plots/status

Change plot sales status

Works only when the layout is free or paid. Send either one line of text or one plot.

  • mobileBuyer's mobile number
  • idLayout id
  • textoptionalSame one-line text as the app, e.g. "sold 1-5, booked 7"
  • number + statusoptionalOne plot number and available, booked or sold

Example

curl -X POST https://energetic-egret-33.convex.site/partner/v1/plots/status \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"mobile":"9876543210","id":"abc123","number":"12","status":"sold"}'

Reply

{ "plots": [ ... ] }
POST/pay

Get a PhonePe payment link

Send the buyer to checkoutUrl and save orderId. Replies alreadyUnlocked: true if nothing is due.

  • mobileBuyer's mobile number
  • idLayout id
  • returnUrlhttps:// page to come back to after paying

Example

curl -X POST https://energetic-egret-33.convex.site/partner/v1/pay \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"mobile":"9876543210","id":"abc123","returnUrl":"https://yoursite.com/paid"}'

Reply

{ "alreadyUnlocked": false, "checkoutUrl": "https://...", "orderId": "ord_1", "amountPaise": 100000 }
GET/payment?mobile=...&orderId=...

Check a payment

Replies pending, paid or failed. A paid fee unlocks the layout.

Example

curl "https://energetic-egret-33.convex.site/partner/v1/payment?mobile=9876543210&orderId=ord_1" \
  -H "Authorization: Bearer YOUR_KEY"

Reply

{ "orderId": "ord_1", "status": "paid" }
POST/link

Let the buyer sign in to this app

A one-time code, valid 30 minutes. The buyer opens the link, signs in and confirms; their layouts move to My layouts.

  • mobileBuyer's mobile number
  • appUrloptionalThis app's https:// web address, to build a ready link

Example

curl -X POST https://energetic-egret-33.convex.site/partner/v1/link \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"mobile":"9876543210","appUrl":"https://your-app.onhercules.app"}'

Reply

{ "code": "ABCD2345EF", "expiresAt": "2026-12-05T10:30:00.000Z", "linkUrl": "https://.../link?code=ABCD2345EF" }

Billing status

Prices are in paise (100 paise = Rs 1).

  • freeThe buyer's first layout, up to 2 acres.
  • duePayment needed. First acre free, then Rs 500 per extra acre.
  • paidFee paid, all tools unlocked.

Errors

Every reply is JSON. Errors have a message you can show the buyer:

{ "error": { "code": "PAYMENT_REQUIRED", "message": "Pay for this layout to use plot detection, sales tracking and exports." } }
  • 400A field is missing or wrong.
  • 401Missing or wrong API key.
  • 402This layout must be paid first.
  • 404No account, layout or payment for that mobile number.
  • 409Conflict, e.g. a link code already used.
  • 502The payment or layout service did not answer. Try again.
  • 503The API is not switched on yet (no key added).