API ReferenceView as MarkdownOpenAPI

Services

View as Markdown

Services are what clients book: an appointment with a duration, price, staff members who perform it and the hours it is available. Creating a service makes it bookable on the site; each booking of it is a Booking.

Endpoints that need a token: the site owner creates it in their admin (Developers > API reference). AI assistants: how to ask the user for one.

21 endpoints in 2 parts: Service, User Locked Hours.

Retrieve the locations map

The map of service locations. The map page itself; it loads its points from /locations-search.

User with access

Needs a signed-in user whose plan grants access.

Status codes

200 401 402 500

GET/locations-map
curl -X GET 'http://smartman.max-media.io/locations-map?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'

Update the service allowed range

Locks the hours outside each service's allowed ranges (services). services is a list of services with their allowed ranges.

User token

Needs the token of a signed-in user.

Parameters
servicesstring

The service allowed range's services.

Status codes

200 400 401 500

PATCH/service-allowed-ranges
curl -X PATCH 'http://smartman.max-media.io/service-allowed-ranges?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{ "services": "..." }'

Like or unlike a service

Likes or unlikes a service and notifies its owner. Calling it again takes the like back. Answers { like }.

User token

Needs the token of a signed-in user.

Path parameters
idstringRequired

The ID of the service.

Returns

Returns the Service object.

Status codes

200 400 401 404 500

PATCH/service-likes/:id
curl -X PATCH 'http://smartman.max-media.io/service-likes/{id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
{
  "title": "Example",
  "url": "example-item",
  "static_url": "example-item",
  "header": "example",
  "description": "Text shown on the site.",
  "bookable": true,
  "expirable": false,
  "confirm_bookings": false,
  "show_notes": false,
  "minutes_delete_bookings": 1,
  "medias": [
    {
      "media": "6543210fedcba98765432100",
      "gcs_url": "example-item",
      "gcs_480_30_url": "example-item",
      "gcs_720_30_url": "example-item",
      "gcs_1080_30_url": "example-item",
      "duration": 1,
      "vimeo_uri": "example",
      "vimeo_picture": "example",
      "vimeo_url": "example-item",
      "youtube_url": "example-item",
      "youtube_picture": "example",
      "thumbnail": "example",
      "_id": "6543210fedcba98765432100"
    }
  ],
  "collection_id": "6543210fedcba98765432100",
  "price": 49.9,
  "online_payment": false,
  "book_by_date": false,
  "book_date_range": false,
  "start_date": "2026-11-04T12:00:00.000Z",
  "end_date": "2026-11-04T12:00:00.000Z",
  "day_offset": 0,
  "is_recurring": false,
  "max_participants": 1,
  "session_duration": 1,
  "time_between_sessions": 0,
  "discount": [
    {
      "days": 1,
      "per_total_price": 49.9,
      "fixed_price": 49.9,
      "per_day": 1,
      "_id": "6543210fedcba98765432100"
    }
  ],
  "monday": {
    "active": false,
    "hours": "example"
  },
  "tuesday": {
    "active": false,
    "hours": "example"
  },
  "wednesday": {
    "active": false,
    "hours": "example"
  },
  "thursday": {
    "active": false,
    "hours": "example"
  },
  "friday": {
    "active": false,
    "hours": "example"
  },
  "saturday": {
    "active": false
  }
}

Find a service by its address

Opens a service in the app (redirects to its app page). For links shared from the app: the website sends the visitor to the service in the app.

Optional user

Works without a token; with a user token the answer is personal.

Path parameters
urlstringRequired

The service's URL slug, as in its address on the site.

Status codes

200 500

GET/service-redirect/:url
curl -X GET 'http://smartman.max-media.io/service-redirect/{url}?ionic=true'
Response
{
  "zip_code": "example",
  "city": "example",
  "address": "example",
  "contact": "example",
  "email": "jane@example.com",
  "google_app": "example",
  "workhours": "example",
  "logo": "6543210fedcba98765432100",
  "site_name": "Example",
  "domain": "example",
  "stock_domain": "example",
  "isMarket": false,
  "forbidden_collections": [
    {
      "collection_id": "6543210fedcba98765432100",
      "_id": "6543210fedcba98765432100"
    }
  ],
  "isInit": false,
  "template": "0000",
  "lang": "en",
  "favicon": "6543210fedcba98765432100",
  "cacheEnabled": false,
  "has_completed_startup_prompt": true,
  "gmb_location": "example",
  "ga_property": "example",
  "site_generated_at": "2026-11-04T12:00:00.000Z",
  "admin_first_opened_at": "2026-11-04T12:00:00.000Z",
  "admin_last_opened_at": "2026-11-04T12:00:00.000Z",
  "allowedComponents": {
    "services": false,
    "products": false,
    "blogposts": false,
    "programs": false
  }
}

Save or unsave a service

Saves or unsaves a service for the signed-in user. Calling it again unsaves.

User token

Needs the token of a signed-in user.

Path parameters
idstringRequired

The ID of the service.

Returns

Returns the Service object.

Status codes

200 400 401 404 500

PATCH/service-saves/:id
curl -X PATCH 'http://smartman.max-media.io/service-saves/{id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
{
  "title": "Example",
  "url": "example-item",
  "static_url": "example-item",
  "header": "example",
  "description": "Text shown on the site.",
  "bookable": true,
  "expirable": false,
  "confirm_bookings": false,
  "show_notes": false,
  "minutes_delete_bookings": 1,
  "medias": [
    {
      "media": "6543210fedcba98765432100",
      "gcs_url": "example-item",
      "gcs_480_30_url": "example-item",
      "gcs_720_30_url": "example-item",
      "gcs_1080_30_url": "example-item",
      "duration": 1,
      "vimeo_uri": "example",
      "vimeo_picture": "example",
      "vimeo_url": "example-item",
      "youtube_url": "example-item",
      "youtube_picture": "example",
      "thumbnail": "example",
      "_id": "6543210fedcba98765432100"
    }
  ],
  "collection_id": "6543210fedcba98765432100",
  "price": 49.9,
  "online_payment": false,
  "book_by_date": false,
  "book_date_range": false,
  "start_date": "2026-11-04T12:00:00.000Z",
  "end_date": "2026-11-04T12:00:00.000Z",
  "day_offset": 0,
  "is_recurring": false,
  "max_participants": 1,
  "session_duration": 1,
  "time_between_sessions": 0,
  "discount": [
    {
      "days": 1,
      "per_total_price": 49.9,
      "fixed_price": 49.9,
      "per_day": 1,
      "_id": "6543210fedcba98765432100"
    }
  ],
  "monday": {
    "active": false,
    "hours": "example"
  },
  "tuesday": {
    "active": false,
    "hours": "example"
  },
  "wednesday": {
    "active": false,
    "hours": "example"
  },
  "thursday": {
    "active": false,
    "hours": "example"
  },
  "friday": {
    "active": false,
    "hours": "example"
  },
  "saturday": {
    "active": false
  }
}

List all services

The services page, or the services as JSON with ?ionic: filtered by category and published state, and sorted. Paged with ?skip. Filters: ?collection, ?origin_address, ?published, ?selectedDate (services free that day); ?sortBy sets the order. Cached for an hour.

User with accessOptional user

Needs a signed-in user whose plan grants access.

Query parameters
publishedstring

Only services with this published.

completedstring

Only services with this completed.

sortBystring

The order of the results.

collectionstring

Only results in this collection.

origin_addressstring

Only services with this origin address.

skipstring

How many results to skip - for paging.

wherestring

Only services with this where.

selectedDatestring

Only services with this selected date.

Returns

Returns a list of Service objects.

Status codes

200 401 402 404 500

GET/services
curl -X GET 'http://smartman.max-media.io/services?ionic=true&published=...&completed=...&sortBy=...' \
  -H 'Authorization: Bearer <TOKEN>'
Response
[
  {
    "title": "Example",
    "url": "example-item",
    "static_url": "example-item",
    "header": "example",
    "description": "Text shown on the site.",
    "bookable": true,
    "expirable": false,
    "confirm_bookings": false,
    "show_notes": false,
    "minutes_delete_bookings": 1,
    "medias": [
      {
        "media": "6543210fedcba98765432100",
        "gcs_url": "example-item",
        "gcs_480_30_url": "example-item",
        "gcs_720_30_url": "example-item",
        "gcs_1080_30_url": "example-item",
        "duration": 1,
        "vimeo_uri": "example",
        "vimeo_picture": "example",
        "vimeo_url": "example-item",
        "youtube_url": "example-item",
        "youtube_picture": "example",
        "thumbnail": "example",
        "_id": "6543210fedcba98765432100"
      }
    ],
    "collection_id": "6543210fedcba98765432100",
    "price": 49.9,
    "online_payment": false,
    "book_by_date": false,
    "book_date_range": false,
    "start_date": "2026-11-04T12:00:00.000Z",
    "end_date": "2026-11-04T12:00:00.000Z",
    "day_offset": 0,
    "is_recurring": false,
    "max_participants": 1,
    "session_duration": 1,
    "time_between_sessions": 0,
    "discount": [
      {
        "days": 1,
        "per_total_price": 49.9,
        "fixed_price": 49.9,
        "per_day": 1,
        "_id": "6543210fedcba98765432100"
      }
    ],
    "monday": {
      "active": false,
      "hours": "example"
    },
    "tuesday": {
      "active": false,
      "hours": "example"
    },
    "wednesday": {
      "active": false,
      "hours": "example"
    },
    "thursday": {
      "active": false,
      "hours": "example"
    },
    "friday": {
      "active": false,
      "hours": "example"
    },
    "saturday": {
      "active": false
    }
  }
]

Create a service

Creates a service. url is made from title, so do not send one. Answers 201 with the service. To create it for an account you manage, send on_behalf_of (403 without catalogue rights). In social mode the url gets a number appended and a non-admin's service waits for review.

Optional userUser token

Works without a token; with a user token the answer is personal.

Parameters
titlestring

Title of service.

on_behalf_ofstring

The service's on behalf of.

addressstring

Where is the service performed.

Returns

Returns the Service object.

Status codes

201 400 401 403 500

POST/services
curl -X POST 'http://smartman.max-media.io/services?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{ "title": "...", "on_behalf_of": "...", "address": "..." }'
Response
{
  "title": "Example",
  "url": "example-item",
  "static_url": "example-item",
  "header": "example",
  "description": "Text shown on the site.",
  "bookable": true,
  "expirable": false,
  "confirm_bookings": false,
  "show_notes": false,
  "minutes_delete_bookings": 1,
  "medias": [
    {
      "media": "6543210fedcba98765432100",
      "gcs_url": "example-item",
      "gcs_480_30_url": "example-item",
      "gcs_720_30_url": "example-item",
      "gcs_1080_30_url": "example-item",
      "duration": 1,
      "vimeo_uri": "example",
      "vimeo_picture": "example",
      "vimeo_url": "example-item",
      "youtube_url": "example-item",
      "youtube_picture": "example",
      "thumbnail": "example",
      "_id": "6543210fedcba98765432100"
    }
  ],
  "collection_id": "6543210fedcba98765432100",
  "price": 49.9,
  "online_payment": false,
  "book_by_date": false,
  "book_date_range": false,
  "start_date": "2026-11-04T12:00:00.000Z",
  "end_date": "2026-11-04T12:00:00.000Z",
  "day_offset": 0,
  "is_recurring": false,
  "max_participants": 1,
  "session_duration": 1,
  "time_between_sessions": 0,
  "discount": [
    {
      "days": 1,
      "per_total_price": 49.9,
      "fixed_price": 49.9,
      "per_day": 1,
      "_id": "6543210fedcba98765432100"
    }
  ],
  "monday": {
    "active": false,
    "hours": "example"
  },
  "tuesday": {
    "active": false,
    "hours": "example"
  },
  "wednesday": {
    "active": false,
    "hours": "example"
  },
  "thursday": {
    "active": false,
    "hours": "example"
  },
  "friday": {
    "active": false,
    "hours": "example"
  },
  "saturday": {
    "active": false
  }
}

Delete multiple services

Deletes several services, ids comma-separated. Answers the ids that were deleted.

User token

Needs the token of a signed-in user.

Path parameters
delete_idsstringRequired

The service's delete ids.

Returns

Returns an empty answer on success.

Status codes

200 401 500

DELETE/services-multiple/:delete_ids
curl -X DELETE 'http://smartman.max-media.io/services-multiple/{delete_ids}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'

Update multiple services

Applies the same changes (updates) to several services, ids comma-separated. Answers the ids that were changed.

User token

Needs the token of a signed-in user.

Path parameters
patch_idsstringRequired

The service's patch ids.

Parameters
collection_idobjectid

Collection, to which the blog post belongs.

updatesstring

The service's updates.

Returns

Returns the Service object.

Status codes

200 400 401 500

PATCH/services-multiple/:patch_ids
curl -X PATCH 'http://smartman.max-media.io/services-multiple/{patch_ids}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{ "collection_id": "...", "updates": "..." }'
Response
{
  "title": "Example",
  "url": "example-item",
  "static_url": "example-item",
  "header": "example",
  "description": "Text shown on the site.",
  "bookable": true,
  "expirable": false,
  "confirm_bookings": false,
  "show_notes": false,
  "minutes_delete_bookings": 1,
  "medias": [
    {
      "media": "6543210fedcba98765432100",
      "gcs_url": "example-item",
      "gcs_480_30_url": "example-item",
      "gcs_720_30_url": "example-item",
      "gcs_1080_30_url": "example-item",
      "duration": 1,
      "vimeo_uri": "example",
      "vimeo_picture": "example",
      "vimeo_url": "example-item",
      "youtube_url": "example-item",
      "youtube_picture": "example",
      "thumbnail": "example",
      "_id": "6543210fedcba98765432100"
    }
  ],
  "collection_id": "6543210fedcba98765432100",
  "price": 49.9,
  "online_payment": false,
  "book_by_date": false,
  "book_date_range": false,
  "start_date": "2026-11-04T12:00:00.000Z",
  "end_date": "2026-11-04T12:00:00.000Z",
  "day_offset": 0,
  "is_recurring": false,
  "max_participants": 1,
  "session_duration": 1,
  "time_between_sessions": 0,
  "discount": [
    {
      "days": 1,
      "per_total_price": 49.9,
      "fixed_price": 49.9,
      "per_day": 1,
      "_id": "6543210fedcba98765432100"
    }
  ],
  "monday": {
    "active": false,
    "hours": "example"
  },
  "tuesday": {
    "active": false,
    "hours": "example"
  },
  "wednesday": {
    "active": false,
    "hours": "example"
  },
  "thursday": {
    "active": false,
    "hours": "example"
  },
  "friday": {
    "active": false,
    "hours": "example"
  },
  "saturday": {
    "active": false
  }
}

Update a service

Updates a service. Fields outside the allowed list are silently ignored. locked_hours and locked_ranges are turned into the hours the service cannot be booked. Answers the service. 403 unless the owner, an admin or a manager with catalogue rights.

User token

Needs the token of a signed-in user.

Path parameters
idstringRequired

The ID of the service.

Parameters
_idobjectid

The ID of the service.

convertedPricestring

The service's converted price.

locked_hoursdate[]

Hours that cannot be booked.

locked_rangesobject[]

Date and time ranges that cannot be booked.

attached_dynamic_modelsstring

The service's attached dynamic models.

mediasobject[]

Attached media objects with ids.

addressstring

Where is the service performed.

Returns

Returns the Service object.

Status codes

200 400 401 403 404 500

PATCH/services/:id
curl -X PATCH 'http://smartman.max-media.io/services/{id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{ "_id": "...", "convertedPrice": "...", "locked_hours": "...", "locked_ranges": "...", "attached_dynamic_models": "..." }'
Response
{
  "title": "Example",
  "url": "example-item",
  "static_url": "example-item",
  "header": "example",
  "description": "Text shown on the site.",
  "bookable": true,
  "expirable": false,
  "confirm_bookings": false,
  "show_notes": false,
  "minutes_delete_bookings": 1,
  "medias": [
    {
      "media": "6543210fedcba98765432100",
      "gcs_url": "example-item",
      "gcs_480_30_url": "example-item",
      "gcs_720_30_url": "example-item",
      "gcs_1080_30_url": "example-item",
      "duration": 1,
      "vimeo_uri": "example",
      "vimeo_picture": "example",
      "vimeo_url": "example-item",
      "youtube_url": "example-item",
      "youtube_picture": "example",
      "thumbnail": "example",
      "_id": "6543210fedcba98765432100"
    }
  ],
  "collection_id": "6543210fedcba98765432100",
  "price": 49.9,
  "online_payment": false,
  "book_by_date": false,
  "book_date_range": false,
  "start_date": "2026-11-04T12:00:00.000Z",
  "end_date": "2026-11-04T12:00:00.000Z",
  "day_offset": 0,
  "is_recurring": false,
  "max_participants": 1,
  "session_duration": 1,
  "time_between_sessions": 0,
  "discount": [
    {
      "days": 1,
      "per_total_price": 49.9,
      "fixed_price": 49.9,
      "per_day": 1,
      "_id": "6543210fedcba98765432100"
    }
  ],
  "monday": {
    "active": false,
    "hours": "example"
  },
  "tuesday": {
    "active": false,
    "hours": "example"
  },
  "wednesday": {
    "active": false,
    "hours": "example"
  },
  "thursday": {
    "active": false,
    "hours": "example"
  },
  "friday": {
    "active": false,
    "hours": "example"
  },
  "saturday": {
    "active": false
  }
}

Delete a service

Deletes a service. Answers the deleted service. Its bookings stay. 403 unless the owner or an admin.

User token

Needs the token of a signed-in user.

Path parameters
idstringRequired

The ID of the service.

Returns

Returns an empty answer on success.

Status codes

200 401 403 404 500

DELETE/services/:id
curl -X DELETE 'http://smartman.max-media.io/services/{id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'

Retrieve a service

A service's first picture. Answers the image bytes. Cached for an hour.

Public

Public - no token needed.

Path parameters
idstringRequired

The ID of the service.

Returns

Returns the Service object.

Status codes

200 404 500

GET/services/:id/media
curl -X GET 'http://smartman.max-media.io/services/{id}/media?ionic=true'
Response
{
  "title": "Example",
  "url": "example-item",
  "static_url": "example-item",
  "header": "example",
  "description": "Text shown on the site.",
  "bookable": true,
  "expirable": false,
  "confirm_bookings": false,
  "show_notes": false,
  "minutes_delete_bookings": 1,
  "medias": [
    {
      "media": "6543210fedcba98765432100",
      "gcs_url": "example-item",
      "gcs_480_30_url": "example-item",
      "gcs_720_30_url": "example-item",
      "gcs_1080_30_url": "example-item",
      "duration": 1,
      "vimeo_uri": "example",
      "vimeo_picture": "example",
      "vimeo_url": "example-item",
      "youtube_url": "example-item",
      "youtube_picture": "example",
      "thumbnail": "example",
      "_id": "6543210fedcba98765432100"
    }
  ],
  "collection_id": "6543210fedcba98765432100",
  "price": 49.9,
  "online_payment": false,
  "book_by_date": false,
  "book_date_range": false,
  "start_date": "2026-11-04T12:00:00.000Z",
  "end_date": "2026-11-04T12:00:00.000Z",
  "day_offset": 0,
  "is_recurring": false,
  "max_participants": 1,
  "session_duration": 1,
  "time_between_sessions": 0,
  "discount": [
    {
      "days": 1,
      "per_total_price": 49.9,
      "fixed_price": 49.9,
      "per_day": 1,
      "_id": "6543210fedcba98765432100"
    }
  ],
  "monday": {
    "active": false,
    "hours": "example"
  },
  "tuesday": {
    "active": false,
    "hours": "example"
  },
  "wednesday": {
    "active": false,
    "hours": "example"
  },
  "thursday": {
    "active": false,
    "hours": "example"
  },
  "friday": {
    "active": false,
    "hours": "example"
  },
  "saturday": {
    "active": false
  }
}

Create a service

Uploads a picture to a service (media, form field). Multipart upload; the picture is resized and added to the service's medias.

User token

Needs the token of a signed-in user.

Path parameters
idstringRequired

The ID of the service.

Status codes

200 400 401

POST/services/:id/media
curl -X POST 'http://smartman.max-media.io/services/{id}/media?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'

Delete a service

Removes a service's last picture. Deletes the media record too.

User token

Needs the token of a signed-in user.

Path parameters
idstringRequired

The ID of the service.

Returns

Returns an empty answer on success.

Status codes

200 401

DELETE/services/:id/media/delete_last
curl -X DELETE 'http://smartman.max-media.io/services/{id}/media/delete_last?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'

Retrieve a service

A service's page by its url, or the service as JSON with ?ionic. By url, not id. 404 when there is no such service. Comes with its staff members, category and connected services.

Page accessOptional user

Pages limited to some users check the token when one is sent.

Path parameters
urlstringRequired

The service's URL slug, as in its address on the site.

Returns

Returns the Service object.

Status codes

200 401 402 404 500

GET/services/:url
curl -X GET 'http://smartman.max-media.io/services/{url}?ionic=true'
Response
{
  "title": "Example",
  "url": "example-item",
  "static_url": "example-item",
  "header": "example",
  "description": "Text shown on the site.",
  "bookable": true,
  "expirable": false,
  "confirm_bookings": false,
  "show_notes": false,
  "minutes_delete_bookings": 1,
  "medias": [
    {
      "media": "6543210fedcba98765432100",
      "gcs_url": "example-item",
      "gcs_480_30_url": "example-item",
      "gcs_720_30_url": "example-item",
      "gcs_1080_30_url": "example-item",
      "duration": 1,
      "vimeo_uri": "example",
      "vimeo_picture": "example",
      "vimeo_url": "example-item",
      "youtube_url": "example-item",
      "youtube_picture": "example",
      "thumbnail": "example",
      "_id": "6543210fedcba98765432100"
    }
  ],
  "collection_id": "6543210fedcba98765432100",
  "price": 49.9,
  "online_payment": false,
  "book_by_date": false,
  "book_date_range": false,
  "start_date": "2026-11-04T12:00:00.000Z",
  "end_date": "2026-11-04T12:00:00.000Z",
  "day_offset": 0,
  "is_recurring": false,
  "max_participants": 1,
  "session_duration": 1,
  "time_between_sessions": 0,
  "discount": [
    {
      "days": 1,
      "per_total_price": 49.9,
      "fixed_price": 49.9,
      "per_day": 1,
      "_id": "6543210fedcba98765432100"
    }
  ],
  "monday": {
    "active": false,
    "hours": "example"
  },
  "tuesday": {
    "active": false,
    "hours": "example"
  },
  "wednesday": {
    "active": false,
    "hours": "example"
  },
  "thursday": {
    "active": false,
    "hours": "example"
  },
  "friday": {
    "active": false,
    "hours": "example"
  },
  "saturday": {
    "active": false
  }
}

List all user has services

Whether the signed-in user has a professional account and services. Answers { has_account }.

User token

Needs the token of a signed-in user.

Returns

Returns a list of Service objects.

Status codes

200 401 500

GET/user-has-services
curl -X GET 'http://smartman.max-media.io/user-has-services?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
[
  {
    "title": "Example",
    "url": "example-item",
    "static_url": "example-item",
    "header": "example",
    "description": "Text shown on the site.",
    "bookable": true,
    "expirable": false,
    "confirm_bookings": false,
    "show_notes": false,
    "minutes_delete_bookings": 1,
    "medias": [
      {
        "media": "6543210fedcba98765432100",
        "gcs_url": "example-item",
        "gcs_480_30_url": "example-item",
        "gcs_720_30_url": "example-item",
        "gcs_1080_30_url": "example-item",
        "duration": 1,
        "vimeo_uri": "example",
        "vimeo_picture": "example",
        "vimeo_url": "example-item",
        "youtube_url": "example-item",
        "youtube_picture": "example",
        "thumbnail": "example",
        "_id": "6543210fedcba98765432100"
      }
    ],
    "collection_id": "6543210fedcba98765432100",
    "price": 49.9,
    "online_payment": false,
    "book_by_date": false,
    "book_date_range": false,
    "start_date": "2026-11-04T12:00:00.000Z",
    "end_date": "2026-11-04T12:00:00.000Z",
    "day_offset": 0,
    "is_recurring": false,
    "max_participants": 1,
    "session_duration": 1,
    "time_between_sessions": 0,
    "discount": [
      {
        "days": 1,
        "per_total_price": 49.9,
        "fixed_price": 49.9,
        "per_day": 1,
        "_id": "6543210fedcba98765432100"
      }
    ],
    "monday": {
      "active": false,
      "hours": "example"
    },
    "tuesday": {
      "active": false,
      "hours": "example"
    },
    "wednesday": {
      "active": false,
      "hours": "example"
    },
    "thursday": {
      "active": false,
      "hours": "example"
    },
    "friday": {
      "active": false,
      "hours": "example"
    },
    "saturday": {
      "active": false
    }
  }
]

Update the single user locked hour

Adds or removes one locked range (locked_range). 403 for an account the user may not manage.

User token

Needs the token of a signed-in user.

Query parameters
on_behalf_ofstring

Only single user locked hours with this on behalf of.

Parameters
locked_rangestring

The single user locked hour's locked range.

Status codes

200 400 401 403 500

PATCH/single-user-locked-hour
curl -X PATCH 'http://smartman.max-media.io/single-user-locked-hour?ionic=true&on_behalf_of=...' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{ "locked_range": "..." }'
Response
{
  "user": "6543210fedcba98765432100",
  "locked_ranges": [
    {
      "start": "2026-11-04T12:00:00.000Z",
      "end": "2026-11-04T12:00:00.000Z",
      "_id": "6543210fedcba98765432100"
    }
  ],
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z"
}

List all user locked hours

The hours the signed-in staff member cannot be booked. Null when none are set.

User token

Needs the token of a signed-in user.

Returns

Returns a list of UserLockedHours objects.

Status codes

200 401 500

GET/user-locked-hours
curl -X GET 'http://smartman.max-media.io/user-locked-hours?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
[
  {
    "user": "6543210fedcba98765432100",
    "locked_ranges": [
      {
        "start": "2026-11-04T12:00:00.000Z",
        "end": "2026-11-04T12:00:00.000Z",
        "_id": "6543210fedcba98765432100"
      }
    ],
    "_id": "6543210fedcba98765432100",
    "updatedAt": "2026-11-04T12:00:00.000Z",
    "createdAt": "2026-11-04T12:00:00.000Z"
  }
]

Create a user locked hour

Sets the hours the signed-in staff member cannot be booked (locked_ranges). Answers with no body.

User token

Needs the token of a signed-in user.

Parameters
locked_rangesobject[]

Date and time ranges the staff member cannot be booked.

Returns

Returns the UserLockedHours object.

Status codes

200 401 500

POST/user-locked-hours
curl -X POST 'http://smartman.max-media.io/user-locked-hours?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{ "locked_ranges": "..." }'
Response
{
  "user": "6543210fedcba98765432100",
  "locked_ranges": [
    {
      "start": "2026-11-04T12:00:00.000Z",
      "end": "2026-11-04T12:00:00.000Z",
      "_id": "6543210fedcba98765432100"
    }
  ],
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z"
}

Update the user locked hour

Replaces those hours, for them or an account they manage (?on_behalf_of). Replaces the whole list. 403 for an account the user may not manage; 404 when no hours were set yet.

User token

Needs the token of a signed-in user.

Query parameters
on_behalf_ofstring

Only user locked hours with this on behalf of.

Parameters
locked_rangesobject[]

Date and time ranges the staff member cannot be booked.

Returns

Returns the UserLockedHours object.

Status codes

200 400 401 403 404 500

PATCH/user-locked-hours
curl -X PATCH 'http://smartman.max-media.io/user-locked-hours?ionic=true&on_behalf_of=...' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{ "locked_ranges": "..." }'
Response
{
  "user": "6543210fedcba98765432100",
  "locked_ranges": [
    {
      "start": "2026-11-04T12:00:00.000Z",
      "end": "2026-11-04T12:00:00.000Z",
      "_id": "6543210fedcba98765432100"
    }
  ],
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z"
}
↑↓ Navigate↵ GoEsc Close