Reference pro vývojáře
API dokumentace
Budujte integrace s platformou NearbyAssist. RESTful endpointy, konzistentní JSON odpovědi a komplexní pokrytí pro rezervace, zprávy, fakturaci a další.
Základní URL
https://api.nearbyassist.comAutentifikace
Bearer token přes hlavičku Authorization
Limity požadavků
500 req/15 min (globálně), 20 req/15 min (autentifikační endpointy)
Formát
JSON požadavky/odpovědi. Kódování UTF-8. Data ISO 8601.
Autentifikace
Všechny autentifikované endpointy vyžadují Bearer token v hlavičce Authorization. Token získáte přihlášením přes POST /api/auth/signin. Pro partnerské integrace použijte API klíč s hlavičkou X-API-Key.
# Session token (user authentication)
curl https://api.nearbyassist.com/api/users/profile \
-H "Authorization: Bearer <access_token>"
# API key (partner integration)
curl https://api.nearbyassist.com/api/integrations/partner/bookings \
-H "X-API-Key: na_live_..."
Získejte svůj API klíč
Vygenerujte API klíče z dashboardu Integrace. Klíče používají prefix na_live_ a podporují omezená oprávnění (bookings:read, bookings:write atd.). Celý klíč se zobrazí pouze jednou při vytvoření.
Autentifikace
(3 endpointů)Uživatelé
(3 endpointů)Firmy
(7 endpointů)Rezervace
(8 endpointů)Služby
(4 endpointů)Recenze a otázky
(6 endpointů)Zprávy
(5 endpointů)Fakturace a platby
(6 endpointů)Personál
(5 endpointů)Integrace
(7 endpointů)Webhooky
(3 endpointů)Chybové odpovědi
Všechny chyby vrátí JSON tělo s error a volitelným polem errors pro selhání validace.
{
"error": "Validation failed",
"errors": [
{ "field": "email", "message": "Email is required" },
{ "field": "password", "message": "Minimum 8 characters" }
]
}| Kód | Stav | Popis |
|---|---|---|
| 200 | OK | Request succeeded. |
| 201 | Created | Resource created successfully. |
| 400 | Bad Request | Invalid request body or query parameters. |
| 401 | Unauthorized | Missing or invalid authentication token. |
| 403 | Forbidden | Authenticated but lacking permission for this resource. |
| 404 | Not Found | Resource does not exist. |
| 409 | Conflict | Resource conflict (e.g. duplicate booking slot). |
| 422 | Unprocessable Entity | Validation failed. Check the errors array in the response. |
| 429 | Too Many Requests | Rate limit exceeded. Retry after the Retry-After header value. |
| 500 | Internal Server Error | Unexpected error. Contact support if persistent. |
Stránkování
Seznamové endpointy podporují stránkování na základě kurzoru pomocí parametrů page a limit. Výchozí limit je 20, maximum je 100.
GET /api/bookings/my-bookings?page=2&limit=10
{
"bookings": [...],
"total": 47,
"page": 2,
"limit": 10
}Události webhooků
Zaregistrujte webhook endpointy pro příjem upozornění v reálném čase. Všechna data obsahují hlavičku X-NearbyAssist-Signature pro ověření pomocí HMAC-SHA256.
booking.createdA new booking is confirmed.booking.updatedBooking status or time changed.booking.cancelledA booking was cancelled.lead.receivedNew lead available for your business.lead.acceptedA lead was accepted and charged.review.createdNew review posted for your business.message.receivedInbound message from any channel.payment.completedA payment was processed successfully.// Verify webhook signature
const crypto = require('crypto');
const signature = req.headers['x-nearbyassist-signature'];
const expected = crypto
.createHmac('sha256', webhookSecret)
.update(JSON.stringify(req.body))
.digest('hex');
if (signature !== expected) {
return res.status(401).json({ error: 'Invalid signature' });
}Integration Guide
Step-by-step walkthrough for OAuth, API keys, and common integration scenarios.
OpenAPI Spec
Download the OpenAPI 3.0 YAML spec. Import into Swagger UI or code generators.
Postman Collection
Pre-configured Postman collection with all endpoints ready to test.
Need help integrating?
Our developer support team is available to help with integration questions, debugging, and best practices.