API v1

Pinlo Developer Docs

Resolve verified GPS addresses, create pins, and integrate Pinlo into your delivery platform, e-commerce store, or mobile app.

Overview

The Pinlo API lets you programmatically create, resolve, and manage location pins. Each pin is a verified GPS coordinate with a permanent shareable link (like pinlo.pk/hasan).

There are two API layers:

API Auth Use Case
Enterprise API (v1) X-API-Key header Create, resolve, and manage pins for your platform
Public API None (some endpoints require JWT) Look up pins, check usernames, track views

Authentication

Enterprise API endpoints require an API key passed in the X-API-Key header. You can generate API keys from your Pinlo dashboard after your access request is approved.

# Include your API key in every request
curl https://pinlo.pk/api/v1/pins \
  -H "X-API-Key: pnl_your_api_key_here"

Keep your API key secret. Don't expose it in client-side code, public repos, or browser requests. Use it only from your backend server.

Base URL

All API requests are made to:

https://pinlo.pk/api

Enterprise endpoints are prefixed with /v1. Public endpoints are at the root /api level.

Errors

The API returns standard HTTP status codes with JSON error bodies.

Code Meaning
200 Success
201 Created
400 Bad request — check your parameters
401 Unauthorized — missing or invalid API key
404 Not found — pin or resource doesn't exist
422 Validation error — invalid field values
429 Rate limited — too many requests

Error responses include a detail field:

{
  "detail": "Username already taken"
}

Rate Limits

API keys have per-day and per-month request limits based on your plan tier.

Tier Daily Limit Monthly Limit
Business 1,000 requests/day 10,000 requests/month
Enterprise 5,000 requests/day 100,000 requests/month
Custom Contact us Contact us

When you exceed limits, the API returns 429 Too Many Requests. Usage counters are visible in your dashboard and reset daily/monthly.

Create Pin

POST /api/v1/pins Create a new location pin

Creates a new pin with a unique username. The pin is immediately active and accessible at pinlo.pk/{username}.

Request Body

FieldTypeDescription
username string required 3–30 chars, lowercase letters, numbers, hyphens. Must be unique.
name string required Display name for the pin (e.g. "Hasan's Home")
latitude float required -90 to 90
longitude float required -180 to 180
address string optional Human-readable address text
notes string optional Delivery instructions (e.g. "Ring doorbell twice")
category string optional personal or business. Default: personal
label string optional Custom label (e.g. "Home", "Office", "Warehouse")
business_name string optional Business name (for business category pins)
business_phone string optional Business phone number
business_hours string optional Operating hours

Example

cURL
JavaScript
Python
curl -X POST https://pinlo.pk/api/v1/pins \
  -H "X-API-Key: pnl_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "username": "hasan-home",
    "name": "Hasan'\''s Home",
    "latitude": 24.8607,
    "longitude": 67.0011,
    "address": "Block 5, Clifton, Karachi",
    "notes": "Gate 3, ring doorbell twice",
    "category": "personal"
  }'

Response

{
  "id": "a1b2c3d4-...",
  "pin_code": "PNL-X7K9M2",
  "username": "hasan-home",
  "name": "Hasan's Home",
  "latitude": 24.8607,
  "longitude": 67.0011,
  "address": "Block 5, Clifton, Karachi",
  "notes": "Gate 3, ring doorbell twice",
  "category": "personal",
  "is_active": true,
  "url": "https://pinlo.pk/hasan-home"
}

Resolve Pin

GET /api/v1/pins/{username} Get pin details by username

Resolves a Pinlo username to GPS coordinates, delivery notes, and confidence score. This is the core endpoint for checkout integrations — when a customer enters their Pinlo link, call this to get their exact location.

Example

curl https://pinlo.pk/api/v1/pins/hasan-home \
  -H "X-API-Key: pnl_your_key"

Response

{
  "username": "hasan-home",
  "name": "Hasan's Home",
  "latitude": 24.8607,
  "longitude": 67.0011,
  "address": "Block 5, Clifton, Karachi",
  "notes": "Gate 3, ring doorbell twice",
  "category": "personal",
  "confidence_score": 85,
  "is_verified": true,
  "access_level": "public",
  "url": "https://pinlo.pk/hasan-home"
}

List Pins

GET /api/v1/pins List all pins owned by your API key

Returns all pins created by your account, sorted by newest first.

Example

curl https://pinlo.pk/api/v1/pins \
  -H "X-API-Key: pnl_your_key"

Response

[
  {
    "username": "hasan-home",
    "name": "Hasan's Home",
    "pin_code": "PNL-X7K9M2",
    "latitude": 24.8607,
    "longitude": 67.0011,
    "address": "Block 5, Clifton, Karachi",
    "category": "personal",
    "url": "https://pinlo.pk/hasan-home"
  },
  ...
]

Delete Pin

DELETE /api/v1/pins/{username} Deactivate a pin you own

Deactivates a pin. The link will stop working but the data is preserved (can be reactivated from the dashboard). You can only delete pins owned by your account.

curl -X DELETE https://pinlo.pk/api/v1/pins/hasan-home \
  -H "X-API-Key: pnl_your_key"

Response

{ "status": "disabled" }

Get Pin (Public)

GET /api/pins/{identifier} Look up pin by username or PNL code

No authentication required. Look up any public pin by username or PNL code (e.g. PNL-X7K9M2). For protected pins, pass the access code as a query parameter.

# By username
curl https://pinlo.pk/api/pins/hasan-home

# By PNL code
curl https://pinlo.pk/api/pins/PNL-X7K9M2

# Protected pin (with access code)
curl https://pinlo.pk/api/pins/hasan-home?access_code=A3F1B9

Rate limited: 30 views per IP per pin per hour. If you need higher volume, use the Enterprise API.

Check Username

GET /api/check/{username} Check if a username is available

No authentication required. Returns whether a username is available for pin creation.

curl https://pinlo.pk/api/check/hasan-home

Response

{
  "username": "hasan-home",
  "available": false
}

Track View

POST /api/pins/{identifier}/view Record a pin view

Increments the view counter for a pin. Called by the frontend when someone opens a pin page.

Track Navigation

POST /api/pins/{identifier}/navigate Record a navigation event

Records when someone navigates to a pin (opens directions in Google Maps, etc.). Used for analytics and the rider earnings system.

Platform Stats

GET /api/stats Get platform-wide statistics

Public endpoint. Returns total and active pin counts for the platform.

{
  "total_pins": 1247,
  "active_pins": 1183
}

Checkout Widget

Embed Pinlo's pin-drop widget in your e-commerce checkout. The customer either enters their existing Pinlo link or drops a new pin on a map — and you get verified GPS coordinates.

Coming soon. The embeddable checkout widget and Shopify/WooCommerce plugins are currently in development. Register for early access to be notified when they launch.

How it will work

Two integration paths for checkout:

Flow How Result
Resolve Customer enters pinlo.pk/hasan at checkout Your server calls GET /api/v1/pins/hasan → gets GPS coordinates instantly
Create Customer drops pin on embedded map widget Widget calls POST /api/v1/pins → customer gets a permanent Pinlo link

The resolve flow works today with the Enterprise API. The embeddable widget for the create flow is coming soon.

Webhooks

Webhooks allow your server to receive real-time notifications when events happen on your pins.

Coming soon. Webhook support for pin verification events, navigation events, and access changes is in development. Register for early access.

Planned events

EventDescription
pin.verifiedPin was verified by the consignee
pin.navigatedSomeone navigated to a pin you created
pin.deactivatedA pin was deactivated
delivery.confirmedSuccessful delivery to a pin location

SDKs & Plugins

We're building official SDKs and plugins for common platforms:

PlatformStatusType
REST API✅ LiveDirect HTTP calls
JavaScript / Node.js🔜 Coming soonnpm package
Python🔜 Coming soonpip package
Shopify🔜 Coming soonApp Store plugin
WooCommerce🔜 Coming soonWordPress plugin
Flutter🔜 Coming soonDart package
React Native🔜 Coming soonnpm package

In the meantime, the REST API works with any language or platform. The examples above in cURL, JavaScript, and Python cover everything you need to get started.

Need help integrating? Email [email protected] and our team will help you set up. We also offer custom API integration support for enterprise partners.