Skip to main content

REST API & Webhooks Reference

The Osmyka platform exposes a lightweight, authenticated REST API and Webhook subscription system for integrating external accounting software, ERPs, inventory catalogs, and custom dashboards.


šŸ”‘ Authentication​

All API requests must include your secret API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

šŸ“” Endpoints​

1. Create a New Booking​

POST /api/v1/bookings

Request Payload
{
"serviceId": "svc_oil_filter_change",
"clientName": "Alexandre Kallas",
"clientPhone": "+372 555 12345",
"clientEmail": "[email protected]",
"vehiclePlate": "123 ABC",
"requestedTimestamp": "2026-09-01T10:00:00Z",
"notes": "Please also inspect front brake pads."
}
Response (201 Created)
{
"status": "confirmed",
"bookingId": "bk_987654",
"assignedLiftId": "lift-1",
"scheduledTime": "2026-09-01T10:00:00Z",
"smsSent": true
}

2. Query Work Order Status​

GET /api/v1/orders/{orderId}

Response (200 OK)
{
"orderId": "wo_2026_0891",
"plate": "123 ABC",
"stage": "in_progress",
"currentStep": "Engine oil draining & new filter replacement",
"assignedMechanic": "Dmitri S.",
"estimatedCompletion": "2026-09-01T11:30:00Z",
"totalDueEur": 124.00,
"vatIncludedEur": 24.00
}

šŸŖ Webhook Events​

Configure webhook endpoints in your dashboard to receive real-time HTTP POST notifications when events occur:

Event NameTrigger Condition
booking.createdNew appointment booked online by a customer
order.status_changedWork order advanced to next stage (e.g. Diagnostics → Repairing)
order.completedQuality check passed, invoice generated, ready for pickup
invoice.paidClient settled invoice via online link or bank terminal
Webhook Payload Example (order.status_changed)
{
"event": "order.status_changed",
"timestamp": "2026-09-01T10:45:12Z",
"data": {
"orderId": "wo_2026_0891",
"previousStage": "waiting_for_parts",
"newStage": "in_progress",
"notes": "Brembo brake pads delivered by courier."
}
}