Messenjer API
Panel ulangan Telegram, WhatsApp yoki Instagram akkaunt bilan qila oladigan hamma narsa — REST orqali: bitta kalit, bitta javob formati, bo'limma-bo'lim.
Bandlovlar
Xizmatlar, bo'sh vaqtlar va qabullar — «Vaqtga yozish» qadami ishlatadigan narsalar.
Base URL: https://chatvendor.net/api/v1 · har javob {"success": true, "data": …}
GET
/services
Bookable services (duration, price)
channels:read
Ruxsat: channels:read
Javob 200
OK
curl https://chatvendor.net/api/v1/services \
-H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
GET
/services/{service}/slots
Free time slots of a service on a date (?date=YYYY-MM-DD, Asia/Tashkent)
channels:read
Ruxsat: channels:read
Parametrlar
servicepath · integermajburiyService id
datequery · stringJavob 200
OK
curl https://chatvendor.net/api/v1/services/{service}/slots \
-H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
GET
/bookings
Bookings (filters: status, from, to, limit)
channels:read
Ruxsat: channels:read
Javob 200
OK
curl https://chatvendor.net/api/v1/bookings \
-H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
POST
/bookings
Book a slot (starts_at must be a free slot); channel_id + peer_id link it to a chat so reminders reach the customer
channels:write
Ruxsat: channels:write
So'rov tanasi (application/json)
service_idintegermajburiystarts_atstringmajburiynamestringphonestringnotestringchannel_idstringpeer_idintegerstatusstring: pending | confirmedJavob 200
OK
curl -X POST https://chatvendor.net/api/v1/bookings \
-H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
-H "Content-Type: application/json" \
-d '{"service_id":1,"starts_at":"…"}'
PATCH
/bookings/{id}
Change status (confirmed / cancelled / done / no_show), move (starts_at) or note
channels:write
Ruxsat: channels:write
Parametrlar
idpath · integermajburiyBooking id
So'rov tanasi (application/json)
statusstringstarts_atstringnotestringnotifybooleanJavob 200
OK
curl -X PATCH https://chatvendor.net/api/v1/bookings/1 \
-H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
-H "Content-Type: application/json" \
-d '[]'