Skip to content

Create a service

Request

Security
BearerAuth
Bodyapplication/jsonrequired
idstring

Service id. Optional on update; when sent it must equal the {id} path parameter, otherwise the request is rejected with 400 (parameter_invalid, "Invalid id").

Example:"svc_123456"
account_idstringrequired

Setmore account that owns this service.

Example:"acc_123456"
titlestring, [ 1 .. 255 ] characters\Srequired

Required. Must contain at least one non-whitespace character; an empty or blank title is rejected with parameter_not_found.

Example:"30 min consultation"
provider_idsArray of strings, <= 100 items

Staff member id(s) who can be booked for this service. Required, with at least one id, when type is SERVICE; optional for CLASS. Omitting it, sending null or sending an empty array for a SERVICE is rejected with 400. Each id must be a real id: a null, empty or blank id, or the text null, is rejected with 400.

Example:
[ "provider_123456" ]
typestringrequired

Whether this is a one-to-one SERVICE or a group CLASS. The type cannot be changed after the service is created: an update with a different type is rejected with 400 (parameter_invalid).

Enum:"SERVICE""CLASS"
Example:"SERVICE"
max_seatsinteger, [ 1 .. 50 ]

Seat capacity of the class. Required when type is CLASS; ignored for SERVICE.

Example:10
costnumber, (float), [ 0 .. 1000000 ]

Cost of the service, in the currency of the Setmore account.

Example:50
durationinteger, [ 1 .. 1439 ]required

Meeting duration in minutes.

Example:30
color_codestring, <= 7 characters^#[0-9A-Fa-f]{6}$

Hex color code used to display the service, e.g. #4287f5.

Example:"#4287f5"
bufferobject

Buffer time, in minutes, kept free before and after the meeting.

visibilitystring

Visibility of the service (PUBLIC, PRIVATE or UNAVAILABLE). Defaults to PUBLIC when not provided.

Default:"PUBLIC"
Enum:"PUBLIC""PRIVATE""UNAVAILABLE"
locationobject(ServiceLocationRequest)

Where the service is delivered, for a service you create or update.

category_idsArray of strings, <= 50 items

Id(s) of the categories this service belongs to.

  • Every id must be an existing category of the Setmore account, and an id must not appear more than once. Otherwise the request is rejected with 400 (parameter_invalid).
  • The service is always added to the account's default category for its type: All Services when type is SERVICE, All Class Bookings when type is CLASS. It is added when category_ids is empty or omitted, and when it is missing from the list. A default category you list yourself is not repeated.
  • On update the list replaces the service's categories (the default category stays).
Example:
[ "cat_123456" ]
curl -i -X POST \
  https://developer.setmore.com/api/v2/services \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "id": "svc_123456",
    "account_id": "acc_123456",
    "title": "30 min consultation",
    "provider_ids": [
      "provider_123456"
    ],
    "type": "SERVICE",
    "max_seats": 10,
    "cost": 50,
    "duration": 30,
    "color_code": "#4287f5",
    "buffer": {
      "before": 5,
      "after": 5
    },
    "visibility": "PUBLIC",
    "location": {
      "type": [
        "videoType"
      ],
      "video_type": [
        {
          "type": "google-meet",
          "is_default": true
        }
      ]
    },
    "category_ids": [
      "cat_123456"
    ]
  }'

Responses

Service created.

Bodyapplication/json
dataobject(Service)

A service, as returned in API responses.

Response
{ "data": { "id": "svc_123456", "account_id": "acc_123456", "title": "30 min consultation", "provider_ids": [ … ], "type": "SERVICE", "max_seats": 10, "cost": 50, "duration": 30, "color_code": "#4287f5", "buffer": { … }, "visibility": "PUBLIC", "location": { … }, "category_ids": [ … ], "currency": "USD" } }