# Razvijalci,razvijalci,razvijalci!

Vse, kar je v Makeplans, je tudi v API-ju: REST in JSON, webhooki za vsako spremembo in strežnik MCP za pomočnike z umetno inteligenco.

[Preberite dokumentacijo API](https://developer.makeplans.com)

- REST + JSON
- Webhooks
- MCP
- iCal
- CSV

```
$ curl https://youraccount.makeplans.com/api/v1/services/42/slots?from=2026-11-19 \
  -H 'Authorization: Bearer $MAKEPLANS_API_KEY' \
  -H 'User-Agent: MyApp' \
  -H 'Accept: application/json'
[
  {
    "slot": {
      "timestamp": "2026-11-19T10:30:00+01:00",
      "timestamp_end": "2026-11-19T11:30:00+01:00",
      "free": 1,
      "available_resources": [1, 2],
      "maximum_capacity": 2
    }
  },
  {
    "slot": {
      "timestamp": "2026-11-19T13:00:00+01:00",
      "timestamp_end": "2026-11-19T14:00:00+01:00",
      "free": 2,
      "available_resources": [1, 2],
      "maximum_capacity": 2
    }
  }
]$ curl https://youraccount.makeplans.com/api/v1/bookings -X POST \
  -H 'Authorization: Bearer $MAKEPLANS_API_KEY' \
  -H 'User-Agent: MyApp' \
  -H 'Accept: application/json' \
  -d 'booking[service_id]=42' \
  -d 'booking[resource_id]=1' \
  -d 'booking[booked_from]=2026-11-19T10:30:00+01:00' \
  -d 'booking[booked_to]=2026-11-19T11:30:00+01:00'
{
  "booking": {
    "id": 1337,
    "state": "confirmed",
    "service_id": 42,
    "resource_id": 1,
    "booked_from": "2026-11-19T10:30:00+01:00",
    "booked_to": "2026-11-19T11:30:00+01:00"
  }
}
```

```
curl https://youraccount.makeplans.com/api/v1/services/42/slots?from=2026-11-19 \
  -H 'Authorization: Bearer $MAKEPLANS_API_KEY' \
  -H 'User-Agent: MyApp' \
  -H 'Accept: application/json'
```

```
[
  {
    "slot": {
      "timestamp": "2026-11-19T10:30:00+01:00",
      "timestamp_end": "2026-11-19T11:30:00+01:00",
      "free": 1,
      "available_resources": [1, 2],
      "maximum_capacity": 2
    }
  },
  {
    "slot": {
      "timestamp": "2026-11-19T13:00:00+01:00",
      "timestamp_end": "2026-11-19T14:00:00+01:00",
      "free": 2,
      "available_resources": [1, 2],
      "maximum_capacity": 2
    }
  }
]
```

```
# 10:30 is free. Book it.
```

```
curl https://youraccount.makeplans.com/api/v1/bookings -X POST \
  -H 'Authorization: Bearer $MAKEPLANS_API_KEY' \
  -H 'User-Agent: MyApp' \
  -H 'Accept: application/json' \
  -d 'booking[service_id]=42' \
  -d 'booking[resource_id]=1' \
  -d 'booking[booked_from]=2026-11-19T10:30:00+01:00' \
  -d 'booking[booked_to]=2026-11-19T11:30:00+01:00'
```

```
{
  "booking": {
    "id": 1337,
    "state": "confirmed",
    "service_id": 42,
    "resource_id": 1,
    "booked_from": "2026-11-19T10:30:00+01:00",
    "booked_to": "2026-11-19T11:30:00+01:00"
  }
}
```

```
const api = "https://youraccount.makeplans.com/api/v1";
const headers = {
  Authorization: `Bearer ${process.env.MAKEPLANS_API_KEY}`,
  "User-Agent": "MyApp",
  Accept: "application/json",
};

// Find the first free slot
const slots = await fetch(`${api}/services/42/slots?from=2026-11-19`, { headers })
  .then((res) => res.json());
const { slot } = slots.find(({ slot }) => slot.free > 0);

// Book it
const booking = await fetch(`${api}/bookings`, {
  method: "POST",
  headers,
  body: new URLSearchParams({
    "booking[service_id]": "42",
    "booking[resource_id]": String(slot.available_resources[0]),
    "booking[booked_from]": slot.timestamp,
    "booking[booked_to]": slot.timestamp_end,
  }),
}).then((res) => res.json());

console.log(booking);
```

```
{
  "booking": {
    "id": 1337,
    "state": "confirmed",
    "service_id": 42,
    "resource_id": 1,
    "booked_from": "2026-11-19T10:30:00+01:00",
    "booked_to": "2026-11-19T11:30:00+01:00"
  }
}
```

```
require "net/http"
require "json"

API = "https://youraccount.makeplans.com/api/v1"

def makeplans(request)
  request["Authorization"] = "Bearer #{ENV.fetch('MAKEPLANS_API_KEY')}"
  request["User-Agent"] = "MyApp"
  request["Accept"] = "application/json"
  uri = request.uri
  response = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(request) }
  JSON.parse(response.body)
end

# Find the first free slot
slots = makeplans(Net::HTTP::Get.new(URI("#{API}/services/42/slots?from=2026-11-19")))
slot = slots.map { |s| s["slot"] }.find { |s| s["free"] > 0 }

# Book it
post = Net::HTTP::Post.new(URI("#{API}/bookings"))
post.set_form_data(
  "booking[service_id]" => 42,
  "booking[resource_id]" => slot["available_resources"].first,
  "booking[booked_from]" => slot["timestamp"],
  "booking[booked_to]" => slot["timestamp_end"]
)
puts makeplans(post)
```

```
{
  "booking": {
    "id": 1337,
    "state": "confirmed",
    "service_id": 42,
    "resource_id": 1,
    "booked_from": "2026-11-19T10:30:00+01:00",
    "booked_to": "2026-11-19T11:30:00+01:00"
  }
}
```

```
import os
import requests

API = "https://youraccount.makeplans.com/api/v1"
session = requests.Session()
session.headers.update({
    "Authorization": f"Bearer {os.environ['MAKEPLANS_API_KEY']}",
    "User-Agent": "MyApp",
    "Accept": "application/json",
})

# Find the first free slot
slots = session.get(f"{API}/services/42/slots", params={"from": "2026-11-19"}).json()
slot = next(s["slot"] for s in slots if s["slot"]["free"] > 0)

# Book it
booking = session.post(f"{API}/bookings", data={
    "booking[service_id]": 42,
    "booking[resource_id]": slot["available_resources"][0],
    "booking[booked_from]": slot["timestamp"],
    "booking[booked_to]": slot["timestamp_end"],
}).json()
print(booking)
```

```
{
  "booking": {
    "id": 1337,
    "state": "confirmed",
    "service_id": 42,
    "resource_id": 1,
    "booked_from": "2026-11-19T10:30:00+01:00",
    "booked_to": "2026-11-19T11:30:00+01:00"
  }
}
```

## Pripravljeno v nekaj minutah

### Pridobite ključ API

API omogočite pod Nastavitve → Integracije → API in kopirajte ključ.

### Pošljite prvo zahtevo

Ključ pošljite kot žeton Bearer. Vsak objekt ima svojo končno točko, vse v JSON.

### Spremljajte spremembe

Dodajte webhook in ob spremembi rezervacij, dogodkov ali strank bomo na vaš strežnik poslali zahtevo POST.

## Dva API-ja

### Javni API

Brez ključa. Prikažite storitve in proste termine ter začnite rezervacijo kar na svoji spletni strani.

`https://youraccount.makeplans.com/`

### Zasebni API

Poln dostop do vašega računa s ključem API, za vaše zaledje in integracije. Ključa ne vključujte v javno kodo.

`https://youraccount.makeplans.com/api/v1/`

## Povežite Makeplans s svojo interno aplikacijo ali spletno stranjo

Vse funkcije Makeplans so na voljo prek API-ja. API temelji na REST in uporablja JSON. Pošiljamo lahko tudi webhooke.

- [Slots](https://developer.makeplans.com/endpoints/slots/)
- [Bookings](https://developer.makeplans.com/endpoints/bookings/)
- [People](https://developer.makeplans.com/endpoints/people/)
- [Services](https://developer.makeplans.com/endpoints/services/)
- [Events](https://developer.makeplans.com/endpoints/events/)
- [Resources](https://developer.makeplans.com/endpoints/resources/)
- [Resource Exception Dates](https://developer.makeplans.com/endpoints/resource-exception-dates/)
- [Providers](https://developer.makeplans.com/endpoints/providers/)
- [Categories](https://developer.makeplans.com/endpoints/categories/)
- [Coupons](https://developer.makeplans.com/endpoints/coupons/)
- [Orders](https://developer.makeplans.com/endpoints/orders/)
- [Gift Cards](https://developer.makeplans.com/endpoints/gift-cards/)
- [Message Templates](https://developer.makeplans.com/endpoints/message-templates/)
- [Webhooks](https://developer.makeplans.com/endpoints/webhooks/)
- [Account](https://developer.makeplans.com/endpoints/account/)
- [Passes](https://developer.makeplans.com/endpoints/passes/)
- [Subscriptions](https://developer.makeplans.com/endpoints/subscriptions/)
- [Vse končne točke](https://developer.makeplans.com/endpoints/)

## Povežite svojega pomočnika UI (MCP)

Makeplans ponuja strežnik MCP, da lahko pomočniki z umetno inteligenco, kot sta Claude in ChatGPT, delajo z vašimi rezervacijami. Pomočniku naročite, naj preveri proste termine, poišče stranko ali ustvari in prekliče rezervacijo – z vašimi lastnimi podatki za prijavo v Makeplans.

MCP (Model Context Protocol) je odprt standard. Poveže se lahko vsak pomočnik ali agent, ki podpira MCP – brez lastniškega vtičnika in brez vezave, tako kot pri vsem drugem, kar gradimo.

### Orodja, ki jih dobi vaš pomočnik

- `find_available_slots`
- `list_services`
- `list_events`
- `list_bookings`
- `get_booking`
- `find_customer`
- `create_booking`
- `cancel_booking`

### Povežite Claude Code z eno vrstico

```
claude mcp add --transport http makeplans \
  https://youraccount.makeplans.com/api/mcp \
  --header "Authorization: Bearer $MAKEPLANS_API_KEY"
```

Preberite več o našem [pomočniku UI za rezervacije](/sl/resitve/ai-pomocnik-za-rezervacije/).

Naroči Anno na masažo v petek ob 14:00

Poiščem storitev masaže in Anno med strankami.

M`list_services`

```
→{}←[{"id": 42, "title": "Massage", "interval": 60}]
```

M`find_customer`

```
→{"query": "Anna"}←[{"id": 7, "name": "Anna Nordmann"}]
```

M`find_available_slots`

```
→{"service_id": 42, "from": "2026-11-13"}←[{"timestamp": "2026-11-13T14:00:00+01:00", "free": 1}]
```

M`create_booking`

```
→{"service_id": 42, "person_id": 7, "booked_from": "2026-11-13T14:00:00+01:00"}←{"id": 1338, "state": "confirmed"}
```

Rezervirano: Anna Nordmann, masaža v petek ob 14:00. Prejela bo potrditev in opomnik.

## Webhooki za vsako spremembo

Ko je rezervacija ustvarjena, potrjena, prestavljena ali preklicana, jo s POST pošljemo na vaš strežnik, podpisano s HMAC SHA-256, da veste, da je prišla od nas. Prevzameta jo lahko tudi Zapier in Make.

Mmakeplans

{ }your server

Zapier

Make

POST https://example.com/webhooks

```
X-MakePlans-Signature: sha256=5257a869e7ec…{
  "event": "booking.created",
  "idempotency_id": "evt_4810",
  "generated_at": "2026-11-12T02:37:29Z",
  "performed_by": "customer",
  "data": {
    "object": "booking",
    "id": 1337,
    "booking": { "id": 1337, "state": "confirmed" }
  }
}
```

tail -f webhooks.log

```
02:37:29 POST /webhooks **booking.created** _200 OK_signature ✓
```

## Prilagajanje standardne rezervacijske strani

Standardno rezervacijsko stran lahko prilagodite z lastnim CSS. Poleg tega lahko s predložnim jezikom Liquid [prilagodite obrazce](https://github.com/makeplans/makeplans-custom-forms) in vsa [odhodna sporočila](https://github.com/makeplans/makeplans-custom-messages).

custom.css

.booking-site {--accent: #2a8c8f;--background: #f1f8f8;--text: #173f44;--soft: #d9ecec;--radius: 14px;--font: "Avenir Next", sans-serif;}

// Kliknite vrednost, da jo spremenite

 Vaše podjetje Vaša rezervacijska stran, vaš slog 

**12**** 13 ****14**** 15**

09:0010:3011:0013:0014:3016:00
Rezerviraj

### Vgrajene integracije

Makeplans ima že vgrajenih kar nekaj integracij. Več o tem na naši [strani z integracijami](/sl/integracije/). Poleg neposrednih integracij smo povezani tudi s platformama [Zapier](/sl/integracije/zapier/) in [Make](/sl/integracije/make/), s katerima se lahko brez programiranja povežete z drugimi aplikacijami.

### Izvoz podatkov

Rezervacije, stranke in dogodke lahko preprosto izvozite in prenesete v obliki CSV.

### Viri iCalendar

Za prikaz terminov iz Makeplans v drugih koledarskih aplikacijah ponujamo vir iCalendar, ki ga lahko uporabite v aplikacijah Google Calendar, Koledar za macOS in iOS, v sistemu Android, v programu Outlook in drugih koledarskih aplikacijah.

## Poglobite se v dokumentacijo

- [Vodnik](https://developer.makeplans.com/guide/getting-started/)
- [Končne točke API](https://developer.makeplans.com/endpoints/)
- [Primeri](https://developer.makeplans.com/examples/overview/)
- [Dnevnik sprememb](https://developer.makeplans.com/changelog/)
- [Partnerski API](https://developer.makeplans.com/partner/)

Našo [dokumentacijo API najdete na developer.makeplans.com](https://developer.makeplans.com).
