Skip to content

Create Staff Working Hours Schedule

POST
/businesses/{businessId}/staff/{staffId}/working-hours-schedules
curl --request POST \
--url https://api.upvio.com/v1/businesses/example/staff/example/working-hours-schedules \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "dateStart": "2026-04-15", "dateEnd": "2026-04-15", "workingHours": { "monday": [ [ 900, 1200 ], [ 1300, 1700 ] ], "tuesday": [ [ 900, 1200 ], [ 1300, 1700 ] ], "wednesday": [ [ 900, 1200 ], [ 1300, 1700 ] ], "thursday": [ [ 900, 1200 ], [ 1300, 1700 ] ], "friday": [ [ 900, 1200 ], [ 1300, 1700 ] ], "saturday": [ [ 900, 1200 ], [ 1300, 1700 ] ], "sunday": [ [ 900, 1200 ], [ 1300, 1700 ] ] } }'

Experimental Feature. Subject to change. Create a Working Hours Schedule for a Staff. Must not conflict with an existing Working Hours Schedule.

businessId
required

The ID of the Business.

string
staffId
required

The ID of the Staff.

string
Media typeapplication/json
object
dateStart
string format: date
dateEnd
string format: date
workingHours

A configuration to define active hours.

object
monday

A group of active hours for a single day.

Array<Array<number>>

Example

[
[
900,
1200
],
[
1300,
1700
]
]
tuesday

A group of active hours for a single day.

Array<Array<number>>

Example

[
[
900,
1200
],
[
1300,
1700
]
]
wednesday

A group of active hours for a single day.

Array<Array<number>>

Example

[
[
900,
1200
],
[
1300,
1700
]
]
thursday

A group of active hours for a single day.

Array<Array<number>>

Example

[
[
900,
1200
],
[
1300,
1700
]
]
friday

A group of active hours for a single day.

Array<Array<number>>

Example

[
[
900,
1200
],
[
1300,
1700
]
]
saturday

A group of active hours for a single day.

Array<Array<number>>

Example

[
[
900,
1200
],
[
1300,
1700
]
]
sunday

A group of active hours for a single day.

Array<Array<number>>

Example

[
[
900,
1200
],
[
1300,
1700
]
]

The created Working Hours Schedule.

Media typeapplication/json
object
data
Working Hours Schedule

A schedule to use with Staff to plan availability.

object
id
required

Unique identifier across the platform.

string format: uuid
createdAt
required

Time when the resource was created (ISO 8601 format).

string format: date-time
updatedAt
required

Time when the resource was created (ISO 8601 format).

string format: date-time
staffId
required

The ID of the Staff this resource belongs to.

string format: uuid
workingHours
required

A configuration to define active hours.

object
monday

A group of active hours for a single day.

Array<Array<number>>
tuesday

A group of active hours for a single day.

Array<Array<number>>
wednesday

A group of active hours for a single day.

Array<Array<number>>
thursday

A group of active hours for a single day.

Array<Array<number>>
friday

A group of active hours for a single day.

Array<Array<number>>
saturday

A group of active hours for a single day.

Array<Array<number>>
sunday

A group of active hours for a single day.

Array<Array<number>>
timezone

The timezone for this schedule

string
dateStart
required
string format: date-time
dateEnd
string format: date-time

Example

{
"data": {
"workingHours": {
"monday": [
[
900,
1200
],
[
1300,
1700
]
],
"tuesday": [
[
900,
1200
],
[
1300,
1700
]
],
"wednesday": [
[
900,
1200
],
[
1300,
1700
]
],
"thursday": [
[
900,
1200
],
[
1300,
1700
]
],
"friday": [
[
900,
1200
],
[
1300,
1700
]
],
"saturday": [
[
900,
1200
],
[
1300,
1700
]
],
"sunday": [
[
900,
1200
],
[
1300,
1700
]
]
},
"timezone": "America/New_York",
"dateStart": "2024-01-01T00:00:00Z",
"dateEnd": "2024-01-08T00:00:00Z"
}
}

The staff ID is malformed, or the schedule does not start on a Sunday and end on a Saturday in the staff member’s timezone.

Media typeapplication/json
object
error
object
code
number
type

The specific error that occurred.

string
Allowed values: BadRequestError
title

Human-readable description of the error.

string

Example

{
"error": {
"code": 400,
"type": "BadRequestError",
"title": "Working Hours Schedule must start at the beginning of a week."
}
}

The API key is missing or invalid, or the Business cannot be accessed with it.

Media typeapplication/json
object
error
object
code
number
type

The specific error that occurred.

string
Allowed values: UnauthorizedError BusinessArchivedError BusinessDisabledError
title

Human-readable description of the error.

string

Example

{
"error": {
"code": 403,
"type": "UnauthorizedError",
"title": "Invalid API token"
}
}

The staff member does not exist.

Media typeapplication/json
object
error
object
code
number
type

The specific error that occurred.

string
Allowed values: NotFoundError BusinessNotFoundError
title

Human-readable description of the error.

string

Example

{
"error": {
"code": 404,
"type": "NotFoundError",
"title": "Resource not found"
}
}