ข้ามไปยังเนื้อหา

รายการ endpoint ของ API

ที่อยู่หลัก https://api.tellfox.app ส่งคีย์เป็น Authorization: Bearer tfx_live_… (ดู Tellfox API) สเปกเต็มสำหรับเครื่องอยู่ที่ ไฟล์ OpenAPI

Business

GET /v1/business

The business and the key The business this key belongs to, its branches, and what the key may do. A good first call to check a key works.

สิทธิ์ที่ต้องใช้: ทุกคีย์

ข้อมูลที่ได้: data
ชื่อคำอธิบาย
idA Tellfox ID ("biz_…").
name
name_en
timezoneTimes are stored in UTC; this is the zone the business shows them in.
language
currencyMoney is in satang (1 baht = 100 satang), whole numbers.
mode`test`: a test copy of the business, where nothing is ever sent to anyone.
key
branches

GET /v1/branches

Branches The open and paused branches (the ones the key may use).

สิทธิ์ที่ต้องใช้: ทุกคีย์ · รายการ (แบ่งหน้า)

ข้อมูลที่ได้: data[]
ชื่อคำอธิบาย
idA Tellfox ID ("loc_…").
name
primaryThe first branch.
statusA paused branch (free account) takes no new bookings.
address
phone

GET /v1/services

Services and classes The active services and classes, in the order the business shows them.

สิทธิ์ที่ต้องใช้: ทุกคีย์ · รายการ (แบ่งหน้า)

ข้อมูลที่ได้: data[]
ชื่อคำอธิบาย
idA Tellfox ID ("svc_…").
name
name_en
kind`class`: booked as a place in a scheduled session.
unit`day`: a stay booked by the night.
duration_minutes
priceSatang; null when the service has no price.
branch_idsThe branches that offer it.
bookable_online

GET /v1/team

The team The active team members: names and branches only, never their contact details.

สิทธิ์ที่ต้องใช้: ทุกคีย์ · รายการ (แบ่งหน้า)

ข้อมูลที่ได้: data[]
ชื่อคำอธิบาย
idA Tellfox ID ("mem_…").
name
name_en
bookableCustomers can book this person.
branch_ids

Customers

GET /v1/tags

Customer tags

สิทธิ์ที่ต้องใช้: customers:read · รายการ (แบ่งหน้า)

ข้อมูลที่ได้: data[]
ชื่อคำอธิบาย
idA Tellfox ID ("tag_…").
name

GET /v1/customers

List or find customers Oldest change first, so a sync reads every change: keep the last `updated_at` you saw and send it as `updated_since` next time. Find one customer with `phone`, `email` or `external_id`. Customers belong to the whole business (every branch).

สิทธิ์ที่ต้องใช้: customers:read · รายการ (แบ่งหน้า)

พารามิเตอร์

ชื่อที่คำอธิบาย
limitqueryHow many to answer, 1 to 200 (default 50).
cursorquery`meta.next_cursor` of the page before, to read the next page.
updated_sincequeryOnly what changed at or after this time (UTC, as `updated_at` gives it). Send a minute before the last `updated_at` you saw.
qqueryPart of a name, phone number or email.
phonequeryAn exact phone number (any format; Thai numbers may start with 0).
emailqueryAn exact email address.
external_idqueryThis key's system's own ID.
tagqueryA tag ID.
ข้อมูลที่ได้: data[]
ชื่อคำอธิบาย
idA Tellfox ID ("cus_…").
name
phonesE.164 ("+66812345678").
emails
on_lineThe customer is reached on LINE (the LINE ID itself is never given).
language
birthdayYYYY-MM-DD.
tags
consentAgreed to receive offers on that channel (PDPA). Service messages need none.
external_idThis key's system's own ID for the customer.
visitsCompleted bookings and class places, and served queue tickets.
last_visit_at
next_booking_at
anonymisedErased on request (PDPA): the name is a placeholder and contact details are gone.
created_from
created_atA time in UTC, ISO 8601 ("2026-10-22T09:30:00Z").
updated_atThe last change to the customer, their contact details, tags, consent or IDs (not their visit numbers, which follow the bookings). Use it as `updated_since`.

GET /v1/customers/erased

Customers erased on request Customers the business erased (PDPA) by deleting them, oldest first, kept 180 days: delete your copy. A customer with bookings is anonymised instead and stays in the list of customers with `anonymised: true`.

สิทธิ์ที่ต้องใช้: customers:read · รายการ (แบ่งหน้า)

พารามิเตอร์

ชื่อที่คำอธิบาย
limitqueryHow many to answer, 1 to 200 (default 50).
cursorquery`meta.next_cursor` of the page before, to read the next page.
updated_sincequeryOnly what changed at or after this time (UTC, as `updated_at` gives it). Send a minute before the last `updated_at` you saw.
ข้อมูลที่ได้: data[]
ชื่อคำอธิบาย
id
erased_atA time in UTC, ISO 8601 ("2026-10-22T09:30:00Z").

GET /v1/customers/{customer_id}

A customer

สิทธิ์ที่ต้องใช้: customers:read

พารามิเตอร์

ชื่อที่คำอธิบาย
customer_id (จำเป็น)pathA Tellfox ID ("cus_…").
ข้อมูลที่ได้: data
ชื่อคำอธิบาย
idA Tellfox ID ("cus_…").
name
phonesE.164 ("+66812345678").
emails
on_lineThe customer is reached on LINE (the LINE ID itself is never given).
language
birthdayYYYY-MM-DD.
tags
consentAgreed to receive offers on that channel (PDPA). Service messages need none.
external_idThis key's system's own ID for the customer.
visitsCompleted bookings and class places, and served queue tickets.
last_visit_at
next_booking_at
anonymisedErased on request (PDPA): the name is a placeholder and contact details are gone.
created_from
created_atA time in UTC, ISO 8601 ("2026-10-22T09:30:00Z").
updated_atThe last change to the customer, their contact details, tags, consent or IDs (not their visit numbers, which follow the bookings). Use it as `updated_since`.

POST /v1/customers

Add a customer (or find the one the business has) Finds the customer by your `external_id`, then the email, then the phone (a phone a customer proved on their own sign-in is never handed to a new one). Answers 201 with a new customer, 200 with the one found, who keeps their own details (a birthday is added only when they have none; your `external_id` is attached; add contact details with PATCH). Refused before anything is written when the found customer has another `external_id` from your system. Shows in the activity feed under the key's name.

สิทธิ์ที่ต้องใช้: customers:write · การเขียน: ต้องส่ง Idempotency-Key

เนื้อหา (JSON)

ชื่อคำอธิบาย
name (จำเป็น)
phone
emailAn email address.
languageThe language messages go out in (default th).
birthday
external_id
tags
ข้อมูลที่ได้: data
ชื่อคำอธิบาย
idA Tellfox ID ("cus_…").
name
phonesE.164 ("+66812345678").
emails
on_lineThe customer is reached on LINE (the LINE ID itself is never given).
language
birthdayYYYY-MM-DD.
tags
consentAgreed to receive offers on that channel (PDPA). Service messages need none.
external_idThis key's system's own ID for the customer.
visitsCompleted bookings and class places, and served queue tickets.
last_visit_at
next_booking_at
anonymisedErased on request (PDPA): the name is a placeholder and contact details are gone.
created_from
created_atA time in UTC, ISO 8601 ("2026-10-22T09:30:00Z").
updated_atThe last change to the customer, their contact details, tags, consent or IDs (not their visit numbers, which follow the bookings). Use it as `updated_since`.

PATCH /v1/customers/{customer_id}

Change a customer Name, language, birthday, your `external_id`, and phones and emails to add or remove (at most 3 of each per customer).

สิทธิ์ที่ต้องใช้: customers:write · การเขียน: ต้องส่ง Idempotency-Key

พารามิเตอร์

ชื่อที่คำอธิบาย
customer_id (จำเป็น)pathA Tellfox ID ("cus_…").

เนื้อหา (JSON)

ชื่อคำอธิบาย
name
language
birthdayYYYY-MM-DD, or null to clear it.
external_idYour system's own ID, or null to remove it.
add_phones
remove_phonesOnly numbers the customer did not prove themselves.
add_emails
remove_emailsOnly addresses the customer did not prove themselves.
ข้อมูลที่ได้: data
ชื่อคำอธิบาย
idA Tellfox ID ("cus_…").
name
phonesE.164 ("+66812345678").
emails
on_lineThe customer is reached on LINE (the LINE ID itself is never given).
language
birthdayYYYY-MM-DD.
tags
consentAgreed to receive offers on that channel (PDPA). Service messages need none.
external_idThis key's system's own ID for the customer.
visitsCompleted bookings and class places, and served queue tickets.
last_visit_at
next_booking_at
anonymisedErased on request (PDPA): the name is a placeholder and contact details are gone.
created_from
created_atA time in UTC, ISO 8601 ("2026-10-22T09:30:00Z").
updated_atThe last change to the customer, their contact details, tags, consent or IDs (not their visit numbers, which follow the bookings). Use it as `updated_since`.

POST /v1/customers/{customer_id}/tags

Add tags

สิทธิ์ที่ต้องใช้: customers:write · การเขียน: ต้องส่ง Idempotency-Key

พารามิเตอร์

ชื่อที่คำอธิบาย
customer_id (จำเป็น)pathA Tellfox ID ("cus_…").

เนื้อหา (JSON)

ชื่อคำอธิบาย
tags (จำเป็น)Tag names; a new name makes the tag (at most 100 per business, 20 per customer).
ข้อมูลที่ได้: data
ชื่อคำอธิบาย
idA Tellfox ID ("cus_…").
name
phonesE.164 ("+66812345678").
emails
on_lineThe customer is reached on LINE (the LINE ID itself is never given).
language
birthdayYYYY-MM-DD.
tags
consentAgreed to receive offers on that channel (PDPA). Service messages need none.
external_idThis key's system's own ID for the customer.
visitsCompleted bookings and class places, and served queue tickets.
last_visit_at
next_booking_at
anonymisedErased on request (PDPA): the name is a placeholder and contact details are gone.
created_from
created_atA time in UTC, ISO 8601 ("2026-10-22T09:30:00Z").
updated_atThe last change to the customer, their contact details, tags, consent or IDs (not their visit numbers, which follow the bookings). Use it as `updated_since`.

DELETE /v1/customers/{customer_id}/tags/{tag_id}

Take a tag off The tag stays in the business’s list.

สิทธิ์ที่ต้องใช้: customers:write · การเขียน: ต้องส่ง Idempotency-Key

พารามิเตอร์

ชื่อที่คำอธิบาย
customer_id (จำเป็น)pathA Tellfox ID ("cus_…").
tag_id (จำเป็น)pathA Tellfox ID ("tag_…").
ข้อมูลที่ได้: data
ชื่อคำอธิบาย
idA Tellfox ID ("cus_…").
name
phonesE.164 ("+66812345678").
emails
on_lineThe customer is reached on LINE (the LINE ID itself is never given).
language
birthdayYYYY-MM-DD.
tags
consentAgreed to receive offers on that channel (PDPA). Service messages need none.
external_idThis key's system's own ID for the customer.
visitsCompleted bookings and class places, and served queue tickets.
last_visit_at
next_booking_at
anonymisedErased on request (PDPA): the name is a placeholder and contact details are gone.
created_from
created_atA time in UTC, ISO 8601 ("2026-10-22T09:30:00Z").
updated_atThe last change to the customer, their contact details, tags, consent or IDs (not their visit numbers, which follow the bookings). Use it as `updated_since`.

POST /v1/customers/{customer_id}/notes

Add a note The team sees it on the customer’s page, under the key’s name.

สิทธิ์ที่ต้องใช้: customers:write · การเขียน: ต้องส่ง Idempotency-Key

พารามิเตอร์

ชื่อที่คำอธิบาย
customer_id (จำเป็น)pathA Tellfox ID ("cus_…").

เนื้อหา (JSON)

ชื่อคำอธิบาย
body (จำเป็น)
booking_idOne of the customer’s bookings it is about.
ข้อมูลที่ได้: data
ชื่อคำอธิบาย
id
body
booking_id
author
created_atA time in UTC, ISO 8601 ("2026-10-22T09:30:00Z").
updated_atA time in UTC, ISO 8601 ("2026-10-22T09:30:00Z").

GET /v1/customers/{customer_id}/notes

A customer's notes Newest first.

สิทธิ์ที่ต้องใช้: customers:read · รายการ (แบ่งหน้า)

พารามิเตอร์

ชื่อที่คำอธิบาย
customer_id (จำเป็น)pathA Tellfox ID ("cus_…").
limitqueryHow many to answer, 1 to 200 (default 50).
cursorquery`meta.next_cursor` of the page before, to read the next page.
ข้อมูลที่ได้: data[]
ชื่อคำอธิบาย
id
body
booking_id
author
created_atA time in UTC, ISO 8601 ("2026-10-22T09:30:00Z").
updated_atA time in UTC, ISO 8601 ("2026-10-22T09:30:00Z").

Bookings

GET /v1/bookings

List bookings and class places By start time between `from` and `to` (at most 93 days), or, with `updated_since`, oldest change first for a sync. A key limited to some branches sees only theirs.

สิทธิ์ที่ต้องใช้: bookings:read · รายการ (แบ่งหน้า)

พารามิเตอร์

ชื่อที่คำอธิบาย
limitqueryHow many to answer, 1 to 200 (default 50).
cursorquery`meta.next_cursor` of the page before, to read the next page.
fromqueryStarts at or after (UTC). Default: now.
toqueryStarts before (UTC). Default: 31 days after `from`.
updated_sincequeryOnly what changed at or after this time (UTC, as `updated_at` gives it). Send a minute before the last `updated_at` you saw.
branch_idquery
customer_idquery
statusquery
ข้อมูลที่ได้: data[]
ชื่อคำอธิบาย
idA Tellfox ID ("bk_…").
referenceThe code the customer sees ("TF-K7M2Q-9XD4P").
kind
status
startA time in UTC, ISO 8601 ("2026-10-22T09:30:00Z").
endA time in UTC, ISO 8601 ("2026-10-22T09:30:00Z").
branch_id
customer_idNull for a walk-in seated without a name (Tables).
service
staff
room
session_idThe class session, for a class place.
party_size
priceSatang, worked out by Tellfox when booked (0 when a package pays).
customer_package_idThe package that pays for it.
sourceWhere it was made: liff, web, owner, chat, email.
customer_note
cancelled_at
cancelled_by
created_atA time in UTC, ISO 8601 ("2026-10-22T09:30:00Z").
updated_atThe last change. Use it as `updated_since`.

GET /v1/availability

Free times The free start times of a service on a day (the business’s local day), as the business sees them: its own booking window does not apply. Table services are booked on the booking page.

สิทธิ์ที่ต้องใช้: bookings:read · รายการ (แบ่งหน้า)

พารามิเตอร์

ชื่อที่คำอธิบาย
service_id (จำเป็น)queryA Tellfox ID ("svc_…").
date (จำเป็น)queryA local day, YYYY-MM-DD.
branch_idquery
staff_idqueryOnly this person’s times.
nightsqueryFor a stay booked by the night.
ข้อมูลที่ได้: data[]
ชื่อคำอธิบาย
startA time in UTC, ISO 8601 ("2026-10-22T09:30:00Z").
endA time in UTC, ISO 8601 ("2026-10-22T09:30:00Z").
staff_idsWho can do it then (any of them when you name none).
priceSatang at that time (a price by time of day applies).

POST /v1/bookings

Make a booking Through the same engine as the booking page, so two bookings can never take the same time. Made by the business: no deposit; the customer gets the usual confirmation and reminders. A time taken a moment ago answers 409 with the next free times in the message. A retry with the same Idempotency-Key answers the booking it made, as it is now.

สิทธิ์ที่ต้องใช้: bookings:write · การเขียน: ต้องส่ง Idempotency-Key

เนื้อหา (JSON)

ชื่อคำอธิบาย
service_id (จำเป็น)A Tellfox ID ("svc_…").
start (จำเป็น)A time in UTC, ISO 8601 ("2026-10-22T09:30:00Z").
customer_id (จำเป็น)A Tellfox ID ("cus_…").
staff_idA person; left out: anyone who is free.
branch_id
nights
use_packagePay with one of the customer’s packages that covers it.
note
ข้อมูลที่ได้: data
ชื่อคำอธิบาย
idA Tellfox ID ("bk_…").
referenceThe code the customer sees ("TF-K7M2Q-9XD4P").
kind
status
startA time in UTC, ISO 8601 ("2026-10-22T09:30:00Z").
endA time in UTC, ISO 8601 ("2026-10-22T09:30:00Z").
branch_id
customer_idNull for a walk-in seated without a name (Tables).
service
staff
room
session_idThe class session, for a class place.
party_size
priceSatang, worked out by Tellfox when booked (0 when a package pays).
customer_package_idThe package that pays for it.
sourceWhere it was made: liff, web, owner, chat, email.
customer_note
cancelled_at
cancelled_by
created_atA time in UTC, ISO 8601 ("2026-10-22T09:30:00Z").
updated_atThe last change. Use it as `updated_since`.

POST /v1/bookings/{booking_id}/move

Move a booking To another free time (and person). The customer is told.

สิทธิ์ที่ต้องใช้: bookings:write · การเขียน: ต้องส่ง Idempotency-Key

พารามิเตอร์

ชื่อที่คำอธิบาย
booking_id (จำเป็น)pathA Tellfox ID ("bk_…").

เนื้อหา (JSON)

ชื่อคำอธิบาย
start (จำเป็น)A time in UTC, ISO 8601 ("2026-10-22T09:30:00Z").
staff_id
ข้อมูลที่ได้: data
ชื่อคำอธิบาย
idA Tellfox ID ("bk_…").
referenceThe code the customer sees ("TF-K7M2Q-9XD4P").
kind
status
startA time in UTC, ISO 8601 ("2026-10-22T09:30:00Z").
endA time in UTC, ISO 8601 ("2026-10-22T09:30:00Z").
branch_id
customer_idNull for a walk-in seated without a name (Tables).
service
staff
room
session_idThe class session, for a class place.
party_size
priceSatang, worked out by Tellfox when booked (0 when a package pays).
customer_package_idThe package that pays for it.
sourceWhere it was made: liff, web, owner, chat, email.
customer_note
cancelled_at
cancelled_by
created_atA time in UTC, ISO 8601 ("2026-10-22T09:30:00Z").
updated_atThe last change. Use it as `updated_since`.

POST /v1/bookings/{booking_id}/cancel

Cancel a booking or class place Cancelled by the business (its cancellation policy does not hold the business back). The customer is told.

สิทธิ์ที่ต้องใช้: bookings:write · การเขียน: ต้องส่ง Idempotency-Key

พารามิเตอร์

ชื่อที่คำอธิบาย
booking_id (จำเป็น)pathA Tellfox ID ("bk_…").

เนื้อหา (JSON)

ชื่อคำอธิบาย
reason
ข้อมูลที่ได้: data
ชื่อคำอธิบาย
idA Tellfox ID ("bk_…").
referenceThe code the customer sees ("TF-K7M2Q-9XD4P").
kind
status
startA time in UTC, ISO 8601 ("2026-10-22T09:30:00Z").
endA time in UTC, ISO 8601 ("2026-10-22T09:30:00Z").
branch_id
customer_idNull for a walk-in seated without a name (Tables).
service
staff
room
session_idThe class session, for a class place.
party_size
priceSatang, worked out by Tellfox when booked (0 when a package pays).
customer_package_idThe package that pays for it.
sourceWhere it was made: liff, web, owner, chat, email.
customer_note
cancelled_at
cancelled_by
created_atA time in UTC, ISO 8601 ("2026-10-22T09:30:00Z").
updated_atThe last change. Use it as `updated_since`.

GET /v1/bookings/{booking_id}

A booking

สิทธิ์ที่ต้องใช้: bookings:read

พารามิเตอร์

ชื่อที่คำอธิบาย
booking_id (จำเป็น)pathA Tellfox ID ("bk_…").
ข้อมูลที่ได้: data
ชื่อคำอธิบาย
idA Tellfox ID ("bk_…").
referenceThe code the customer sees ("TF-K7M2Q-9XD4P").
kind
status
startA time in UTC, ISO 8601 ("2026-10-22T09:30:00Z").
endA time in UTC, ISO 8601 ("2026-10-22T09:30:00Z").
branch_id
customer_idNull for a walk-in seated without a name (Tables).
service
staff
room
session_idThe class session, for a class place.
party_size
priceSatang, worked out by Tellfox when booked (0 when a package pays).
customer_package_idThe package that pays for it.
sourceWhere it was made: liff, web, owner, chat, email.
customer_note
cancelled_at
cancelled_by
created_atA time in UTC, ISO 8601 ("2026-10-22T09:30:00Z").
updated_atThe last change. Use it as `updated_since`.

Classes

GET /v1/sessions

Class sessions Sessions starting between `from` and `to` (at most 31 days; default the next 14), soonest first, with the places left.

สิทธิ์ที่ต้องใช้: bookings:read · รายการ (แบ่งหน้า)

พารามิเตอร์

ชื่อที่คำอธิบาย
fromqueryDefault: now.
toquery
service_idquery
branch_idquery
ข้อมูลที่ได้: data[]
ชื่อคำอธิบาย
id
service
status
startA time in UTC, ISO 8601 ("2026-10-22T09:30:00Z").
endA time in UTC, ISO 8601 ("2026-10-22T09:30:00Z").
instructor
room
capacity
taken
spots_left

POST /v1/sessions/{session_id}/places

Give a customer a place in a class A place while there is one (two at once never pass the capacity). The customer is told. Answers the place as a booking, 201 for a new place or 200 when the customer had one already (cancel it with POST /v1/bookings/{id}/cancel).

สิทธิ์ที่ต้องใช้: bookings:write · การเขียน: ต้องส่ง Idempotency-Key

พารามิเตอร์

ชื่อที่คำอธิบาย
session_id (จำเป็น)path

เนื้อหา (JSON)

ชื่อคำอธิบาย
customer_id (จำเป็น)A Tellfox ID ("cus_…").
use_package
note
ข้อมูลที่ได้: data
ชื่อคำอธิบาย
idA Tellfox ID ("bk_…").
referenceThe code the customer sees ("TF-K7M2Q-9XD4P").
kind
status
startA time in UTC, ISO 8601 ("2026-10-22T09:30:00Z").
endA time in UTC, ISO 8601 ("2026-10-22T09:30:00Z").
branch_id
customer_idNull for a walk-in seated without a name (Tables).
service
staff
room
session_idThe class session, for a class place.
party_size
priceSatang, worked out by Tellfox when booked (0 when a package pays).
customer_package_idThe package that pays for it.
sourceWhere it was made: liff, web, owner, chat, email.
customer_note
cancelled_at
cancelled_by
created_atA time in UTC, ISO 8601 ("2026-10-22T09:30:00Z").
updated_atThe last change. Use it as `updated_since`.

Packages

GET /v1/packages

Packages on sale

สิทธิ์ที่ต้องใช้: packages:read · รายการ (แบ่งหน้า)

ข้อมูลที่ได้: data[]
ชื่อคำอธิบาย
idA Tellfox ID ("pkg_…").
name
name_en
priceSatang.
sessions
validity_days
coversThe services and classes it can be used for.
sold_online

POST /v1/customers/{customer_id}/packages

Sell a package A sale at the counter: the price comes from the package, paid by cash, transfer or card. The customer gets the usual "package bought" message; it earns on the loyalty card like a sale in the owner pages.

สิทธิ์ที่ต้องใช้: packages:write · การเขียน: ต้องส่ง Idempotency-Key

พารามิเตอร์

ชื่อที่คำอธิบาย
customer_id (จำเป็น)pathA Tellfox ID ("cus_…").

เนื้อหา (JSON)

ชื่อคำอธิบาย
package_id (จำเป็น)A Tellfox ID ("pkg_…").
payment_method (จำเป็น)
note
ข้อมูลที่ได้: data
ชื่อคำอธิบาย
idA Tellfox ID ("cpk_…").
package_id
name
sessions
reservedSessions held by bookings still to come.
usedSessions taken by completed bookings and no-shows.
left
stateactive, used_up, expired or void.
price_paidSatang.
bought_atA time in UTC, ISO 8601 ("2026-10-22T09:30:00Z").
last_dayThe last day it can be used (YYYY-MM-DD, the business’s time zone).
covers

GET /v1/customers/{customer_id}/packages

A customer's packages Newest first (at most 50), with the sessions left.

สิทธิ์ที่ต้องใช้: packages:read · รายการ (แบ่งหน้า)

พารามิเตอร์

ชื่อที่คำอธิบาย
customer_id (จำเป็น)pathA Tellfox ID ("cus_…").
ข้อมูลที่ได้: data[]
ชื่อคำอธิบาย
idA Tellfox ID ("cpk_…").
package_id
name
sessions
reservedSessions held by bookings still to come.
usedSessions taken by completed bookings and no-shows.
left
stateactive, used_up, expired or void.
price_paidSatang.
bought_atA time in UTC, ISO 8601 ("2026-10-22T09:30:00Z").
last_dayThe last day it can be used (YYYY-MM-DD, the business’s time zone).
covers

Loyalty

GET /v1/coupons

Coupons to give The coupons the business set up and has switched on.

สิทธิ์ที่ต้องใช้: loyalty:read · รายการ (แบ่งหน้า)

ข้อมูลที่ได้: data[]
ชื่อคำอธิบาย
id
name
gives
amountSatang off, for `amount`.
percent
service_name
gift
note
valid_days
valid_until
branch_idsWhere it can be used; null: every branch.

GET /v1/rewards

Rewards for points

สิทธิ์ที่ต้องใช้: loyalty:read · รายการ (แบ่งหน้า)

ข้อมูลที่ได้: data[]
ชื่อคำอธิบาย
id
name
points
coupon_name

POST /v1/customers/{customer_id}/rewards/{reward_id}/redeem

Trade points for a reward Takes the reward’s points and gives its coupon. Not enough points answers 409.

สิทธิ์ที่ต้องใช้: loyalty:write · การเขียน: ต้องส่ง Idempotency-Key

พารามิเตอร์

ชื่อที่คำอธิบาย
customer_id (จำเป็น)pathA Tellfox ID ("cus_…").
reward_id (จำเป็น)path
ข้อมูลที่ได้: data
ชื่อคำอธิบาย
coupon
card

GET /v1/customers/{customer_id}/loyalty

A customer's card Stamps, points and coupons. Empty when the business has no loyalty program.

สิทธิ์ที่ต้องใช้: loyalty:read

พารามิเตอร์

ชื่อที่คำอธิบาย
customer_id (จำเป็น)pathA Tellfox ID ("cus_…").
ข้อมูลที่ได้: data
ชื่อคำอธิบาย
memberFalse until the customer first earns or is given something.
stamps_on
stamps
stamps_per_card
points_on
points
couponsActive coupons first, then the latest used and expired ones.

POST /v1/customers/{customer_id}/stamps

Give stamps Stamps on the stamp card for a visit or a purchase (1 to 10 at a time). A full card gives its reward coupon, as in the owner pages. Answers the card.

สิทธิ์ที่ต้องใช้: loyalty:write · การเขียน: ต้องส่ง Idempotency-Key

พารามิเตอร์

ชื่อที่คำอธิบาย
customer_id (จำเป็น)pathA Tellfox ID ("cus_…").

เนื้อหา (JSON)

ชื่อคำอธิบาย
count
reasonWhat it was for; the team sees it. Default: the key’s name.
branch_idThe branch it happened at; a key limited to some branches must name one of its branches.
ข้อมูลที่ได้: data
ชื่อคำอธิบาย
memberFalse until the customer first earns or is given something.
stamps_on
stamps
stamps_per_card
points_on
points
couponsActive coupons first, then the latest used and expired ones.

POST /v1/customers/{customer_id}/points

Points for a sale For a sale made in your system: the program’s rate turns the amount spent into whole points (for example one point per ฿10). Boosts in Tellfox apply to visits booked in Tellfox, not to these.

สิทธิ์ที่ต้องใช้: loyalty:write · การเขียน: ต้องส่ง Idempotency-Key

พารามิเตอร์

ชื่อที่คำอธิบาย
customer_id (จำเป็น)pathA Tellfox ID ("cus_…").

เนื้อหา (JSON)

ชื่อคำอธิบาย
amount (จำเป็น)What the customer spent, in satang.
reference (จำเป็น)Your sale’s number; the team sees it.
branch_idThe branch it happened at; a key limited to some branches must name one of its branches.
ข้อมูลที่ได้: data
ชื่อคำอธิบาย
points_added
card

POST /v1/customers/{customer_id}/coupons

Give a coupon One of the coupons the business set up (GET /v1/coupons). The customer gets the usual message on a channel they agreed to offers on. A key limited to some branches cannot give coupons (as in the owner pages).

สิทธิ์ที่ต้องใช้: loyalty:write · การเขียน: ต้องส่ง Idempotency-Key

พารามิเตอร์

ชื่อที่คำอธิบาย
customer_id (จำเป็น)pathA Tellfox ID ("cus_…").

เนื้อหา (JSON)

ชื่อคำอธิบาย
coupon_id (จำเป็น)
ข้อมูลที่ได้: data
ชื่อคำอธิบาย
idThis given coupon (use it with POST …/coupons/{given_id}/use).
coupon_id
name
gives
amount
percent
service_name
gift
wayHow it was given: gift, welcome, birthday, everyone, comeback, reward, card.
given_atA time in UTC, ISO 8601 ("2026-10-22T09:30:00Z").
expires_atA time in UTC, ISO 8601 ("2026-10-22T09:30:00Z").
status
used_at

POST /v1/customers/{customer_id}/coupons/{given_id}/use

Use a coupon Marks one of the customer’s active coupons used (`id` from their card). A coupon is used once; a used, expired or other branch’s coupon is refused with 409.

สิทธิ์ที่ต้องใช้: loyalty:write · การเขียน: ต้องส่ง Idempotency-Key

พารามิเตอร์

ชื่อที่คำอธิบาย
customer_id (จำเป็น)pathA Tellfox ID ("cus_…").
given_id (จำเป็น)path

เนื้อหา (JSON)

ชื่อคำอธิบาย
branch_idThe branch it happened at; a key limited to some branches must name one of its branches.
ข้อมูลที่ได้: data
ชื่อคำอธิบาย
idThis given coupon (use it with POST …/coupons/{given_id}/use).
coupon_id
name
gives
amount
percent
service_name
gift
wayHow it was given: gift, welcome, birthday, everyone, comeback, reward, card.
given_atA time in UTC, ISO 8601 ("2026-10-22T09:30:00Z").
expires_atA time in UTC, ISO 8601 ("2026-10-22T09:30:00Z").
status
used_at

Tickets

GET /v1/events

Events The business’s events with tickets (the Ticketing add-on): upcoming (default), past or drafts.

สิทธิ์ที่ต้องใช้: tickets:read · รายการ (แบ่งหน้า)

พารามิเตอร์

ชื่อที่คำอธิบาย
tabquery
cursorquery`meta.next_cursor` of the page before (30 a page).
ข้อมูลที่ได้: data[]
ชื่อคำอธิบาย
id
name
name_en
branch_id
startA time in UTC, ISO 8601 ("2026-10-22T09:30:00Z").
endA time in UTC, ISO 8601 ("2026-10-22T09:30:00Z").
status
sales_on
capacity
sold
linkThe public event page.

GET /v1/events/{event_id}/tickets

Who bought tickets Every ticket of the event with its buyer and check-in, 50 orders a page.

สิทธิ์ที่ต้องใช้: tickets:read · รายการ (แบ่งหน้า)

พารามิเตอร์

ชื่อที่คำอธิบาย
event_id (จำเป็น)path
cursorquery`meta.next_cursor` of the page before (50 orders a page).
ข้อมูลที่ได้: data[]
ชื่อคำอธิบาย
id
order_id
order_reference
buyer_name
buyer_email
buyer_phone
type
status
checked_in_at

POST /v1/events/{event_id}/check-in

Check a ticket in at the door The code from the ticket’s QR (TF1.…), checked against Tellfox’s signature, for an event of today or tomorrow at a branch the key may use. Two doors scanning one ticket at once: one gets `ok`, the other `used`. Use a new Idempotency-Key for every scan.

สิทธิ์ที่ต้องใช้: tickets:write · การเขียน: ต้องส่ง Idempotency-Key

พารามิเตอร์

ชื่อที่คำอธิบาย
event_id (จำเป็น)path

เนื้อหา (JSON)

ชื่อคำอธิบาย
code (จำเป็น)
ข้อมูลที่ได้: data
ชื่อคำอธิบาย
state`ok`: let them in. Anything else: do not.
ticket_id
name
type
checked_in_atFor `used`: when it was checked in before.
checked_inTickets checked in at this event so far.
sold

Payments

GET /v1/payments

Confirmed payments Payments customers made by PromptPay and the business confirmed (deposits, packages bought online, ticket orders), oldest first by `paid_at`. For accounting.

สิทธิ์ที่ต้องใช้: payments:read · รายการ (แบ่งหน้า)

พารามิเตอร์

ชื่อที่คำอธิบาย
limitqueryHow many to answer, 1 to 200 (default 50).
cursorquery`meta.next_cursor` of the page before, to read the next page.
fromqueryConfirmed at or after (UTC).
toqueryConfirmed before (UTC).
ข้อมูลที่ได้: data[]
ชื่อคำอธิบาย
id
kind
subject_idThe booking, package order or ticket order it paid for.
customer_id
title
amountSatang.
paid_atWhen the business confirmed it.