# Getting started

> **The Cliento API is under development**
>
> We welcome your feedback. Tell us [in the chat](https://developers.cliento.com/docs/help.md) what you're missing, or what your business
> needs.

Cliento is a complete booking system with point of sale (POS). As a developer you can build on
it in two ways: connect your own systems to the data in Cliento, or put Cliento's online booking
in front of your customers.

| You want to | Use | Start here |
|---|---|---|
| Read and write an organisation's data in Cliento from your own servers | Cliento API | [Get a sandbox and a key](#cliento-api) |
| Let customers book on your website | Booking widget | [Paste the snippet](#booking-widget) |
| Let customers book without having a website | Hosted booking page | [Share the link](#hosted-booking-page) |
| Build your own booking flow or app | Widget API | [Make the first call](#rest-api) |

## Cliento API

The Cliento API gives your own systems server-to-server access to an organisation's data in
Cliento. It is a REST API with JSON bodies, authenticated with an API key. You can try it in
a few minutes, without being a Cliento customer:

1. **[Sign up](/signup).** You confirm your email address and choose a password, and you get a
   sandbox: an organisation of your own with test data, on the same API as live accounts.
2. **Create an API key** for the sandbox on your [account page](/account), and choose what the
   key may do (its scopes). The key is shown once: copy it then.
3. **Make your first request.** List the locations the key can be used on:

   ```bash
   curl https://api.cliento.com/v1/locations \
     -H "Authorization: Bearer $CLIENTO_API_KEY"
   ```

4. **Build.** Almost everything else is addressed under a location. The
   [Cliento API overview](https://developers.cliento.com/docs/api.md) explains the basics, and the
   [API reference](/docs/api/reference/) lists every endpoint with code samples.

When your integration works in the sandbox, the same code runs against a live organisation
with a key created for that organisation. An organisation you belong to is listed on your
account page next to your sandboxes.

<a id="online-booking"></a>

## Online booking

There are three ways to let customers book online. The
[Online booking overview](https://developers.cliento.com/docs/online-booking.md) compares them side by side.

For the widget and the Widget API you need the **id** of the Cliento account. It is in Cliento
under **Admin > Onlinebokning > Bokningssida / Widget**.

<a id="booking-widget"></a>

### Booking widget

Paste this where the widget should appear on your page, with the account's id:

```javascript
<script>
(function(c,l,i,e,n,t,o){if(c.cbk){return;}c.cbk=function(){
c.cbk.p.push(arguments);};c.cbk.p=[];e=l.createElement("script");e.async=1;
e.src=i;l.head.appendChild(e);n=l.createElement("div");n.id="cliento-booking";
t=l.getElementsByTagName("script");o=t[t.length-1];o.parentNode.insertBefore(n,o);
})(window,document,"https://cliento.com/widget-v3/cliento.js");
cbk("id", "[ENTER ID FOR ACCOUNT]");
</script>
```

That is a working booking flow. From there, the [Booking widget](https://developers.cliento.com/docs/widget.md) section shows
how to choose what it offers ([parameters](https://developers.cliento.com/docs/widget/parameters.md)), match your site
([styling](https://developers.cliento.com/docs/widget/styling.md)) and follow bookings in your analytics
([tracking](https://developers.cliento.com/docs/widget/tracking.md)).

### Hosted booking page

No website? Cliento hosts a ready-made booking page for the business. There is nothing to
install: you share its address. See [Hosted booking page](https://developers.cliento.com/docs/widget/booking-page.md).

<a id="rest-api"></a>

### Widget API

The Widget API is the API the widget itself runs on. Use it to build your own booking flow when
the widget is not enough: your own design, your own steps, or a native app. It needs no API key
and is called straight from the customer's browser.

The calls that make a booking go to the account's own base URL, built from the account's id:

```
https://apibk.cliento.com/api/v2/partner/cliento/{id}
```

**1. Load what can be booked.** Ref-data lists the account's services and the resources (the
staff or rooms) that perform them. This is what you render as the first step of your booking
flow. The call below goes to a test account, so you can run it as it is:

```bash
curl https://apibk.cliento.com/api/v2/partner/cliento/1uAKYvE7mWcnxxdMuixis/ref-data/ \
  -H "Accept: application/json"
```

```json
{
  "services": [
    { "serviceId": 68811, "name": "Women's haircut", "minDuration": 45, "minPrice": 595.0 }
  ],
  "resources": [
    { "id": 12816, "name": "Anna B.", "hashId": "Q45V5W" }
  ],
  "resourceMappings": {
    "12816:68811": { "serviceDuration": 45, "price": 595.0, "webAllowBooking": true }
  }
}
```

That is a shortened example of the answer; [Settings and ref-data](https://developers.cliento.com/docs/widget-api/reference-data.md) explains
every part.

**2. Find a free time.** When the customer has chosen a service and a resource, ask for the
available slots in a range of dates, with the ids from ref-data:

```bash
curl "https://apibk.cliento.com/api/v2/partner/cliento/1uAKYvE7mWcnxxdMuixis/resources/slots?srvIds=68811&resIds=12816&fromDate=2026-10-26&toDate=2026-11-01" \
  -H "Accept: application/json"
```

**3. Book it.** Reserve the chosen slot, add the customer's details and confirm. The
[Booking flow](https://developers.cliento.com/docs/widget-api/booking-flow.md) guide walks through the whole sequence in six steps,
from loading services to a confirmed booking.

Before you build, read the [Widget API overview](https://developers.cliento.com/docs/widget-api.md): the API is not versioned
and is rate limited, and some accounts require a captcha.
