---
title: "Create Service"
method: POST
path: "/setup/v1/services"
tags: ["Services"]
---

# Create Service

`POST /setup/v1/services`

Use this endpoint to **Create** a new service. If not specified, the business location defaults to the primary business location. Note: Posting a service to the Primary Business Location will scope as company scoped and make the service available to all locations. If you want a service to only be available from a specific location, include the business location id.

Required fields: **Name** and **Duration**

The service **Type** is either, **1 = Appointment** or **2 = Event**. Default is 1 if not specified.

For type = 1, Appointments - Create an availability entry for each weekday to provide the service for. **All days of the week must be provided when adding service availability.** Days are defined as **sun, mon, tue, wed, thu, fri** and **sat**. Start and End Times are entered in military format. e.g., 800 is 8:00am, 2230 is 10:30pm. If not provided, it defaults to the primary location business hours.

We support 24-hour availability, set startTime=0 and endTime=2400. To set a whole day as unavailable, set both the startTime and endTime to 0. If you require times in between specified hours to be unavailable, use the service block endpoint at: _POST ​/setup​/v1​/services​/{id}​/block_.

For type = 2, Events - Create service allocations for their availability. Refer to the: _POST /setup​/v1​/services​/{id}​/allocations_ to set up service allocations for the event.

Options are available for customer selected durations, for details: [Variable Duration Overview](https://docs.onsched.com/docs/services-overview#variable-duration)

Additional parameters include but are not limited to bookingLimit, maxCapacity and maxGroupSize. For details: [Service Limits Overview](https://docs.onsched.com/docs/service-max-capacity)

## Request body

- ServiceInputModel
  - `locationId` string, nullable
  - `name` string, nullable
  - `description` string, nullable
  - `type` string, nullable
  - `duration` integer
  - `bookingLimit` integer
  - `bookingInterval` integer
  - `maxCapacity` integer
  - `maxGroupSize` integer
  - `serviceGroupId` string, nullable
  - `public` boolean
  - `mediaPageUrl` string, nullable
  - `availability` AvailabilityInputModel
    - `sun` WeekDayInputModel
      - `startTime` integer
      - `endTime` integer
    - `mon` WeekDayInputModel
      - `startTime` integer
      - `endTime` integer
    - `tue` WeekDayInputModel
      - `startTime` integer
      - `endTime` integer
    - `wed` WeekDayInputModel
      - `startTime` integer
      - `endTime` integer
    - `thu` WeekDayInputModel
      - `startTime` integer
      - `endTime` integer
    - `fri` WeekDayInputModel
      - `startTime` integer
      - `endTime` integer
    - `sat` WeekDayInputModel
      - `startTime` integer
      - `endTime` integer
  - `settings` ServiceSettingsInputModel
    - `bookAheadUnit` integer, nullable
    - `bookAheadValue` integer, nullable
    - `bookInAdvance` integer, nullable
  - `options` ServiceOptionsInputModel
    - `defaultService` boolean, nullable
    - `durationSelect` boolean, nullable
    - `durationInterval` integer, nullable
    - `durationMin` integer, nullable
    - `durationMax` integer, nullable
    - `padding` integer, nullable
    - `consumerPadding` boolean, nullable
  - `fees` ServiceFeesInputModel
    - `feeAmount` number, double
    - `feeTaxable` boolean
    - `cancellationFeeAmount` number, double
    - `cancellationFeeTaxable` boolean
    - `nonRefundable` boolean
  - `customFields` CustomFieldInputModel
    - `field1` string, nullable
    - `field2` string, nullable
    - `field3` string, nullable
    - `field4` string, nullable
    - `field5` string, nullable
    - `field6` string, nullable
    - `field7` string, nullable
    - `field8` string, nullable
    - `field9` string, nullable
    - `field10` string, nullable

## Response `200`

Success

- ServiceViewModel
  - `object` string, nullable
  - `id` string, nullable
  - `companyId` string, nullable
  - `locationId` string, nullable
  - `name` string, nullable
  - `description` string, nullable
  - `type` string, nullable
  - `imageUrl` string, nullable
  - `mediaPageUrl` string, nullable
  - `serviceGroupId` integer, nullable
  - `serviceGroupName` string, nullable
  - `calendarId` string, nullable
  - `calendarResourceGroupId` string, nullable
  - `bookingLimit` integer
  - `bookingInterval` integer
  - `bookAheadUnit` integer
  - `bookAheadValue` integer
  - `bookInAdvance` integer
  - `roundRobin` integer
  - `showOnline` boolean
  - `defaultService` boolean
  - `duration` integer
  - `durationSelect` boolean
  - `durationMin` integer
  - `durationMax` integer
  - `durationInterval` integer
  - `padding` integer
  - `consumerPadding` boolean
  - `feeAmount` number, double
  - `feeTaxable` boolean
  - `cancellationFeeAmount` number, double
  - `cancellationFeeTaxable` boolean
  - `nonRefundable` boolean
  - `dailyBookingLimitCount` integer
  - `dailyBookingLimitMinutes` integer
  - `maxBookingLimit` integer
  - `maxResourceBookingLimit` integer
  - `maxCapacity` integer
  - `maxGroupSize` integer
  - `availability` ServiceHoursViewModel
    - `mon` ServiceHourViewModel
      - `startTime` integer
      - `endTime` integer
    - `tue` ServiceHourViewModel
      - `startTime` integer
      - `endTime` integer
    - `wed` ServiceHourViewModel
      - `startTime` integer
      - `endTime` integer
    - `thu` ServiceHourViewModel
      - `startTime` integer
      - `endTime` integer
    - `fri` ServiceHourViewModel
      - `startTime` integer
      - `endTime` integer
    - `sat` ServiceHourViewModel
      - `startTime` integer
      - `endTime` integer
    - `sun` ServiceHourViewModel
      - `startTime` integer
      - `endTime` integer
  - `customFields` CustomFieldInputModel
    - `field1` string, nullable
    - `field2` string, nullable
    - `field3` string, nullable
    - `field4` string, nullable
    - `field5` string, nullable
    - `field6` string, nullable
    - `field7` string, nullable
    - `field8` string, nullable
    - `field9` string, nullable
    - `field10` string, nullable

---

[API](https://skmtc.net/onsched/apis/onsched-setup-api.md) · [All operations](https://skmtc.net/onsched/apis/onsched-setup-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/onsched/onsched-setup-api/revisions/c5c023458a2f/schema)
