Overview
Welcome to the Tor4You API documentation.
A machine-readable version of this documentation for LLMs and AI tools is available at
https://www.tor4you.co.il/apidocs.txt.
Getting started
Using the Tor4You API, you will be able obtain information about your account staff and services, determine appointment availability, make and delete timeslots, retrieve customer information, make and delete appointments, and much more.
Before you start, you will need to do the following:
- Create a Tor4You account
- Obtain your API credentials
- Open your account to the API
Usage limits
API usage is limited by maximum number of requests per hour and per 5 minutes. When using API keys (method 1), each key has its own limits; when using signed parameters (method 2), the limits apply to the whole account. To increase you usage limits, please contact us.
Custom options
We frequently add and customize endpoints based on requests and suggestions from our users.If you find that there are more things that you would like to do with our API, please do not hesitate to contact us.
API Playground
After reading the documentation, you can view and interact with a real time demo of the API in the
API Playground.
Questions and comments
If you have any questions or comments, please do not hesitate to contact us.
Concepts & Terminology
About Tor4You
Tor4You is an online appointment scheduling platform that enables businesses to manage their bookings. Businesses can manage appointments directly through the Tor4You dashboard, and can also allow their customers to book appointments online via an embeddable widget or through the Tor4You API.
Key Concepts
Site
Each business account in Tor4You is called a site. A site is an independent tenant with its own users, calendars, appointments, customers, and settings.
Calendar Types
There are two types of calendars:
- Open Calendar — The business defines working hours, holidays, and staff availability. Appointments can be booked at any time the business is open, for any duration that fits within the service length.
- Timeslots Calendar — The business creates specific time slots for each staff member. Appointments can only be booked on existing slots. Slots can accept any service (service=0) or be restricted to a specific service. Slots can be limited to one participant or allow multiple participants (a class/group). A slot can also be marked as unavailable using a lozamin service (see Lozamin below).
Branches
A business may operate from a single location or multiple branches. When multiple branches exist, each staff member must be assigned to a specific branch.
Staff
Staff members fall into two categories:
- Service providers — Staff who have their own calendar and provide services to customers. These are identified by having a showorder value greater than 0. The showorder value also determines the display order — higher values are displayed first. Each service provider has their own availability schedule and a set of linked services they can perform. Appointments are always linked to a specific service provider's calendar and can only be booked if that provider is linked to the requested service.
- Administrative users — Staff who have access to the system to perform management functions but do not provide services directly.
Services
Services represent the types of appointments a business offers. Each service has attributes such as name, duration, and price. Services are linked to one or more staff members who can perform them. Services can be marked as internal (staff-only booking) or external (available for customer self-booking).
Customers
Each appointment is associated with a single customer. An appointment may have multiple participants (for example, purchasing several tickets to an event), but it still belongs to one customer record. Customer uniqueness is determined by the combination of first name + cell phone number. For example, if a parent books an appointment under their own name using their cell number, one customer record is created. If the same parent books an appointment for their child (different first name, same cell number), a separate customer record is created.
Participants and Max Members
An appointment can include one or more participants. In a timeslots calendar, each slot has a maxmembers value that defines the total number of participants the slot can accommodate across all appointments booked on that slot. For example, a slot with maxmembers=10 could have one appointment with 10 participants, two appointments with 5 participants each, or any other combination totaling up to 10.
Appointments in Timeslot Calendars
When booking on a timeslots calendar, the appointment must be linked to a specific slot and must match the slot's date/time range and service. If the slot's service is set to 0 (any service), any of the staff member's linked services can be used.
Lozamin (Unavailable)
A lozamin is a special appointment type used to block a time period or slot, marking it as unavailable. When a lozamin appointment is created, the system uses a dedicated site-specific "lozamin customer" rather than a real customer. This is useful for blocking time for breaks, maintenance, or other non-booking purposes.
Iscoming (Pre-Appointment Confirmation)
Indicates whether a customer has confirmed in advance that they intend to attend their appointment. Values: 0 = not updated, 1 = confirmed attending, 2 = confirmed not attending. This is typically updated before the appointment takes place, for example via a reminder message.
Showstatus (Post-Appointment Attendance)
Indicates whether the customer actually showed up for their appointment. Values: 0 = not updated, 1 = attended, 2 = no-show. This is updated after the appointment time has passed.
Additional Terms
Conf / Vfib (Confirmation Tokens)
Most objects in the system have both a numeric ID and a confirmation token (referred to as
conf or
vfib depending on the object type). These tokens serve as a security measure to prevent unauthorized modifications by guessing IDs alone. For example, an appointment might have apptid=123456 and conf="AE154A23B746DC21". When an object is created via the API, the response includes both the ID and the conf/vfib value. All subsequent operations on that object (update, delete) require both the ID and the matching conf/vfib value. List endpoints also return these values for each object, enabling further operations without additional lookups.
Status
Objects in the system have a status field: 1 indicates active/live, and 0 indicates cancelled/inactive.
Extra Fields
Appointments support up to 20 custom fields (af1–af20) and customers support up to 10 custom fields (cf1–cf10 / cx1–cx10). These can be configured per site to capture additional business-specific information.
Tz (ID Number)
The
tz field refers to the customer's Israeli ID number (Teudat Zehut). Some sites require this field for customer identification. When required, it must be unique across customers.
External Users (updateby=99)
In webhook notifications, the
updateby field indicates which staff member performed the action. A value of 99 indicates that the action was not performed by a staff member, but rather by a business customer using the external booking widget, or by an API call. An API call that sends
csrid (see Making API calls, Acting agent) reports that agent's staff id instead of 99. In Settings Webhooks, 99 means a system change (see Settings Webhook Fields).
Making API calls
Method
API calls are made using GET, or POST with 'Content-Type', 'application/x-www-form-urlencoded' as indicated in each call description.
Authorization
All API calls need to be authenticated and authorized. There are two authorization methods you can choose from:
Method 1: API Key (recommended)
In order to authenticate and authorize your API call, you will need to add a header called "torkey" with your call. For example:
"torkey" : "12345-skie75fytailksecRFaonsw3ehoaeWCrs9odin8Ysego48isoyfnHsw9nfvp8w32"
Multiple keys and permissions
You can create up to 3 API keys in the settings menu, Developers page - for example a separate key for each integration. For each key you can choose:
- Which API calls it can make - all calls, or a selected list of calls.
- Which IP addresses it can be used from (optional, recommended).
Each key has its own usage limits. A call that is not allowed for the key returns:
{ "status": "0", "message": "addappt not permitted" }
Use
keyinfo to see the calls a key can make.
Method 2: Signed Parameters
This method is more secure but is more difficult to implement.
In order to authenticate and authorize your API call, you will need to send the following parameters:
- siteid - your siteid
- key - your API public key
- dt - the date and hour the call is made (YYYYMMDDHHNN)
- sh - a digital signature
The digital signature is obtained by calculating a SHA256 hash of siteid+key+dt+apicall+your secret key.
Example
Lets say you are trying to send the following parameters to "addcust" on Dec 31,2020 at 10:34AM, and your secret key is "secret"
- siteid - 123456
- key - abcdefg
- dt - 202012311034
- p1 - abcd
- p2 - efgh
- p3 - hijk
The signature will be
SHA256 (123456abcdefg202012311034addcustsecret)
which is
2394f3d48822809e9942417686544704c1447eb3b20595d7465a7ff4658958cb
so your entire query will be:
Acting agent (csrid)
By default, changes made through the API are recorded as external. When a call is made on behalf of one of your agents, add the optional parameter
csrid with that agent's staff id (from
staff). The change is then recorded in the appointment / customer history, reports and webhooks under that agent.
The agent must be an active staff member of your account who is not an admin and is not a service provider (showorder 0 or less). Any other value returns:
{ "status": "0", "message": "invalid csrid" }
Accepted by: addappt, delappt, iscoming, color, showstatus, updateaf, addcust, editcust, delcust, addslot, delslot.
tor4you.co.il/api/addcust?siteid=123456&key=abcdefg&dt=202012311034&p1=abcd&p2=efgh&p3=hijk&sh=2394f3d48822809e9942417686544704c1447eb3b20595d7465a7ff4658958cb
Postman
When using
Postman and the signed parameters authorization method (see Making API calls), you will need to calculate two dynamic variables - dt (the time) and sh (the signature). Below is some sample code to calculate the requred parameters.
Add the code under the Scripts / Pre req tab.
The script will calculate dt and sh and automatically add the parameters siteid,key,dt and sh to the request.
Of course this is just a simple example and your setup may be different.
Example
const moment = require('moment');
const Crypto = require('crypto-js');
const siteid=[YOUR SITEID];
const apiKey='[YOUR API KEY]';
const secret='[YOUR API SECRET]';
const method='[CURRENT METHOD]';
const dt=moment().format("YYYYMMDDHHmm");
const sh=Crypto.SHA256(siteid+apiKey+dt+method+secret).toString();
pm.variables.set("apiKey", apiKey);
pm.variables.set("siteid", siteid);
pm.variables.set("dt", dt);
pm.variables.set("sh",sh);
pm.request.addQueryParams("siteid={{siteid}}");
pm.request.addQueryParams("key={{apiKey}}");
pm.request.addQueryParams("dt={{dt}}");
pm.request.addQueryParams("sh={{sh}}");
Responses
All API responses are in JSON format.
All responses return either status=1 for success, with additional information, or status=0, with an error message.
Successful response:
Unsuccessful response:
Webhooks
It is much more efficient to receive a notification when something happens than to keep polling the API periodically. Tor4You sends two types of webhooks:
- Appointment Webhooks - a notification whenever an appointment is made, changed, cancelled or expires.
- Settings Webhooks - a notification whenever the business setup changes: business details, branches, staff, services and which staff member gives which service.
Most integrations only need Appointment Webhooks.Settings Webhooks are useful when your system keeps its own copy of the business setup (staff, services, branches) and needs to stay in sync with it.
Both types are sent as a POST in JSON format, are signed the same way, and are configured from the settings menu (Settings / Connectivity). Both can point to the same URL - the
hooktype field tells them apart.
Appointment Webhooks
It is much more efficient to receive a notification when something happens than to keep polling the API periodically.
Tor4You can send an update to an endpoint on your system whenever an appointment is made, changed or deleted.
You can activate and configure this option from the settings menu.
Updates are made using POST in JSON format and include all of the relevant appointment information, together with an action:
- 1 - create
- 2 - update
- 3 - cancel
- 5 - expire
If a webhook notification fails for any reason (does not return status 200), the system will try again after 30 seconds and then 1, 2, 4, 10, 120, 360 and 720 minutes, after which time the webhook is paused. If you have fixed the error on your end and would like to reset the sending, you can reset the count from the settings menu.
Every appointment notification carries
"hooktype": "appointments". Changes to the business settings (business details, branches, staff, services) can be sent as well - see
settings webhooks. Both kinds can point to the same URL and are told apart by
hooktype.
Webhook destination URLs must use
https and must resolve to a public host. Up to 5 webhooks can be configured per account, from the settings menu (
Settings / Connectivity / Webhook) - this is also how to connect automation platforms such as
Make.com / n8n / Zapier.
Signature verification (recommended)
Every newly created webhook has a
secret, visible to account admins in the settings menu. Each delivery then carries two extra HTTP headers:
X-Webhook-Timestamp - unix time (UTC seconds) when the delivery was signed
X-Webhook-Signature - sha256=<hex> where hex = HMAC-SHA256(secret, timestamp + "." + raw request body)
To verify: read the raw request body, compute HMAC-SHA256 over
timestamp "." body (UTF-8) with your secret, compare to the header value, and reject deliveries whose timestamp is older than a few minutes. The secret itself is never transmitted. Webhooks that existed before secrets were introduced are sent without these headers and carry only the legacy
sh field inside the body.
Sample Webhook Data
Fields explained:
|
id
|
id of the webhook notification. This is not site specific.
|
|
action
|
appointment action. 1-create, 2-update, 3-cancel, 5-expire
|
|
apptid
|
unique appointment id
|
|
apptstatus
|
appointment status. 1-live, 0-cancelled, 5-expired
|
|
customerid
|
unique customer id
|
|
showstatus
|
did the customer show up. 0-not updated, 1 - yes, 2 - no
|
|
iscoming
|
did the customer confirm they are coming. 0-not updated, 1 - yes, 2 - no
|
|
tmp_expire_date
|
appointment will automatically expire if no action (such as payment) is taken
|
|
af1 - af20
|
custom fields related to appointment
|
|
cf1 - cf10
|
custom fields related to customer
|
|
marketing
|
if customer agreed to receive marketing
|
|
origapptid
|
when an appointment is updated by a customer (not by the business) through the registration widget, the existing appointment is canceled (action=3) and a new appointment is created. Every notification for the new appointment carries the id of the original appointment in origapptid. Empty otherwise. Important: when the business updates an appointment (not via the widget), the apptid stays the same and the action is 2 (update), and the origapptid is empty.
|
|
sh
|
a digital SHA256 signature of (id + the key shown in the settings menu)
|
|
updateby
|
the staffid that made the update. 99 for external users and API calls (an API call with csrid reports that agent's staff id)
|
|
prevserviceid
|
the appointment's serviceid as sent in the previous notification for the same apptid. Compare with serviceid to detect a service change. Empty on create, or when no earlier notification exists.
|
|
prevstaffid
|
the appointment's staffid as sent in the previous notification for the same apptid. Compare with staffid to detect a move to another staff member. Empty on create, or when no earlier notification exists.
|
|
createdby
|
the staffid that created the appointment. 99 when it was created externally (customer via the booking widget, API).
|
|
hooktype
|
always "appointments". Settings webhooks send "sitesettings" - use it when one URL receives both.
|
|
tags
|
the customer's tags at the time of the event, as the last field: [{"id":"1003","name":"VIP"}] ([] when none). Sent only by a site that has customer tags switched on; other sites do not get this field.
|
Settings Webhooks
A settings webhook notifies your system when the business setup changes: business details, branches, staff, services and which staff member gives which service. Each notification describes
one record and carries exactly the fields that the matching API call returns for that record:
| entity | data = one record of |
| siteinfo | /api/siteinfo (business details) |
| branches | /api/branches |
| staff | /api/staff |
| services | /api/services |
| staffservice | /api/staffservice (staff member - service assignment) |
| tags | /api/tags (customer tags) - only for an account that has customer tags switched on. Switching a tag off sends a delete (3), switching it back on an add (1) |
Only the fields the API returns are monitored: a change to any other setting (for example the display order of staff, colours or reminder texts) does not send anything, and a save that changes nothing sends nothing.
Configure it from the settings menu:
Settings / Connectivity / Settings Webhook. Each webhook chooses which entities and which actions it receives (
Send all, below, ignores the action choice). Up to 2 settings webhooks per account; requires the webhook option to be enabled for the account. Destination URLs must use
https (port 443 or 8443), resolve to a public host, and present a valid certificate from a trusted certificate authority that matches the host name - self-signed certificates are refused.
Actions
| 1 - add | a new active record, or an inactive record that became active again (reactivated). Treat it as an upsert. |
| 2 - edit | an API field of an active record changed. changed lists the fields and previous holds their old values. siteinfo only ever sends 2 (except Send all, below, which sends it as 1 like every record). |
| 3 - delete | an active record became inactive (data.status is "0"), or was removed from the account (for example a deleted staff - service assignment; data then holds its last known values). |
Changes to records that are inactive (and stay inactive) are not sent.
Timing and ordering
Changes are sent every few minutes. Each notification carries the record's state at the time the change was detected. Saves made close together, within one detection pass, are combined: several edits send a single edit (action 2), where
changed and
previous compare the record with its state at the previous detection; a record that is added and then deleted, or a value that is changed and then changed back, within one pass sends nothing. Changes detected in different passes are sent as separate notifications, even when delivery is delayed (retries, a paused webhook).
changedate is the time the change was detected, not the exact time of the save. Within one detection pass, adds and edits are sent before deletes, and a staff member's service assignments are deleted before the staff member. A
staffservice notification (a staff member - service assignment) is sent after the notifications for its staff member and its service, when they changed in the same pass and the webhook subscribes to them. A
staffservice notification can therefore refer to a staff member or service you have not received (the webhook does not subscribe to them, the staff member is inactive, or they have not changed since the webhook was created) - read them with
/api/staff or
/api/services.
Each webhook receives its notifications in
id order. A notification that fails holds back the ones after it until it is delivered or the webhook is paused. Ids increase but are not consecutive.
Delivery is
at least once: the same notification (same
id, same data) can arrive again - after a timeout when your server had already accepted it, or when an account admin resends notifications from the webhook's list of notifications in the settings menu ("שלח מכאן" - send from here). Treat
data as the record's state at
changedate, so that processing a notification twice is harmless. If you de-duplicate by
hooktype +
id, a resend requested by the account admin is ignored as well.
Getting started
When a settings webhook is created, the system records the current state of the data within a few minutes (the settings screen shows the time from which the webhook works) and from then on sends only changes. A change saved before that time is part of the recorded starting state and is not sent as a notification. The same applies to an entity added to an existing webhook, unless another webhook of the account already follows that entity. Whenever a start time applies, the settings screen shows it after you save. To receive everything that already exists, press
Send all in the settings menu (at most once every 10 minutes, not while the webhook is paused): every current active record of the entities that webhook subscribes to (and the siteinfo record, if subscribed) is sent once to that webhook as action 1, whatever actions the webhook has chosen. Alternatively read the API calls above once. Without a webhook,
lastapidataupdate of
/api/siteinfo tells you when any of these settings was last saved.
Bulk changes (for example importing 500 staff members) send one notification per record, up to about 50 notifications per webhook every few minutes - a large import is delivered over several minutes. On automation platforms that bill per task (Zapier, Make) this counts as one task per notification.
Retries
A delivery succeeds when your endpoint returns 200
within 4 seconds (connection, request and the response status together - answer first, then do any slow work); a slower answer counts as a failed delivery. The response body is not read. A failed delivery is retried after about 4, 4, 4, 6, 12, 120, 360 and 720 minutes; the notification email set on the webhook gets a warning after the second failure, and after the ninth the webhook is paused and a final mail is sent (resume it from the settings menu). A certificate that is not valid counts as a failed delivery. A webhook whose host no longer leads to a public internet address is paused at once. Notifications are kept while a webhook is paused and are delivered after it resumes - for up to 30 days; older notifications are deleted.
Signature verification
Every settings webhook has a secret (shown to account admins in the settings menu, where it can also be replaced). Each delivery carries
X-Webhook-Timestamp and
X-Webhook-Signature: sha256=<hex>, where hex = HMAC-SHA256(secret, timestamp + "." + raw request body) - exactly as for
appointment webhooks.
Sample - staff member edited (action 2)
Sample - staff - service assignment added (action 1)
Sample - service deactivated (action 3)
Fields explained:
| hooktype | always "sitesettings" (appointment webhooks send "appointments") |
| id | id of the notification (a separate sequence from appointment notifications). "0" = a test sent from the settings menu: one notification per subscribed entity that has at least one record, to the saved address, with action "2", entityid "0", changed [] and previous {}, and data = a real record of the account. |
| entity | siteinfo, branches, staff, services, staffservice or tags |
| action | 1 - add, 2 - edit, 3 - delete |
| siteid | the account |
| entityid | the record's id (data.id; the siteid for siteinfo; for staffservice "<staffid>-<serviceid>", e.g. "123456-1234567" - use data.staff and data.service) |
| changedate | when the change was detected (yyyy-MM-dd HH:mm:ss, Israel time) |
| updateby | the staffid of the user whose save produced the change (the last one, if several users saved within the detection window), as a string. "99" for system changes: changes made by the Tor4You support team, and all events sent by "Send all". null (JSON null) when the user who saved could not be identified. |
| changed | action 2: the data fields that changed. [] otherwise. |
| previous | action 2: the old values of the changed fields. {} otherwise. |
| data | the record, field for field as the API returns it (all values are strings) |
Connecting Make.com / n8n / Zapier
Tor4You connects to automation platforms with no custom code:
triggers use the outgoing webhook, and
actions use this API through the platform's generic HTTP module.
Triggers (Tor4You → platform): run a scenario when an appointment is created / updated / cancelled
- In your scenario, create a webhook trigger and copy the URL the platform gives you:
- Make.com: Webhooks → Custom webhook
- n8n: Webhook node
- Zapier: Webhooks by Zapier → Catch Hook
- Add it as a new webhook in the settings menu (Settings / Connectivity / Webhook): paste the platform URL and give it any name. Copy its secret if you want to verify signatures.
- Press Send test there and use the notification the platform receives to map fields, or just book a test appointment.
Actions (platform → Tor4You): create appointments, customers, read availability
Use the platform's HTTP request module against any endpoint in this documentation:
- Make.com: HTTP → Make a request
- n8n: HTTP Request node
- Zapier: Webhooks by Zapier → POST / GET
Authenticate by adding the request header
torkey: <siteid>-<your key> (the key from the settings menu, Developers page - you can create a dedicated key for each integration, limited to the calls it needs). Typical actions:
/api/addappt,
/api/delappt,
/api/addcust,
/api/availability,
/api/custlist,
/api/apptlist.
Polling instead of webhooks
If you prefer a polling trigger,
/api/apptlist and
/api/custlist support incremental filters (
minid,
mincreatedate) that work as cursors.
n8n starter template
Copy the JSON below, then in n8n use
Workflow → Import from Clipboard. It receives Tor4You events and verifies the signature (put your webhook's secret in the Code node). The webhook URL n8n shows is what you add as a new webhook in the settings menu.
{
"name": "Tor4You appointment events",
"nodes": [
{
"name": "Tor4You Webhook",
"type": "n8n-nodes-base.webhook",
"typeVersion": 2,
"position": [0, 0],
"parameters": { "httpMethod": "POST", "path": "tor4you", "options": { "rawBody": true } }
},
{
"name": "Verify Signature",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [220, 0],
"parameters": { "jsCode": "const crypto = require('crypto');\nconst secret = 'PUT-YOUR-WEBHOOK-SECRET-HERE';\nconst headers = $input.first().json.headers;\nconst ts = headers['x-webhook-timestamp'];\nconst sig = (headers['x-webhook-signature'] || '').replace('sha256=', '');\nif (!$input.first().binary || !$input.first().binary.data) {\n throw new Error('raw body missing - the Webhook node must have the Raw Body option enabled');\n}\nconst body = Buffer.from($input.first().binary.data.data, 'base64').toString('utf8');\nconst expect = crypto.createHmac('sha256', secret).update(ts + '.' + body).digest('hex');\nif (!ts || Math.abs(Date.now() / 1000 - Number(ts)) > 300) { throw new Error('stale or missing timestamp'); }\nif (sig.toLowerCase() !== expect) { throw new Error('bad signature'); }\nreturn [{ json: JSON.parse(body) }];" }
}
],
"connections": {
"Tor4You Webhook": { "main": [[{ "node": "Verify Signature", "type": "main", "index": 0 }]] }
}
}
General site information
URL: | https://www.tor4you.co.il/api/siteinfo |
Method | GET |
Parameters: |
| Name |
Type |
Required |
Comments |
authentication parameters |
|
no |
siteid, key, dt and sh parameters are required only when using the signed parameters authentication method - see making api calls |
|
|
Sample Response: |
|
lastapidataupdate: |
The time of the last save, in the account's settings screens, of any setting this API returns - business details, branches, staff, services and staff - service assignments (yyyy-MM-dd HH:mm:ss.fff, Israel time, the same clock as webhook changedate). It also moves when a setting was saved without a real change, so it tells you when to re-read, not that something certainly changed. Poll this call and read the other calls again whenever the value differs from the one you saw last - or use a Settings Webhook to be told what changed.
"" = no such save since this field was introduced: read everything once and keep polling. Changes made outside the settings screens - for example by the Tor4You team directly in the database, or when an account is copied - do not move it. |
Key information
Returns the API calls the key used for the request can make. Every key can call keyinfo.
When using signed parameters, "auth" is "signed" and all calls are listed.
URL: | https://www.tor4you.co.il/api/keyinfo |
Method | GET |
Parameters: |
| Name |
Type |
Required |
Comments |
authentication parameters |
|
no |
siteid, key, dt and sh parameters are required only when using the signed parameters authentication method - see making api calls |
|
|
Response fields: |
| auth | "key" (API key) or "signed" (signed parameters) |
| keyname | the key's name (API key only) |
| allcalls | 1 = the key can make every call, 0 = only the calls listed |
| calls | the calls the key can make |
| iplist | the IP addresses the key is limited to, empty = any (API key only) |
| maxreqperhour, maxreqper5min | the key's usage limits (API key only) |
|
Sample Response: |
|
Branches
URL: | https://www.tor4you.co.il/api/branches |
Method | GET |
Parameters: |
| Name |
Type |
Required |
Comments |
authentication parameters |
|
no |
siteid, key, dt and sh parameters are required only when using the signed parameters authentication method - see making api calls |
| showcancelled |
numeric |
no |
default = 0 |
|
|
Sample Response: |
|
Staff
URL: | https://www.tor4you.co.il/api/staff |
Method | GET |
Parameters: |
| Name |
Type |
Required |
Comments |
authentication parameters |
|
no |
siteid, key, dt and sh parameters are required only when using the signed parameters authentication method - see making api calls |
| showcancelled |
numeric |
no |
default = 0 |
|
|
Sample Response: |
|
Services
URL: | https://www.tor4you.co.il/api/services |
Method | GET |
Parameters: |
| Name |
Type |
Required |
Comments |
authentication parameters |
|
no |
siteid, key, dt and sh parameters are required only when using the signed parameters authentication method - see making api calls |
| showcancelled |
numeric |
no |
default = 0 |
|
|
Sample Response: |
|
Staff / Service
URL: | https://www.tor4you.co.il/api/staffservice |
Method | GET |
Parameters: |
| Name |
Type |
Required |
Comments |
authentication parameters |
|
no |
siteid, key, dt and sh parameters are required only when using the signed parameters authentication method - see making api calls |
| showcancelled |
numeric |
no |
default = 0 |
|
|
Sample Response: |
|
Slot info
URL: | https://www.tor4you.co.il/api/slotinfo |
Method | GET |
Parameters: |
| Name |
Type |
Required |
Comments |
authentication parameters |
|
no |
siteid, key, dt and sh parameters are required only when using the signed parameters authentication method - see making api calls |
| slotid |
numeric |
yes |
|
|
|
Sample Response: |
|
Add slot
URL: | https://www.tor4you.co.il/api/addslot |
Method | POST |
Parameters: |
| Name |
Type |
Required |
Comments |
authentication parameters |
|
no |
siteid, key, dt and sh parameters are required only when using the signed parameters authentication method - see making api calls |
| staff |
numeric |
yes |
|
| services |
string |
no |
default = 0 (all services) |
| from |
YYYYMMDDhhmm |
yes |
|
| to |
YYYYMMDDhhmm |
yes |
|
| maxmembers |
numeric |
no |
default = 1 |
| zoom |
url |
no |
|
| csrid |
numeric |
no |
staff id of the agent making the change - recorded instead of external (see Making API calls, Acting agent) |
|
|
Sample Response: |
|
Delete slot
URL: | https://www.tor4you.co.il/api/delslot |
Method | POST |
Parameters: |
| Name |
Type |
Required |
Comments |
authentication parameters |
|
no |
siteid, key, dt and sh parameters are required only when using the signed parameters authentication method - see making api calls |
| slotid |
numeric |
yes |
|
| vfib |
string |
yes |
|
| csrid |
numeric |
no |
staff id of the agent making the change - recorded instead of external (see Making API calls, Acting agent) |
|
|
Sample Response: |
|
List time slots
The call is limited to a maximum of 1000 time slots or 60 days.
URL: | https://www.tor4you.co.il/api/slotlist |
Method | GET |
Parameters: |
| Name |
Type |
Required |
Comments |
authentication parameters |
|
no |
siteid, key, dt and sh parameters are required only when using the signed parameters authentication method - see making api calls |
| showcancelled |
numeric |
no |
0 - no (default), 1 - yes |
| showappts |
numeric |
no |
0 - no (default), 1 - yes. Adds the appts field to each slot: the number of active appointments booked in it. |
| from |
YYYYMMDD |
yes |
|
| to |
YYYYMMDD |
yes |
|
| service |
numeric |
no |
|
| staff |
numeric |
no |
|
| linkedonly |
numeric |
no |
0 - no (default), 1 - yes. Used together with service and/or staff: return only slots whose staff member is linked to the service (see staffservice).
Without it, a service search also returns slots that are open to all services ("services": "0") for every staff member, including staff not linked to that service. |
|
|
Response fields: |
| staff | the staff member's id |
| services | the service the slot is limited to, "0" = open to all services (not a staff id) |
| maxmembers | the maximum number of appointments in the slot |
| appts | the number of active appointments booked in the slot (only with showappts=1) |
| zoom | the slot's Zoom meeting code (only on accounts that use Zoom) |
| participants | the total number of participants in the slot's active appointments (only on accounts that count participants) |
|
Sample Response: |
|
Appointment Info
URL: | https://www.tor4you.co.il/api/apptinfo |
Method | GET |
Parameters: |
| Name |
Type |
Required |
Comments |
authentication parameters |
|
no |
siteid, key, dt and sh parameters are required only when using the signed parameters authentication method - see making api calls |
| apptid |
numeric |
yes |
|
|
|
Sample Response: |
|
Appointment History
URL: | https://www.tor4you.co.il/api/appthistory |
Method | GET |
Parameters: |
| Name |
Type |
Required |
Comments |
authentication parameters |
|
no |
siteid, key, dt and sh parameters are required only when using the signed parameters authentication method - see making api calls |
| apptid |
numeric |
yes |
|
|
|
Sample Response: |
|
Add appointment
URL: | https://www.tor4you.co.il/api/addappt |
Method | POST |
Parameters: |
| Name |
Type |
Required |
Comments |
authentication parameters |
|
no |
siteid, key, dt and sh parameters are required only when using the signed parameters authentication method - see making api calls |
| slotid |
numeric |
yes* |
specify slotid and vfib when using time slots, from and to dates otherwise |
| vfib |
string |
yes* |
specify slotid and vfib when using time slots, from and to dates otherwise |
| from |
YYYYMMDDhhmm |
yes* |
specify slotid and vfib when using time slots, from and to dates otherwise |
| to |
YYYYMMDDhhmm |
yes* |
specify slotid and vfib when using time slots, from and to dates otherwise |
| staff |
numeric |
yes |
|
| service |
numeric |
yes |
|
| islozamin |
numeric |
no |
default = 0. if islozamin = 1 then all customer fields are ignored. |
| tz |
numeric |
yes* |
required when istz=2 |
| first |
string |
yes |
|
| last |
string |
yes |
|
| email |
string |
no |
must be valid email |
| cell |
numeric |
yes |
10 digits starting with 05 |
| street |
string |
no |
|
| city |
string |
no |
|
| participants |
numeric |
no |
default = 1 |
| color |
numeric |
no |
0 - 16, default = the service's color, or 0 - see appointment colors |
| notes |
string |
no |
|
| ax1 - ax20 |
string |
no |
If in use, appointment extra fields 1-20 |
| cx1 - cx10 |
string |
no |
If in use, customer extra fields 1-10 |
| zoom |
string |
no |
specify only if not using time slots |
| sendnotice |
numeric |
no |
applies notice settings from site |
| csrid |
numeric |
no |
staff id of the agent making the change - recorded in the history instead of external (see Making API calls, Acting agent) |
|
|
Sample Response: |
|
Delete appointment
URL: | https://www.tor4you.co.il/api/delappt |
Method | POST |
Parameters: |
| Name |
Type |
Required |
Comments |
authentication parameters |
|
no |
siteid, key, dt and sh parameters are required only when using the signed parameters authentication method - see making api calls |
| apptid |
numeric |
yes |
|
| vfib |
string |
yes |
|
| sendnotice |
numeric |
no |
applies notice settings from site |
| csrid |
numeric |
no |
staff id of the agent making the change - recorded in the history instead of external (see Making API calls, Acting agent) |
|
|
Sample Response: |
|
Change appointment color
Sets the color an appointment is shown in on the calendar. To create an appointment in a color, send
color to
addappt instead.
color is 0-16: 0 blue, 1 red, 2 orange, 3 green, 4 purple, 5 light blue, 6 gray, 8 red 2, 9 green 2, 10 yellow, 11 pink, 12 turquoise, 13 brown, 14 silver, 15 gold, 16 white (7 is not used).
URL: | https://www.tor4you.co.il/api/color |
Method | POST |
Parameters: |
| Name |
Type |
Required |
Comments |
authentication parameters |
|
no |
siteid, key, dt and sh parameters are required only when using the signed parameters authentication method - see making api calls |
| apptid |
numeric |
yes |
the appointment id (id in the addappt / apptinfo response) |
| vfib |
string |
yes |
the appointment's vfib (returned by addappt / apptinfo) |
| color |
numeric |
yes |
0 - 16, see above |
| csrid |
numeric |
no |
staff id of the agent making the change - recorded in the history instead of external (see Making API calls, Acting agent) |
|
|
Sample Response: | {"status":1} |
List appointments
This endoint returns multiple appointments based on search criteria.
Important: If you are using this endpoint to regularly retrieve the same queries (for example each hour getting all of today's appointments), you MUST use the last updated (lu) parameter.
The lu parameter indicates the datetime of the latest information you already have. If there is no new information, the endpoint will return "no new information".
For example: a call is made on 1/1/2020 12:34:56.000 to retrieve all of today's appointments. The endpoint will return the appointments and a parameter lu=20200101123456000. The next time the same call is made, it should include the parameter lu=20200101123456000. If there are changes to the appointments after the lu value, the endpoint will return the information normally. If there are no updates, it will return "no new information".
The call is limited to a maximum of 1000 appointments or 60 days.
URL: | https://www.tor4you.co.il/api/apptlist |
Method | GET |
Parameters: |
| Name |
Type |
Required |
Comments |
authentication parameters |
|
no |
siteid, key, dt and sh parameters are required only when using the signed parameters authentication method - see making api calls |
| format |
numeric |
no |
1 - short (default), 2 - long |
| showcancelled |
numeric |
no |
0 - no (default), 1 - yes |
| from |
YYYYMMDD |
yes (or use createdate) |
Enter either from and to for appointment date, or createfrom and createto for appointment create date |
| to |
YYYYMMDD |
yes (or use createdate) |
Enter either from and to for appointment date, or createfrom and createto for appointment create date |
| createfrom |
YYYYMMDD |
yes (or use appointment date) |
Enter either from and to for appointment date, or createfrom and createto for appointment create date |
| createto |
YYYYMMDD |
yes (or use appointment date) |
Enter either from and to for appointment date, or createfrom and createto for appointment create date |
| service |
numeric |
no |
|
| staff |
numeric |
no |
|
| customer |
numeric |
no |
|
| slotid |
numeric |
no |
|
|
|
Sample Response: |
|
Current Appointment Lookup by Cell or Tz
This endoint performs a lookup of a customer's appointments.
The default call returns the customer's appointments
for the current day.
To include past or future appointments, use the showpast or showfuture flags.
The lookup can be performed by the customer's cell or tz.
URL: | https://www.tor4you.co.il/api/apptbycellortz |
Method | GET |
Parameters: |
| Name |
Type |
Required |
Comments |
authentication parameters |
|
no |
siteid, key, dt and sh parameters are required only when using the signed parameters authentication method - see making api calls |
| showcancelled |
numeric |
no |
0 - no (default), 1 - yes |
| showpast |
numeric |
no |
0 - no (default), 1 - yes |
| showfuture |
numeric |
no |
0 - no (default), 1 - yes |
| format |
numeric |
no |
1 - full record (default), 2 - short record: no created/cancelled dates and no ax/cx custom fields |
| cell |
numeric |
yes, or tz |
10 digits starting with 05 |
| tz |
numeric |
yes, or cell |
9 digits |
|
|
Sample Response: |
|
Update Show Status
This endoint can be used to update whether a customer has shown up for a specific appointment.
URL: | https://www.tor4you.co.il/api/showstatus |
Method | GET |
Parameters: |
| Name |
Type |
Required |
Comments |
authentication parameters |
|
no |
siteid, key, dt and sh parameters are required only when using the signed parameters authentication method - see making api calls |
| apptid |
numeric |
yes |
id of appointment to be updated |
| vfib |
string |
yes |
vfib of appointment to be updated |
| showstatus |
numeric |
yes |
0 - not updated, 1 - show, 2 - noshow |
| csrid |
numeric |
no |
staff id of the agent making the change - recorded in the history instead of external (see Making API calls, Acting agent) |
|
|
Sample Response: |
|
Update Extra Fields
This endoint can be used to update extra fields AF1 - AF20 of a specific appointment.
URL: | https://www.tor4you.co.il/api/updateaf |
Method | POST |
Parameters: |
| Name |
Type |
Required |
Comments |
authentication parameters |
|
no |
siteid, key, dt and sh parameters are required only when using the signed parameters authentication method - see making api calls |
| apptid |
numeric |
yes |
id of appointment to be updated |
| vfib |
string |
yes |
vfib of appointment to be updated |
| af1 - af20 |
text |
no |
Send only the fields you wish to update. TO SET AN EMPTY VALUE, SEND MINUS (-) |
| csrid |
numeric |
no |
staff id of the agent making the change - recorded in the history instead of external (see Making API calls, Acting agent) |
|
|
Sample Response: |
|
Update Iscoming Status
This endoint can be used to update whether a customer has responded that they will show up for a specific appointment.
URL: | https://www.tor4you.co.il/api/iscoming |
Method | GET |
Parameters: |
| Name |
Type |
Required |
Comments |
authentication parameters |
|
no |
siteid, key, dt and sh parameters are required only when using the signed parameters authentication method - see making api calls |
| apptid |
numeric |
yes |
id of appointment to be updated |
| vfib |
string |
yes |
vfib of appointment to be updated |
| iscoming |
numeric |
yes |
0 - not updated, 1 - will show, 2 - will not show |
| csrid |
numeric |
no |
staff id of the agent making the change - recorded in the history instead of external (see Making API calls, Acting agent) |
|
|
Sample Response: |
|
Subscription Info
URL: | https://www.tor4you.co.il/api/subinfo |
Method | GET |
Parameters: |
| Name |
Type |
Required |
Comments |
authentication parameters |
|
no |
siteid, key, dt and sh parameters are required only when using the signed parameters authentication method - see making api calls |
| customerid |
numeric |
yes |
|
|
|
Sample Response: |
|
Subscription Usage
URL: | https://www.tor4you.co.il/api/subusage |
Method | GET |
Parameters: |
| Name |
Type |
Required |
Comments |
authentication parameters |
|
no |
siteid, key, dt and sh parameters are required only when using the signed parameters authentication method - see making api calls |
| subid |
numeric |
yes |
|
|
|
Sample Response: |
|
Customer Info
URL: | https://www.tor4you.co.il/api/custinfo |
Method | GET |
Parameters: |
| Name |
Type |
Required |
Comments |
authentication parameters |
|
no |
siteid, key, dt and sh parameters are required only when using the signed parameters authentication method - see making api calls |
| customerid |
numeric |
yes |
|
|
|
Sample Response: |
|
Add Customer
URL: | https://www.tor4you.co.il/api/addcust |
Method | POST |
Parameters: |
| Name |
Type |
Required |
Comments |
authentication parameters |
|
no |
siteid, key, dt and sh parameters are required only when using the signed parameters authentication method - see making api calls |
| tz |
numeric |
no |
unique, required based on site settings |
| first |
string |
yes |
first + cell must be unique |
| last |
string |
yes |
|
| email |
string |
no |
|
| cell |
numeric |
yes |
first + cell must be unique |
| street |
string |
no |
|
| city |
string |
no |
|
| cx1 - cx10 |
string |
no |
|
| csrid |
numeric |
no |
staff id of the agent making the change - recorded in the history instead of external (see Making API calls, Acting agent) |
|
|
Sample Response: |
|
Edit Customer
URL: | https://www.tor4you.co.il/api/editcust |
Method | POST |
Parameters: |
| Name |
Type |
Required |
Comments |
authentication parameters |
|
no |
siteid, key, dt and sh parameters are required only when using the signed parameters authentication method - see making api calls |
| customerid |
numeric |
yes |
|
| tz |
numeric |
no |
unique, required based on site settings |
| first |
string |
yes |
first + cell must be unique |
| last |
string |
yes |
|
| email |
string |
no |
|
| cell |
numeric |
yes |
first + cell must be unique |
| street |
string |
no |
|
| city |
string |
no |
|
| cx1 - cx10 |
string |
no |
|
| csrid |
numeric |
no |
staff id of the agent making the change - recorded in the history instead of external (see Making API calls, Acting agent) |
|
|
IMPORTANT
| Updating customer info will NOT trigger a webhook notice of customer's appointments
Not sending a field is equal to sending a field. For example if a customer's city is Tel Aviv and you send an update without specifying a new value for city, the city field will be updated with blank.
|
Sample Response: |
|
Delete customer
URL: | https://www.tor4you.co.il/api/delcust |
Method | POST |
Parameters: |
| Name |
Type |
Required |
Comments |
authentication parameters |
|
no |
siteid, key, dt and sh parameters are required only when using the signed parameters authentication method - see making api calls |
| customerid |
numeric |
yes |
|
| vfib |
string |
yes |
|
| csrid |
numeric |
no |
staff id of the agent making the change - recorded in the history instead of external (see Making API calls, Acting agent) |
|
|
Sample Response: |
|
List tags
Customer tags are labels a site puts on its customers (up to 10 per customer). These calls work only for a site that has customer tags switched on.
On such a site,
custinfo,
custlist,
apptinfo and
apptlist also return the customer's tags as the last key of each record:
"tags":[{"id":"1003","name":"VIP"}] (
[] when none).
color is 0-9: 0 #1b73ad, 1 #1e7e34, 2 #c62828, 3 #b85c00, 4 #f2c400, 5 #6f42c1, 6 #0b7285, 7 #c2255c, 8 #5a6268, 9 #7b4b2a.
status 1 = on, 0 = switched off (a switched-off tag is hidden from customers and kept, so it can be switched back on).
URL: | https://www.tor4you.co.il/api/tags |
Method | GET |
Parameters: |
| Name |
Type |
Required |
Comments |
authentication parameters |
|
no |
siteid, key, dt and sh parameters are required only when using the signed parameters authentication method - see making api calls |
|
|
Sample Response: | {"status":1, "tags":[{"id":"1003","name":"VIP","color":"2","status":"1"},{"id":"1004","name":"debt","color":"3","status":"0"}]} |
Customer tags
Customer tags are labels a site puts on its customers (up to 10 per customer). These calls work only for a site that has customer tags switched on.
On such a site,
custinfo,
custlist,
apptinfo and
apptlist also return the customer's tags as the last key of each record:
"tags":[{"id":"1003","name":"VIP"}] (
[] when none).
URL: | https://www.tor4you.co.il/api/custtags |
Method | GET |
Parameters: |
| Name |
Type |
Required |
Comments |
authentication parameters |
|
no |
siteid, key, dt and sh parameters are required only when using the signed parameters authentication method - see making api calls |
| customerid |
numeric |
yes |
|
|
|
Sample Response: | {"status":1, "customer":[{"id":"1234567","tags":[{"id":"1003","name":"VIP"}]}]} |
Set customer tags
Customer tags are labels a site puts on its customers (up to 10 per customer). These calls work only for a site that has customer tags switched on.
On such a site,
custinfo,
custlist,
apptinfo and
apptlist also return the customer's tags as the last key of each record:
"tags":[{"id":"1003","name":"VIP"}] (
[] when none).
Sends the FULL set of tags the customer should have. Tags not in the set are removed; an empty set removes all. Switched-off tags are not affected.
URL: | https://www.tor4you.co.il/api/editcusttags |
Method | POST |
Parameters: |
| Name |
Type |
Required |
Comments |
authentication parameters |
|
no |
siteid, key, dt and sh parameters are required only when using the signed parameters authentication method - see making api calls |
| customerid |
numeric |
yes |
|
| vfib |
string |
yes |
|
| tags |
string |
yes |
tag ids separated by commas, e.g. 1003,1007 - up to 10. Empty = no tags. |
|
|
Sample Response: | {"status":1, "customer":[{"id":"1234567","tags":[{"id":"1003","name":"VIP"},{"id":"1007","name":"morning group"}]}]} |
List customers
The call is limited to a maximum of 500 customers.
URL: | https://www.tor4you.co.il/api/custlist |
Method | GET |
Parameters: |
| Name |
Type |
Required |
Comments |
authentication parameters |
|
no |
siteid, key, dt and sh parameters are required only when using the signed parameters authentication method - see making api calls |
| showcancelled |
numeric |
no |
0 - no (default), 1 - yes |
| minid |
numeric |
no |
|
| maxid |
numeric |
no |
|
| mincreatedate |
YYYYMMDD |
no |
|
| maxcreatedate |
YYYYMMDD |
no |
|
| hasappointment |
numeric |
no |
1 - yes, 2 - no, blank - any |
| hasfutureappointment |
numeric |
no |
1 - yes, 2 - no, blank - any |
|
|
Sample Response: |
|
List customer appointments
The call is limited to a maximum of 25 appointments.
URL: | https://www.tor4you.co.il/api/custappts |
Method | GET |
Parameters: |
| Name |
Type |
Required |
Comments |
authentication parameters |
|
no |
siteid, key, dt and sh parameters are required only when using the signed parameters authentication method - see making api calls |
| showcancelled |
numeric |
no |
0 - no (default), 1 - yes |
| showpast |
numeric |
no |
0 - no (default), 1 - yes |
| tz |
numeric |
yes* |
9 digits. Either customerid or tz or first name and cell must be provided |
| first |
string |
yes* |
Either customerid or tz or first name and cell must be provided |
| cell |
numeric |
yes* |
10 digits starting with 05. Either customerid or tz or first name and cell must be provided |
| customerid |
numeric |
yes* |
Either customerid or tz or first name and cell must be provided |
|
|
Sample Response: |
|
Availability
This endpoint is used to find available time slots or appointment times based on specific criteria. The availability returned is according to rules that apply to external customers as (for example minimum and maximum time periods, external services, etc.)
The call is limited to a maximum of 500 available spots or 31 days (60 days for timeslot accounts).
To enable selection of dates first, you can set the dateonly parameter to 1. The endpoint will return all available dates, and after the user makes a selection of the requested date, send dateonly=0 and the requested date, and the endpoint wil return the available times.
When not using slots, the openhours returned are unique and randomly distributed among the available staff to ensure equal allocation. For example if there are five available staff at the same date, only one will be selected randomly and shown.
URL: | https://www.tor4you.co.il/api/availability |
Method | GET |
Parameters: |
| Name |
Type |
Required |
Comments |
authentication parameters |
|
no |
siteid, key, dt and sh parameters are required only when using the signed parameters authentication method - see making api calls |
| from |
YYYYMMDD |
yes |
|
| to |
YYYYMMDD |
yes |
|
| service |
numeric |
yes |
|
| staff |
numeric |
no |
|
| branch |
numeric |
no |
|
| participants |
numeric |
no |
default = 1 |
| dateonly |
numeric |
no |
default = 0. Whether to return only dates or all available dates and times. |
| internal |
numeric |
no |
default = 0. Whether to allow services that external users are not allowed to book. |
|
|
Sample Response using dateonly=1: |
|
Sample Response using dateonly=0 (using slots): |
|
Sample Response using dateonly=0 (without slots): |
|
Contact Us
We are always interested in what our users have to say. If you wish to contact us regarding the following:
- technical support
- usage limits
- bugs and problems
- special requests and custom options
- just to say hello
please do not hesitate to
contact us.
We look forward to hearing from you.