Update Booking Service
This endpoint allows you to update an existing booking service's configuration. Only the fields you provide will be modified, while others remain unchanged.
πΉ Endpoint Detailsβ
PUT /api/v1/services/{id}
π Authenticationβ
| Header | Required | Description |
|---|---|---|
| Content-Type | Yes | Must be application/json |
| Authorization | Yes | Format: ONLIVESITE Credential:ONLIVEAccessKeyId, Signature=CalculatedSignature |
π Request Structureβ
Path Parametersβ
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| id | string (UUID) | Yes | Unique identifier of the service | 1610c525-f19a-40d0-8cd1-03daba3d2d98 |
Updatable Fieldsβ
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
| name | string | No | Service name | "Premium Test Drive" |
| duration | number | No | Duration in minutes | 45 |
| timeBetween | number | No | Buffer time in minutes | 15 |
| minTimeToSchedule | number | No | Minimum days to book | 1 |
| maxTimeToSchedule | number | No | Maximum days to book | 90 |
| incrementTime | number | No | Time slot increment | 30 |
| extraFields | object | No | Additional details | {"area": "Barcelona"} |
| deniedMultipleAppointment | boolean | No | Multiple booking flag | true |
| active | boolean | No | Service availability | true |
| allowOverlapping | boolean | No | Allow overlapping | false |
| hasICall | boolean | No | Enable iCall feature | true |
| dateRanges | array | No | Availability periods | See example |
| calendars | array | No | Array of calendar configurations. If included, each calendar object must contain required properties | See below |
Calendar Object Structureβ
If the calendars field is included in the request, each calendar object must contain the following properties:
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
| calendarId | string (UUID) | Yes | The ID of the calendar, matches with externalId | "123e4567-e89b-12d3-a456-426614174000" |
| active | boolean | Yes | Whether the calendar is active and available for scheduling | true |
| type | string | Yes | Must be either "agent" or "asset" | "agent" |
| restrictionDates | object | No | Custom date restrictions for this calendar | {"include": [["2025-12-25","2026-01-01"]], "exclude": [["2025-12-26","2025-12-27"]]} |
π§© Request Exampleβ
curl -X PUT "https://openapi.onlive.site/api/v1/services/1610c525-f19a-40d0-8cd1-03daba3d2d98" \
-H "Content-Type: application/json" \
-H "Authorization: ONLIVESITE Credential:ONLIVEAccessKeyId, Signature=CalculatedSignature" \
-d '{
"name": "Premium Test Drive Service",
"duration": 45,
"timeBetween": 15,
"minTimeToSchedule": 1,
"maxTimeToSchedule": 90,
"incrementTime": 30,
"extraFields": {
"area": "Barcelona",
"city": "Mollet Del Valles",
"street": "Avenida. Rabassaires, 22-26",
"country": "Spain",
"requirements": [
"valid_license",
"age_over_21"
],
"vehicle_type": "electric"
},
"deniedMultipleAppointment": true,
"image": "https://cdn.onlive.site/assets/cupra/premium-test-drive.webp",
"userGroupId": "f329fe97-452f-4d12-aef0-f526a74569cc",
"allowOverlapping": false,
"hasICall": true,
"active": true,
"typeId": "e3fb21fb-83ef-4051-916b-a8e96effe81f",
"dateRanges": [
{
"startDate": "2024-10-13T22:00:00.000Z",
"endDate": "2025-10-14T21:59:59.000Z"
},
{
"startDate": "2025-11-01T00:00:00.000Z",
"endDate": "2025-12-31T23:59:59.000Z"
}
]
}'
π€ Response Formatβ
Successful Response (200 OK)β
{
"id": "1610c525-f19a-40d0-8cd1-03daba3d2d98",
"createdAt": "2025-03-09T19:32:03.735Z",
"updatedAt": "2025-03-09T19:32:06.669Z"
// ... updated service object
}
β Error Responsesβ
This endpoint follows the standard error format.
π Notesβ
- Only include fields you want to update in the request body
- The
updatedAttimestamp is automatically updated - Omitted fields retain their current values
- You can only update services within your organization
- Changes may affect future appointments
- Existing appointments are not affected by most changes
β Common Use Casesβ
- π Service Configuration: Adjust timing and scheduling rules
- π Availability Update: Modify service availability periods
- π₯ Calendar Association: Update linked calendars
- βοΈ Settings Adjustment: Modify booking constraints
- π Access Control: Enable/disable service availability
π Update Restrictionsβ
-
Immutable Fields
- Service ID
- Organization ID
- Creation timestamp
-
Scheduling Changes
- Cannot reduce duration of existing appointments
- Future appointments may be affected
- Consider existing bookings when updating time constraints
-
Calendar Changes
- Calendars must belong to your organization
- Removing calendars affects availability
- Consider existing appointments
π·οΈ Field Validationβ
-
Time Values
- All durations must be positive numbers
incrementTimemust be less than or equal todurationmaxTimeToSchedulemust be greater thanminTimeToSchedule
-
Date Ranges
- Must be valid ISO 8601 format
- End date must be after start date
- No overlapping ranges allowed