@taskmagic/apps-trafft
v0.0.3
Published
Appointment scheduling and booking for [Trafft](https://trafft.com/).
Readme
Trafft
Appointment scheduling and booking for Trafft.
Connection
Trafft gives every account its own admin host and its own API credentials, so the connection needs three values, all from the Trafft admin panel:
| Field | Where it comes from |
| --- | --- |
| Company Address | The part before .admin.trafft.com in the URL you sign in at — acme for https://acme.admin.trafft.com. Pasting the whole URL works. |
| Client ID | Features & Integration > API & Connectors |
| Client Secret | Features & Integration > API & Connectors |
API access is a paid-plan feature; if that page isn't in your admin panel, your plan doesn't include it yet.
The piece exchanges the Client ID and Secret for a short-lived Bearer token itself
(POST /api/v2/token, OAuth2 client-credentials) — you never paste a token, and tokens are
cached in memory only.
Accounts served from a fully custom domain rather than *.admin.trafft.com aren't supported
yet: the connection deliberately refuses hosts outside admin.trafft.com so that a mistyped
address can't send your client secret to someone else's server.
Actions
- List Customers — filter by email, first name, last name or phone number
- Get Customer — full record including birthday and gender
- Create Customer
- Update Customer — partial; empty fields keep their current value
- List Services — duration, buffer times and price
- List Employees
- List Locations — address and coordinates
- Get Available Times — bookable slots, max 7-day range
- Create Booking
- List Appointments — filter by customer, employee, service, location or status
- Delete Appointment
- Create Coupon
There is deliberately no Custom API Call action: the shared helper forwards an absolute
http(s) URL straight to the request while attaching the Trafft bearer token unconditionally,
so it would hand a valid token to any host typed into it.
Triggers
- New Appointment (polling) — fires when an appointment is booked
Trafft's API exposes no webhook management, so the trigger polls the appointments endpoint sorted by creation date and dedupes on appointment id.
API
REST API v2, documented in the Postman collection Trafft links from Features & Integration > API & Connectors: https://documenter.getpostman.com/view/1487056/2sAY4x9MRe
