Asosiy qismga o'tish
ChatVendor ChatVendor

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)

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)

Ruxsat: channels:read

Parametrlar

servicepath · integermajburiy

Service id

datequery · string

Javob 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)

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

Ruxsat: channels:write

So'rov tanasi (application/json)

service_idintegermajburiy
starts_atstringmajburiy
namestring
phonestring
notestring
channel_idstring
peer_idinteger
statusstring: pending | confirmed

Javob 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

Ruxsat: channels:write

Parametrlar

idpath · integermajburiy

Booking id

So'rov tanasi (application/json)

statusstring
starts_atstring
notestring
notifyboolean

Javob 200

OK

curl -X PATCH https://chatvendor.net/api/v1/bookings/1 \
  -H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
  -H "Content-Type: application/json" \
  -d '[]'