Connect other software
A key lets another program read your Dock records. It can read. It can never change anything.
Make a key
The owner opens Tools, then Connect other software, gives the key a name, and copies it. Dock shows the key once. If it is lost, remove it and make a new one. Up to 10 keys.
Use it
Send the key in a header on each request. Everything comes back as JSON.
curl https://app.dockindia.com/api/items -H "Authorization: Bearer dk_your_key"
- Money is in paise: 100 paise is one rupee.
- Dates are written 2026-11-25.
- A key that tries to add or change anything gets a 403 answer.
- The owner can remove a key at any time, and it stops at once.
What you can read
- /api/items and /api/stock: what you sell and what is on the shelves.
- /api/customers, /api/invoices and /api/payments: who owes you what.
- /api/trips and /api/expenses: deliveries and fleet spends.
- /api/valuation: stock value by the method you chose.
- /api/forecast: when stock runs out and when customers will pay.
- /api/records?kind=lead, asset, candidate, kit, pricelist, maint, downtime, rate: the smaller records.
Send truck positions from a GPS box
A GPS box fitted in a truck, including AIS-140 boxes, can report to Dock through its maker's platform or a Traccar server. The owner opens Tools, Truck GPS trackers, adds the truck, and copies the address Dock shows. The address carries a private token, so it needs no key in a header.
curl -X POST https://app.dockindia.com/api/gps/your_tracker_token -H "Content-Type: application/json" -d '{"latitude": 18.52, "longitude": 73.85}'
- Send one position, a list, or a list under "points" or "positions". The newest one counts.
- The fields can be lat and lng, lat and lon, or latitude and longitude. A time can be ts, time, timestamp or fixTime.
- A position outside India is refused. A truck with no trip on the road simply ignores it.
- Within 400 metres of the next stop, Dock marks the stop as arrived once and tells the owner and managers.
- Boxes that only open an address can use GET with lat and lon in the address.
Limits
A key reads as the owner, so keep it private. It cannot write. If you need other software to add records, tell us what it needs.