This API allows you to create and retrieve short links to geographic locations. To post you need a valid API Key.
OpenAPI Specification: Download / View YAML
Full documentation: View in browser
Create a short link from latitude and longitude. All requests require a valid API key via the Authorization: Bearer <API_KEY> HTTP header.
Headers:
Authorization: Bearer <API_KEY> Content-Type: application/json
Request Body (JSON):
{
"lat": 40.689989,
"lng": -74.045144
}
Example cURL:
curl -X POST https://api.pinpl.ac/shorten \
-H "Content-Type: application/json" \
-H "Authorization: Bearer DEMO1234567890" \
-d '{"lat":40.689989,"lng":-74.045144}'
Response:
{
"url":"https://pinpl.ac/abcde",
"code":"abcde"
}
Retrieve coordinates for a given code generated with POST. Requires a valid API key in the Authorization header.
Example:
GET https://api.pinpl.ac/resolve/abcde
Headers:
Authorization: Bearer YOUR_API_KEY
Example cURL:
curl -H "Authorization: Bearer DEMO1234567890" https://api.pinpl.ac/resolve/abcde
Response:
{
"latitude": 40.689989,
"longitude": -74.045144
}
DEMO1234567890) return dummy data only