DriveX
DriveX

Preferencat

Light Mode
DriveX for Developers

Open API v1

Integroni disponueshmërinë e makinave, bllokoni data, dhe sinkronizoni rezervimet me platformën tuaj.

Autentifikimi

DriveX API përdor API Keys për autentifikim. Çdo kompani mund të gjenerojë deri në 5 API keys nga paneli i kompanisë.

Për Lexim (GET)

Dërgo API Key në header

X-API-Key: drvx_abc123...

Për Shkrim (POST/DELETE)

Dërgo API Key + Secret

X-API-Key: drvx_abc123...
X-API-Secret: drvx_secret_xyz...

Quickstart

Testoni API-në në 30 sekonda me cURL:

1. Merrni listën e makinave:

curl -H "X-API-Key: YOUR_API_KEY" \
  https://api.drivex.al/api/v1/cars

2. Kontrolloni disponueshmërinë:

curl -H "X-API-Key: YOUR_API_KEY" \
  "https://api.drivex.al/api/v1/cars/CAR_ID/availability?startDate=2026-05-01&endDate=2026-05-05"

3. Bllokoni data (kur makina merret me qera në platformën tjetër):

curl -X POST \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "X-API-Secret: YOUR_SECRET" \
  -H "Content-Type: application/json" \
  -d '{"startDate":"2026-05-01","endDate":"2026-05-05","reason":"Booked on Platform X"}' \
  https://api.drivex.al/api/v1/cars/CAR_ID/block

4. iCal URL (importoni në Google Calendar ose platformën tuaj):

https://api.drivex.al/api/v1/cars/CAR_ID/ical?key=YOUR_API_KEY

Rate Limiting

Çdo API key ka limit 100 kërkesa/minutë (default).

X-RateLimit-Limit — Limiti total

X-RateLimit-Remaining — Kërkesa të mbetura

X-RateLimit-Reset — Kur risetëohet (unix timestamp)

Nëse kaloni limitin, merrni 429 Too Many Requests.

Endpoints

Base URL: https://api.drivex.al/api/v1

Makinat

Bllokimi i Datave

Rezervimet

iCal Sync

Error Codes

CodeHTTPDescription
API_KEY_REQUIRED401Mungon X-API-Key header
INVALID_API_KEY401Key i pavlefshëm ose i çaktivizuar
API_SECRET_REQUIRED401Mungon X-API-Secret për write ops
INVALID_API_SECRET401Secret i gabuar
INSUFFICIENT_PERMISSIONS403Key nuk ka lejen e duhur
RATE_LIMIT_EXCEEDED429Tejkaluar limiti i kërkesave
CAR_NOT_FOUND404Makina nuk u gjet ose nuk i përket kompanisë
MISSING_DATES400startDate dhe endDate janë të detyrueshme

Keni nevojë për ndihmë?

Kontaktoni ekipin tonë të zhvillimit për çdo pyetje rreth API-së

    Updating rates