Skip to content

Create a Schedule

Request

Creates a schedule for appointments or events based on the original associated entity.

Security
BearerPartnerUser
Path
location_idnumberrequired

ID of a location.

Example:123
Query
includeArray of strings

Requested set of an included models.

Items Value:"days"
Headers
Acceptstringrequired

Required B2B v2 response media type. Use application/vnd.api.v2+json. A charset parameter is also accepted.

Default:"application/vnd.api.v2+json"
Example:application/vnd.api.v2+json
Content-Typestringrequired

Should be equal to application/json

Example:application/json
Bodyapplication/json
original_entity_typestringrequired

Type of entity the schedule will be based on:
record - individual appointment, currently not supported;
activity - group event.

Enum:"record""activity"
Example:"activity"
original_entity_idnumberrequired

ID of entity the schedule will be based on.

Example:123
date_endstring, (date)required

Date of the schedule end.

Example:"2022-02-01"
add_clients_from_original_entitybooleanrequired

Add clients from original entity to all scheduled events.

Example:false
daysArray of objects, [ 1 .. 7 ] itemsrequired

Each object represents schedule series settings for a specific day of the week. A minimum of 1 and a maximum of 7 schedule series can be defined (one for each day of the week).

curl -i -X POST \
  'https://developer.alteg.io/_mock/en/b2b-v1/openapi/locations/123/schedules?include=days' \
  -H 'Accept: application/vnd.api.v2+json' \
  -H 'Authorization: Bearer <YOUR_Bearer {PartnerToken}, User {UserToken}_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "original_entity_type": "activity",
    "original_entity_id": 123,
    "date_end": "2022-02-01",
    "add_clients_from_original_entity": false,
    "days": [
      {
        "day_of_week": "mon",
        "events_master_id": 123,
        "events_time": "14:00:00",
        "events_duration": 3600,
        "events_capacity": 4,
        "labels_ids": [
          123
        ],
        "resource_instances_ids": [
          123
        ]
      }
    ]
  }'

Responses

Created

Bodyapplication/json
successboolean(Successful response status)

Response status.

Example:true
dataobject(Object of model "Schedule")

Data for an existing schedule in a location.

Example:
{ "id": 123, "created_at": "2026-01-01T12:12:12-05:00", "updated_at": "2026-01-01T12:12:12-05:00", "deleted_at": null, "original_entity_type": "activity", "original_entity_id": 123, "date_start": "2026-01-01", "date_end": "2026-02-01", "days": [ { … } ] }
metaArray of any or object(Empty meta object)

Additional response data (empty object or empty array)

Example:
{}
Response
{ "success": true, "data": { "id": 123, "created_at": "2026-01-01T12:12:12-05:00", "updated_at": "2026-01-01T12:12:12-05:00", "deleted_at": null, "original_entity_type": "activity", "original_entity_id": 123, "date_start": "2026-01-01", "date_end": "2026-02-01", "days": [ … ] }, "meta": {} }