{"openapi":"3.1.0","info":{"title":"Bytriq Public API","version":"2026-11-27","summary":"Orders, menus, bookings, repair tracking, attendance, and posted sales for a Bytriq shop.","description":"Amounts are integer paise. A restaurant pre-order has no tableId and waits for the shop to accept it. A table order includes tableId. The sales endpoint is the only call that needs an API key. Create that key in Settings → Account. Staff screens are not in this document."},"servers":[{"url":"https://bytriq.bytrionix.com"}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"Also accepted as the x-api-key header. The key starts with btq_."}}},"paths":{"/api/public/v1/{tenantId}/sales":{"get":{"operationId":"listPostedSales","summary":"List posted sales","description":"Returns the last 50 posted invoices for this shop. The address includes the shop id, and the key must belong to that shop. { tenantId, sales: [{ id, document_number, total_paise, tax_paise, status, posted_at }] }. Amounts are paise.","security":[{"apiKey":[]}],"responses":{"200":{"description":"{ tenantId, sales: [{ id, document_number, total_paise, tax_paise, status, posted_at }] }. Amounts are paise."},"400":{"description":"The request was refused. The JSON body contains error."},"401":{"description":"The API key is missing or does not match a shop."},"404":{"description":"The shop, table, order, or job was not found."}}}},"/api/public/restaurant/{slug}/menu":{"get":{"operationId":"getRestaurantMenu","summary":"Read a menu","description":"Dishes, groups, prices, and Make your own sections for a public menu link. Optional query tableId, a dining table UUID, when the guest is seated. { restaurant: { name, slug }, onlinePayment, table, categories: [{ id, name }], items: [{ id, name, pricePaise, categoryId, dietaryType, remaining, buildYourOwn }] }.","security":[],"responses":{"200":{"description":"{ restaurant: { name, slug }, onlinePayment, table, categories: [{ id, name }], items: [{ id, name, pricePaise, categoryId, dietaryType, remaining, buildYourOwn }] }."},"400":{"description":"The request was refused. The JSON body contains error."},"401":{"description":"The API key is missing or does not match a shop."},"404":{"description":"The shop, table, order, or job was not found."}}}},"/api/public/restaurant/{slug}/order":{"post":{"operationId":"placeRestaurantOrder","summary":"Place an order","description":"Places a pre-order, or a table order when tableId is set. Name and an Indian mobile are required. Prices come from the menu. { guestName, guestPhone, tableId?, payment?: \"due\" | \"paid\", lines: [{ itemId, quantity, optionIds? }] }. { orderId, orderNumber, kotNumber, awaitingAccept, notified }.","security":[],"responses":{"200":{"description":"{ orderId, orderNumber, kotNumber, awaitingAccept, notified }."},"400":{"description":"The request was refused. The JSON body contains error."},"401":{"description":"The API key is missing or does not match a shop."},"404":{"description":"The shop, table, order, or job was not found."}}},"get":{"operationId":"readRestaurantOrder","summary":"Read an order","description":"Status sentence for an order placed on that shop’s public link. Query orderId is required. { status, orderNumber, reason, stage, message, payment }.","security":[],"responses":{"200":{"description":"{ status, orderNumber, reason, stage, message, payment }."},"400":{"description":"The request was refused. The JSON body contains error."},"401":{"description":"The API key is missing or does not match a shop."},"404":{"description":"The shop, table, order, or job was not found."}}}},"/api/public/restaurant/{slug}/pay":{"post":{"operationId":"startGuestPayment","summary":"Pay for an order","description":"Starts a Razorpay order for a guest bill, or confirms the payment. The shop must have saved its own Razorpay keys. Start: { orderId, action?: \"start\" }. Confirm: { orderId, action: \"confirm\", razorpayOrderId, razorpayPaymentId, razorpaySignature, method?: \"upi\" | \"card\" }. Start: { keyId, gatewayOrderId, amountPaise, orderNumber }. Confirm: { ok, orderNumber, payment: \"paid\" }.","security":[],"responses":{"200":{"description":"Start: { keyId, gatewayOrderId, amountPaise, orderNumber }. Confirm: { ok, orderNumber, payment: \"paid\" }."},"400":{"description":"The request was refused. The JSON body contains error."},"401":{"description":"The API key is missing or does not match a shop."},"404":{"description":"The shop, table, order, or job was not found."}}}},"/api/public/salon/{slug}":{"get":{"operationId":"getSalonCatalog","summary":"Read a salon","description":"Active stylists and services for the public booking page. { salon: { name, slug }, stylists: [{ id, name }], services: [{ id, name, pricePaise, durationMinutes }] }.","security":[],"responses":{"200":{"description":"{ salon: { name, slug }, stylists: [{ id, name }], services: [{ id, name, pricePaise, durationMinutes }] }."},"400":{"description":"The request was refused. The JSON body contains error."},"401":{"description":"The API key is missing or does not match a shop."},"404":{"description":"The shop, table, order, or job was not found."}}}},"/api/public/salon/{slug}/availability":{"get":{"operationId":"getSalonAvailability","summary":"Read openings","description":"Open slots for one stylist on one date. The day runs 10:00 to 19:00. Query date (YYYY-MM-DD), resourceId, and optional durationMinutes. { slots }.","security":[],"responses":{"200":{"description":"{ slots }."},"400":{"description":"The request was refused. The JSON body contains error."},"401":{"description":"The API key is missing or does not match a shop."},"404":{"description":"The shop, table, order, or job was not found."}}}},"/api/public/salon/{slug}/book":{"post":{"operationId":"bookSalonAppointment","summary":"Book a visit","description":"Books a scheduled visit. A clash with an existing booking returns 409. { resourceId, startsAt, endsAt, clientName, clientPhone, notes?, services }. { ok, appointmentId, startsAt }.","security":[],"responses":{"200":{"description":"{ ok, appointmentId, startsAt }."},"400":{"description":"The request was refused. The JSON body contains error."},"401":{"description":"The API key is missing or does not match a shop."},"404":{"description":"The shop, table, order, or job was not found."}}}},"/api/public/repair/{slug}":{"get":{"operationId":"getRepairShop","summary":"Read a repair shop","description":"Confirms the public job-tracking page belongs to a repair shop. { shop: { name, slug } }.","security":[],"responses":{"200":{"description":"{ shop: { name, slug } }."},"400":{"description":"The request was refused. The JSON body contains error."},"401":{"description":"The API key is missing or does not match a shop."},"404":{"description":"The shop, table, order, or job was not found."}}}},"/api/public/repair/{slug}/track":{"post":{"operationId":"trackRepairJob","summary":"Track a job","description":"Returns one job when the job number and the client phone match. { documentNumber, phone }. { shopName, documentNumber, status, statusLabel, clientName, device, promisedAt, duePaise }.","security":[],"responses":{"200":{"description":"{ shopName, documentNumber, status, statusLabel, clientName, device, promisedAt, duePaise }."},"400":{"description":"The request was refused. The JSON body contains error."},"401":{"description":"The API key is missing or does not match a shop."},"404":{"description":"The shop, table, order, or job was not found."}}}},"/api/public/attend/{slug}":{"get":{"operationId":"listAttendanceStaff","summary":"List staff","description":"Names on the public attendance page for that shop. { businessName, staff: [{ id, name }] }.","security":[],"responses":{"200":{"description":"{ businessName, staff: [{ id, name }] }."},"400":{"description":"The request was refused. The JSON body contains error."},"401":{"description":"The API key is missing or does not match a shop."},"404":{"description":"The shop, table, order, or job was not found."}}},"post":{"operationId":"punchAttendance","summary":"Punch attendance","description":"Checks a staff member in or out for today. A second check-in before check-out is refused. { resourceId, action?: \"check_in\" | \"check_out\" }. { ok, action, staffName, businessName }.","security":[],"responses":{"200":{"description":"{ ok, action, staffName, businessName }."},"400":{"description":"The request was refused. The JSON body contains error."},"401":{"description":"The API key is missing or does not match a shop."},"404":{"description":"The shop, table, order, or job was not found."}}}}}}