# Introduction

Welcome to **Bookinglayer’s Private API** documentation.

The Bookinglayer API is organised around REST. Our API has predictable (at least for us) resource-oriented URLs, accepts form-encoded and JSON-encoded request bodies, returns JSON-encoded responses. Uses standard HTTP response codes, authentication, and verbs. We use built-in HTTP features, like HTTP authentication and HTTP verbs, which are understood by off-the-shelf HTTP clients. We support cross-origin resource sharing, allowing you to interact securely with our API from a client-side web application. JSON is returned by all API responses, including errors.

API support <mark style="color:blue;">GET</mark> <mark style="color:green;">POST</mark> <mark style="color:orange;">PUT</mark> and <mark style="color:red;">DELETE</mark> queries. Each response is valid JSON object and contain at least one key: **errors** or **data**. If response has success status, it contain data key at response object. Data object can be an **Object** or **Array of Objects**.

```json
{
    "data": {
        "id": "05fac8b1-aefe-4aff-80b3-52389266ffc7",
        "title": "Costa Rica",
        "abbreviation": "CR",
        "address": "Somewhere in Costa Rica 123",
        "zip_code": "12345",
        "city": "Jaco",
        "country_code": "CR",
        "latitude": "9.62023960",
        "longitude": "-84.62174800",
        "metadata": null,
        "created_at": "2023-02-25T18:23:13+00:00",
        "updated_at": "2023-02-25T18:23:13+00:00"
    }
}
```

Each <mark style="color:green;">POST</mark> or <mark style="color:orange;">PUT</mark> request must contain a valid JSON Object **without** data wrapper.

```json
{
    "title": "Costa Rica - Jaco"
}
```
