Bulk Update Services
curl --request PUT \
--url https://api.decodahealth.com/admin/services/bulk \
--header 'API-KEY: <api-key>' \
--header 'Content-Type: application/json' \
--header 'TENANT: <tenant>' \
--data '
{
"updates": [
{
"id": "<string>",
"name": "<string>",
"duration": 123,
"description": "<string>",
"price": 123,
"displayPrice": 123,
"displayPriceMax": 123,
"priceStartsAt": true,
"cost": 123,
"estimated": true,
"bookingFee": 123,
"bookingFeeText": "<string>",
"reminderMinutesBefore": 123,
"cancellationCost": 123,
"hoursBeforeCancellingCosts": 123,
"bookingFeePercentage": 123,
"cancellationFeePctWithin24h": 123,
"cancellationFeePctWithin48h": 123,
"refundBookingFeeBefore48h": true,
"hoursBeforeBookingFeeRefundable": 123,
"followUpMinutesAfter": 123,
"followUpSmsTemplate": "<string>",
"reminderSmsTemplate": "<string>",
"locationIds": [
"<string>"
],
"providerIds": [
"<string>"
],
"formIds": [
"<string>"
],
"confirmationSmsTemplate": "<string>",
"cancellationSmsTemplate": "<string>",
"noShowSmsTemplate": "<string>",
"overrideNoticeSmsTemplate": "<string>",
"shortNoticeBlock": 123,
"minutesBeforeRebookingAllowed": 123,
"color": "<string>",
"allowIndividualProviderBooking": true,
"displayOrder": 123,
"reservedTimeMinutes": 123,
"category": "<string>",
"isDoubleBookable": true,
"isPopular": true,
"onlyBookableOverThePhone": true,
"creditCardRequired": true,
"collectCreditCard": true,
"autoGfeTreatments": [
"<string>"
],
"brandName": "<string>",
"internalNotes": "<string>",
"sortOrder": 123,
"allowCustomPricing": true,
"externalId": "<string>",
"prepTimeDuration": 123,
"prepTimeBuffer": 123,
"prepTimeName": "<string>",
"prepTimeColor": "<string>",
"prepProviderIds": [
"<string>"
],
"bookables": [
{
"bookableId": "<string>",
"startOffset": 0,
"duration": 5040
}
],
"checklists": [
{
"name": "<string>",
"position": 123,
"id": "<string>",
"optional": false
}
],
"exemptedTaxIds": [
"<string>"
]
}
]
}
'import requests
url = "https://api.decodahealth.com/admin/services/bulk"
payload = { "updates": [
{
"id": "<string>",
"name": "<string>",
"duration": 123,
"description": "<string>",
"price": 123,
"displayPrice": 123,
"displayPriceMax": 123,
"priceStartsAt": True,
"cost": 123,
"estimated": True,
"bookingFee": 123,
"bookingFeeText": "<string>",
"reminderMinutesBefore": 123,
"cancellationCost": 123,
"hoursBeforeCancellingCosts": 123,
"bookingFeePercentage": 123,
"cancellationFeePctWithin24h": 123,
"cancellationFeePctWithin48h": 123,
"refundBookingFeeBefore48h": True,
"hoursBeforeBookingFeeRefundable": 123,
"followUpMinutesAfter": 123,
"followUpSmsTemplate": "<string>",
"reminderSmsTemplate": "<string>",
"locationIds": ["<string>"],
"providerIds": ["<string>"],
"formIds": ["<string>"],
"confirmationSmsTemplate": "<string>",
"cancellationSmsTemplate": "<string>",
"noShowSmsTemplate": "<string>",
"overrideNoticeSmsTemplate": "<string>",
"shortNoticeBlock": 123,
"minutesBeforeRebookingAllowed": 123,
"color": "<string>",
"allowIndividualProviderBooking": True,
"displayOrder": 123,
"reservedTimeMinutes": 123,
"category": "<string>",
"isDoubleBookable": True,
"isPopular": True,
"onlyBookableOverThePhone": True,
"creditCardRequired": True,
"collectCreditCard": True,
"autoGfeTreatments": ["<string>"],
"brandName": "<string>",
"internalNotes": "<string>",
"sortOrder": 123,
"allowCustomPricing": True,
"externalId": "<string>",
"prepTimeDuration": 123,
"prepTimeBuffer": 123,
"prepTimeName": "<string>",
"prepTimeColor": "<string>",
"prepProviderIds": ["<string>"],
"bookables": [
{
"bookableId": "<string>",
"startOffset": 0,
"duration": 5040
}
],
"checklists": [
{
"name": "<string>",
"position": 123,
"id": "<string>",
"optional": False
}
],
"exemptedTaxIds": ["<string>"]
}
] }
headers = {
"TENANT": "<tenant>",
"API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {TENANT: '<tenant>', 'API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
updates: [
{
id: '<string>',
name: '<string>',
duration: 123,
description: '<string>',
price: 123,
displayPrice: 123,
displayPriceMax: 123,
priceStartsAt: true,
cost: 123,
estimated: true,
bookingFee: 123,
bookingFeeText: '<string>',
reminderMinutesBefore: 123,
cancellationCost: 123,
hoursBeforeCancellingCosts: 123,
bookingFeePercentage: 123,
cancellationFeePctWithin24h: 123,
cancellationFeePctWithin48h: 123,
refundBookingFeeBefore48h: true,
hoursBeforeBookingFeeRefundable: 123,
followUpMinutesAfter: 123,
followUpSmsTemplate: '<string>',
reminderSmsTemplate: '<string>',
locationIds: ['<string>'],
providerIds: ['<string>'],
formIds: ['<string>'],
confirmationSmsTemplate: '<string>',
cancellationSmsTemplate: '<string>',
noShowSmsTemplate: '<string>',
overrideNoticeSmsTemplate: '<string>',
shortNoticeBlock: 123,
minutesBeforeRebookingAllowed: 123,
color: '<string>',
allowIndividualProviderBooking: true,
displayOrder: 123,
reservedTimeMinutes: 123,
category: '<string>',
isDoubleBookable: true,
isPopular: true,
onlyBookableOverThePhone: true,
creditCardRequired: true,
collectCreditCard: true,
autoGfeTreatments: ['<string>'],
brandName: '<string>',
internalNotes: '<string>',
sortOrder: 123,
allowCustomPricing: true,
externalId: '<string>',
prepTimeDuration: 123,
prepTimeBuffer: 123,
prepTimeName: '<string>',
prepTimeColor: '<string>',
prepProviderIds: ['<string>'],
bookables: [{bookableId: '<string>', startOffset: 0, duration: 5040}],
checklists: [{name: '<string>', position: 123, id: '<string>', optional: false}],
exemptedTaxIds: ['<string>']
}
]
})
};
fetch('https://api.decodahealth.com/admin/services/bulk', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.decodahealth.com/admin/services/bulk",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'updates' => [
[
'id' => '<string>',
'name' => '<string>',
'duration' => 123,
'description' => '<string>',
'price' => 123,
'displayPrice' => 123,
'displayPriceMax' => 123,
'priceStartsAt' => true,
'cost' => 123,
'estimated' => true,
'bookingFee' => 123,
'bookingFeeText' => '<string>',
'reminderMinutesBefore' => 123,
'cancellationCost' => 123,
'hoursBeforeCancellingCosts' => 123,
'bookingFeePercentage' => 123,
'cancellationFeePctWithin24h' => 123,
'cancellationFeePctWithin48h' => 123,
'refundBookingFeeBefore48h' => true,
'hoursBeforeBookingFeeRefundable' => 123,
'followUpMinutesAfter' => 123,
'followUpSmsTemplate' => '<string>',
'reminderSmsTemplate' => '<string>',
'locationIds' => [
'<string>'
],
'providerIds' => [
'<string>'
],
'formIds' => [
'<string>'
],
'confirmationSmsTemplate' => '<string>',
'cancellationSmsTemplate' => '<string>',
'noShowSmsTemplate' => '<string>',
'overrideNoticeSmsTemplate' => '<string>',
'shortNoticeBlock' => 123,
'minutesBeforeRebookingAllowed' => 123,
'color' => '<string>',
'allowIndividualProviderBooking' => true,
'displayOrder' => 123,
'reservedTimeMinutes' => 123,
'category' => '<string>',
'isDoubleBookable' => true,
'isPopular' => true,
'onlyBookableOverThePhone' => true,
'creditCardRequired' => true,
'collectCreditCard' => true,
'autoGfeTreatments' => [
'<string>'
],
'brandName' => '<string>',
'internalNotes' => '<string>',
'sortOrder' => 123,
'allowCustomPricing' => true,
'externalId' => '<string>',
'prepTimeDuration' => 123,
'prepTimeBuffer' => 123,
'prepTimeName' => '<string>',
'prepTimeColor' => '<string>',
'prepProviderIds' => [
'<string>'
],
'bookables' => [
[
'bookableId' => '<string>',
'startOffset' => 0,
'duration' => 5040
]
],
'checklists' => [
[
'name' => '<string>',
'position' => 123,
'id' => '<string>',
'optional' => false
]
],
'exemptedTaxIds' => [
'<string>'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"API-KEY: <api-key>",
"Content-Type: application/json",
"TENANT: <tenant>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.decodahealth.com/admin/services/bulk"
payload := strings.NewReader("{\n \"updates\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"duration\": 123,\n \"description\": \"<string>\",\n \"price\": 123,\n \"displayPrice\": 123,\n \"displayPriceMax\": 123,\n \"priceStartsAt\": true,\n \"cost\": 123,\n \"estimated\": true,\n \"bookingFee\": 123,\n \"bookingFeeText\": \"<string>\",\n \"reminderMinutesBefore\": 123,\n \"cancellationCost\": 123,\n \"hoursBeforeCancellingCosts\": 123,\n \"bookingFeePercentage\": 123,\n \"cancellationFeePctWithin24h\": 123,\n \"cancellationFeePctWithin48h\": 123,\n \"refundBookingFeeBefore48h\": true,\n \"hoursBeforeBookingFeeRefundable\": 123,\n \"followUpMinutesAfter\": 123,\n \"followUpSmsTemplate\": \"<string>\",\n \"reminderSmsTemplate\": \"<string>\",\n \"locationIds\": [\n \"<string>\"\n ],\n \"providerIds\": [\n \"<string>\"\n ],\n \"formIds\": [\n \"<string>\"\n ],\n \"confirmationSmsTemplate\": \"<string>\",\n \"cancellationSmsTemplate\": \"<string>\",\n \"noShowSmsTemplate\": \"<string>\",\n \"overrideNoticeSmsTemplate\": \"<string>\",\n \"shortNoticeBlock\": 123,\n \"minutesBeforeRebookingAllowed\": 123,\n \"color\": \"<string>\",\n \"allowIndividualProviderBooking\": true,\n \"displayOrder\": 123,\n \"reservedTimeMinutes\": 123,\n \"category\": \"<string>\",\n \"isDoubleBookable\": true,\n \"isPopular\": true,\n \"onlyBookableOverThePhone\": true,\n \"creditCardRequired\": true,\n \"collectCreditCard\": true,\n \"autoGfeTreatments\": [\n \"<string>\"\n ],\n \"brandName\": \"<string>\",\n \"internalNotes\": \"<string>\",\n \"sortOrder\": 123,\n \"allowCustomPricing\": true,\n \"externalId\": \"<string>\",\n \"prepTimeDuration\": 123,\n \"prepTimeBuffer\": 123,\n \"prepTimeName\": \"<string>\",\n \"prepTimeColor\": \"<string>\",\n \"prepProviderIds\": [\n \"<string>\"\n ],\n \"bookables\": [\n {\n \"bookableId\": \"<string>\",\n \"startOffset\": 0,\n \"duration\": 5040\n }\n ],\n \"checklists\": [\n {\n \"name\": \"<string>\",\n \"position\": 123,\n \"id\": \"<string>\",\n \"optional\": false\n }\n ],\n \"exemptedTaxIds\": [\n \"<string>\"\n ]\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("TENANT", "<tenant>")
req.Header.Add("API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.decodahealth.com/admin/services/bulk")
.header("TENANT", "<tenant>")
.header("API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"updates\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"duration\": 123,\n \"description\": \"<string>\",\n \"price\": 123,\n \"displayPrice\": 123,\n \"displayPriceMax\": 123,\n \"priceStartsAt\": true,\n \"cost\": 123,\n \"estimated\": true,\n \"bookingFee\": 123,\n \"bookingFeeText\": \"<string>\",\n \"reminderMinutesBefore\": 123,\n \"cancellationCost\": 123,\n \"hoursBeforeCancellingCosts\": 123,\n \"bookingFeePercentage\": 123,\n \"cancellationFeePctWithin24h\": 123,\n \"cancellationFeePctWithin48h\": 123,\n \"refundBookingFeeBefore48h\": true,\n \"hoursBeforeBookingFeeRefundable\": 123,\n \"followUpMinutesAfter\": 123,\n \"followUpSmsTemplate\": \"<string>\",\n \"reminderSmsTemplate\": \"<string>\",\n \"locationIds\": [\n \"<string>\"\n ],\n \"providerIds\": [\n \"<string>\"\n ],\n \"formIds\": [\n \"<string>\"\n ],\n \"confirmationSmsTemplate\": \"<string>\",\n \"cancellationSmsTemplate\": \"<string>\",\n \"noShowSmsTemplate\": \"<string>\",\n \"overrideNoticeSmsTemplate\": \"<string>\",\n \"shortNoticeBlock\": 123,\n \"minutesBeforeRebookingAllowed\": 123,\n \"color\": \"<string>\",\n \"allowIndividualProviderBooking\": true,\n \"displayOrder\": 123,\n \"reservedTimeMinutes\": 123,\n \"category\": \"<string>\",\n \"isDoubleBookable\": true,\n \"isPopular\": true,\n \"onlyBookableOverThePhone\": true,\n \"creditCardRequired\": true,\n \"collectCreditCard\": true,\n \"autoGfeTreatments\": [\n \"<string>\"\n ],\n \"brandName\": \"<string>\",\n \"internalNotes\": \"<string>\",\n \"sortOrder\": 123,\n \"allowCustomPricing\": true,\n \"externalId\": \"<string>\",\n \"prepTimeDuration\": 123,\n \"prepTimeBuffer\": 123,\n \"prepTimeName\": \"<string>\",\n \"prepTimeColor\": \"<string>\",\n \"prepProviderIds\": [\n \"<string>\"\n ],\n \"bookables\": [\n {\n \"bookableId\": \"<string>\",\n \"startOffset\": 0,\n \"duration\": 5040\n }\n ],\n \"checklists\": [\n {\n \"name\": \"<string>\",\n \"position\": 123,\n \"id\": \"<string>\",\n \"optional\": false\n }\n ],\n \"exemptedTaxIds\": [\n \"<string>\"\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.decodahealth.com/admin/services/bulk")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["TENANT"] = '<tenant>'
request["API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"updates\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"duration\": 123,\n \"description\": \"<string>\",\n \"price\": 123,\n \"displayPrice\": 123,\n \"displayPriceMax\": 123,\n \"priceStartsAt\": true,\n \"cost\": 123,\n \"estimated\": true,\n \"bookingFee\": 123,\n \"bookingFeeText\": \"<string>\",\n \"reminderMinutesBefore\": 123,\n \"cancellationCost\": 123,\n \"hoursBeforeCancellingCosts\": 123,\n \"bookingFeePercentage\": 123,\n \"cancellationFeePctWithin24h\": 123,\n \"cancellationFeePctWithin48h\": 123,\n \"refundBookingFeeBefore48h\": true,\n \"hoursBeforeBookingFeeRefundable\": 123,\n \"followUpMinutesAfter\": 123,\n \"followUpSmsTemplate\": \"<string>\",\n \"reminderSmsTemplate\": \"<string>\",\n \"locationIds\": [\n \"<string>\"\n ],\n \"providerIds\": [\n \"<string>\"\n ],\n \"formIds\": [\n \"<string>\"\n ],\n \"confirmationSmsTemplate\": \"<string>\",\n \"cancellationSmsTemplate\": \"<string>\",\n \"noShowSmsTemplate\": \"<string>\",\n \"overrideNoticeSmsTemplate\": \"<string>\",\n \"shortNoticeBlock\": 123,\n \"minutesBeforeRebookingAllowed\": 123,\n \"color\": \"<string>\",\n \"allowIndividualProviderBooking\": true,\n \"displayOrder\": 123,\n \"reservedTimeMinutes\": 123,\n \"category\": \"<string>\",\n \"isDoubleBookable\": true,\n \"isPopular\": true,\n \"onlyBookableOverThePhone\": true,\n \"creditCardRequired\": true,\n \"collectCreditCard\": true,\n \"autoGfeTreatments\": [\n \"<string>\"\n ],\n \"brandName\": \"<string>\",\n \"internalNotes\": \"<string>\",\n \"sortOrder\": 123,\n \"allowCustomPricing\": true,\n \"externalId\": \"<string>\",\n \"prepTimeDuration\": 123,\n \"prepTimeBuffer\": 123,\n \"prepTimeName\": \"<string>\",\n \"prepTimeColor\": \"<string>\",\n \"prepProviderIds\": [\n \"<string>\"\n ],\n \"bookables\": [\n {\n \"bookableId\": \"<string>\",\n \"startOffset\": 0,\n \"duration\": 5040\n }\n ],\n \"checklists\": [\n {\n \"name\": \"<string>\",\n \"position\": 123,\n \"id\": \"<string>\",\n \"optional\": false\n }\n ],\n \"exemptedTaxIds\": [\n \"<string>\"\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body[
{
"id": "<string>",
"name": "<string>",
"duration": 123,
"description": "<string>",
"price": 123,
"displayPrice": 123,
"displayPriceMax": 123,
"priceStartsAt": false,
"cost": 123,
"estimated": false,
"bookingFee": 123,
"bookingFeeText": "<string>",
"reminderMinutesBefore": 123,
"cancellationCost": 123,
"hoursBeforeCancellingCosts": 123,
"bookingFeePercentage": 123,
"cancellationFeePctWithin24h": 123,
"cancellationFeePctWithin48h": 123,
"refundBookingFeeBefore48h": true,
"hoursBeforeBookingFeeRefundable": 123,
"followUpMinutesAfter": 123,
"followUpSmsTemplate": "<string>",
"reminderSmsTemplate": "<string>",
"locationIds": [
"<string>"
],
"providerIds": [
"<string>"
],
"createdDate": "2023-11-07T05:31:56Z",
"updatedDate": "2023-11-07T05:31:56Z",
"formIds": [
"<string>"
],
"confirmationSmsTemplate": "<string>",
"cancellationSmsTemplate": "<string>",
"noShowSmsTemplate": "<string>",
"overrideNoticeSmsTemplate": "<string>",
"shortNoticeBlock": 123,
"visibility": "ALL",
"minutesBeforeRebookingAllowed": 123,
"color": "<string>",
"allowIndividualProviderBooking": true,
"displayOrder": 123,
"reservedTimeMinutes": 123,
"category": "<string>",
"isDoubleBookable": true,
"isPopular": false,
"onlyBookableOverThePhone": false,
"creditCardRequired": false,
"collectCreditCard": false,
"autoGfeTreatments": [
"<string>"
],
"brandName": "<string>",
"internalNotes": "<string>",
"sortOrder": 123,
"allowCustomPricing": false,
"externalId": "<string>",
"prepTimeDuration": 123,
"prepTimeBuffer": 123,
"prepTimeName": "<string>",
"prepTimeColor": "<string>",
"prepProviderIds": [
"<string>"
],
"checklists": [
{
"name": "<string>",
"position": 123,
"id": "<string>",
"optional": false
}
],
"bookables": [
{
"bookableId": "<string>",
"startOffset": 0,
"duration": 5040
}
],
"exemptedTaxIds": [
"<string>"
]
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Admin
Bulk Update Services
Bulk update multiple services in a single transaction.
PUT
/
admin
/
services
/
bulk
Bulk Update Services
curl --request PUT \
--url https://api.decodahealth.com/admin/services/bulk \
--header 'API-KEY: <api-key>' \
--header 'Content-Type: application/json' \
--header 'TENANT: <tenant>' \
--data '
{
"updates": [
{
"id": "<string>",
"name": "<string>",
"duration": 123,
"description": "<string>",
"price": 123,
"displayPrice": 123,
"displayPriceMax": 123,
"priceStartsAt": true,
"cost": 123,
"estimated": true,
"bookingFee": 123,
"bookingFeeText": "<string>",
"reminderMinutesBefore": 123,
"cancellationCost": 123,
"hoursBeforeCancellingCosts": 123,
"bookingFeePercentage": 123,
"cancellationFeePctWithin24h": 123,
"cancellationFeePctWithin48h": 123,
"refundBookingFeeBefore48h": true,
"hoursBeforeBookingFeeRefundable": 123,
"followUpMinutesAfter": 123,
"followUpSmsTemplate": "<string>",
"reminderSmsTemplate": "<string>",
"locationIds": [
"<string>"
],
"providerIds": [
"<string>"
],
"formIds": [
"<string>"
],
"confirmationSmsTemplate": "<string>",
"cancellationSmsTemplate": "<string>",
"noShowSmsTemplate": "<string>",
"overrideNoticeSmsTemplate": "<string>",
"shortNoticeBlock": 123,
"minutesBeforeRebookingAllowed": 123,
"color": "<string>",
"allowIndividualProviderBooking": true,
"displayOrder": 123,
"reservedTimeMinutes": 123,
"category": "<string>",
"isDoubleBookable": true,
"isPopular": true,
"onlyBookableOverThePhone": true,
"creditCardRequired": true,
"collectCreditCard": true,
"autoGfeTreatments": [
"<string>"
],
"brandName": "<string>",
"internalNotes": "<string>",
"sortOrder": 123,
"allowCustomPricing": true,
"externalId": "<string>",
"prepTimeDuration": 123,
"prepTimeBuffer": 123,
"prepTimeName": "<string>",
"prepTimeColor": "<string>",
"prepProviderIds": [
"<string>"
],
"bookables": [
{
"bookableId": "<string>",
"startOffset": 0,
"duration": 5040
}
],
"checklists": [
{
"name": "<string>",
"position": 123,
"id": "<string>",
"optional": false
}
],
"exemptedTaxIds": [
"<string>"
]
}
]
}
'import requests
url = "https://api.decodahealth.com/admin/services/bulk"
payload = { "updates": [
{
"id": "<string>",
"name": "<string>",
"duration": 123,
"description": "<string>",
"price": 123,
"displayPrice": 123,
"displayPriceMax": 123,
"priceStartsAt": True,
"cost": 123,
"estimated": True,
"bookingFee": 123,
"bookingFeeText": "<string>",
"reminderMinutesBefore": 123,
"cancellationCost": 123,
"hoursBeforeCancellingCosts": 123,
"bookingFeePercentage": 123,
"cancellationFeePctWithin24h": 123,
"cancellationFeePctWithin48h": 123,
"refundBookingFeeBefore48h": True,
"hoursBeforeBookingFeeRefundable": 123,
"followUpMinutesAfter": 123,
"followUpSmsTemplate": "<string>",
"reminderSmsTemplate": "<string>",
"locationIds": ["<string>"],
"providerIds": ["<string>"],
"formIds": ["<string>"],
"confirmationSmsTemplate": "<string>",
"cancellationSmsTemplate": "<string>",
"noShowSmsTemplate": "<string>",
"overrideNoticeSmsTemplate": "<string>",
"shortNoticeBlock": 123,
"minutesBeforeRebookingAllowed": 123,
"color": "<string>",
"allowIndividualProviderBooking": True,
"displayOrder": 123,
"reservedTimeMinutes": 123,
"category": "<string>",
"isDoubleBookable": True,
"isPopular": True,
"onlyBookableOverThePhone": True,
"creditCardRequired": True,
"collectCreditCard": True,
"autoGfeTreatments": ["<string>"],
"brandName": "<string>",
"internalNotes": "<string>",
"sortOrder": 123,
"allowCustomPricing": True,
"externalId": "<string>",
"prepTimeDuration": 123,
"prepTimeBuffer": 123,
"prepTimeName": "<string>",
"prepTimeColor": "<string>",
"prepProviderIds": ["<string>"],
"bookables": [
{
"bookableId": "<string>",
"startOffset": 0,
"duration": 5040
}
],
"checklists": [
{
"name": "<string>",
"position": 123,
"id": "<string>",
"optional": False
}
],
"exemptedTaxIds": ["<string>"]
}
] }
headers = {
"TENANT": "<tenant>",
"API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {TENANT: '<tenant>', 'API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
updates: [
{
id: '<string>',
name: '<string>',
duration: 123,
description: '<string>',
price: 123,
displayPrice: 123,
displayPriceMax: 123,
priceStartsAt: true,
cost: 123,
estimated: true,
bookingFee: 123,
bookingFeeText: '<string>',
reminderMinutesBefore: 123,
cancellationCost: 123,
hoursBeforeCancellingCosts: 123,
bookingFeePercentage: 123,
cancellationFeePctWithin24h: 123,
cancellationFeePctWithin48h: 123,
refundBookingFeeBefore48h: true,
hoursBeforeBookingFeeRefundable: 123,
followUpMinutesAfter: 123,
followUpSmsTemplate: '<string>',
reminderSmsTemplate: '<string>',
locationIds: ['<string>'],
providerIds: ['<string>'],
formIds: ['<string>'],
confirmationSmsTemplate: '<string>',
cancellationSmsTemplate: '<string>',
noShowSmsTemplate: '<string>',
overrideNoticeSmsTemplate: '<string>',
shortNoticeBlock: 123,
minutesBeforeRebookingAllowed: 123,
color: '<string>',
allowIndividualProviderBooking: true,
displayOrder: 123,
reservedTimeMinutes: 123,
category: '<string>',
isDoubleBookable: true,
isPopular: true,
onlyBookableOverThePhone: true,
creditCardRequired: true,
collectCreditCard: true,
autoGfeTreatments: ['<string>'],
brandName: '<string>',
internalNotes: '<string>',
sortOrder: 123,
allowCustomPricing: true,
externalId: '<string>',
prepTimeDuration: 123,
prepTimeBuffer: 123,
prepTimeName: '<string>',
prepTimeColor: '<string>',
prepProviderIds: ['<string>'],
bookables: [{bookableId: '<string>', startOffset: 0, duration: 5040}],
checklists: [{name: '<string>', position: 123, id: '<string>', optional: false}],
exemptedTaxIds: ['<string>']
}
]
})
};
fetch('https://api.decodahealth.com/admin/services/bulk', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.decodahealth.com/admin/services/bulk",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'updates' => [
[
'id' => '<string>',
'name' => '<string>',
'duration' => 123,
'description' => '<string>',
'price' => 123,
'displayPrice' => 123,
'displayPriceMax' => 123,
'priceStartsAt' => true,
'cost' => 123,
'estimated' => true,
'bookingFee' => 123,
'bookingFeeText' => '<string>',
'reminderMinutesBefore' => 123,
'cancellationCost' => 123,
'hoursBeforeCancellingCosts' => 123,
'bookingFeePercentage' => 123,
'cancellationFeePctWithin24h' => 123,
'cancellationFeePctWithin48h' => 123,
'refundBookingFeeBefore48h' => true,
'hoursBeforeBookingFeeRefundable' => 123,
'followUpMinutesAfter' => 123,
'followUpSmsTemplate' => '<string>',
'reminderSmsTemplate' => '<string>',
'locationIds' => [
'<string>'
],
'providerIds' => [
'<string>'
],
'formIds' => [
'<string>'
],
'confirmationSmsTemplate' => '<string>',
'cancellationSmsTemplate' => '<string>',
'noShowSmsTemplate' => '<string>',
'overrideNoticeSmsTemplate' => '<string>',
'shortNoticeBlock' => 123,
'minutesBeforeRebookingAllowed' => 123,
'color' => '<string>',
'allowIndividualProviderBooking' => true,
'displayOrder' => 123,
'reservedTimeMinutes' => 123,
'category' => '<string>',
'isDoubleBookable' => true,
'isPopular' => true,
'onlyBookableOverThePhone' => true,
'creditCardRequired' => true,
'collectCreditCard' => true,
'autoGfeTreatments' => [
'<string>'
],
'brandName' => '<string>',
'internalNotes' => '<string>',
'sortOrder' => 123,
'allowCustomPricing' => true,
'externalId' => '<string>',
'prepTimeDuration' => 123,
'prepTimeBuffer' => 123,
'prepTimeName' => '<string>',
'prepTimeColor' => '<string>',
'prepProviderIds' => [
'<string>'
],
'bookables' => [
[
'bookableId' => '<string>',
'startOffset' => 0,
'duration' => 5040
]
],
'checklists' => [
[
'name' => '<string>',
'position' => 123,
'id' => '<string>',
'optional' => false
]
],
'exemptedTaxIds' => [
'<string>'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"API-KEY: <api-key>",
"Content-Type: application/json",
"TENANT: <tenant>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.decodahealth.com/admin/services/bulk"
payload := strings.NewReader("{\n \"updates\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"duration\": 123,\n \"description\": \"<string>\",\n \"price\": 123,\n \"displayPrice\": 123,\n \"displayPriceMax\": 123,\n \"priceStartsAt\": true,\n \"cost\": 123,\n \"estimated\": true,\n \"bookingFee\": 123,\n \"bookingFeeText\": \"<string>\",\n \"reminderMinutesBefore\": 123,\n \"cancellationCost\": 123,\n \"hoursBeforeCancellingCosts\": 123,\n \"bookingFeePercentage\": 123,\n \"cancellationFeePctWithin24h\": 123,\n \"cancellationFeePctWithin48h\": 123,\n \"refundBookingFeeBefore48h\": true,\n \"hoursBeforeBookingFeeRefundable\": 123,\n \"followUpMinutesAfter\": 123,\n \"followUpSmsTemplate\": \"<string>\",\n \"reminderSmsTemplate\": \"<string>\",\n \"locationIds\": [\n \"<string>\"\n ],\n \"providerIds\": [\n \"<string>\"\n ],\n \"formIds\": [\n \"<string>\"\n ],\n \"confirmationSmsTemplate\": \"<string>\",\n \"cancellationSmsTemplate\": \"<string>\",\n \"noShowSmsTemplate\": \"<string>\",\n \"overrideNoticeSmsTemplate\": \"<string>\",\n \"shortNoticeBlock\": 123,\n \"minutesBeforeRebookingAllowed\": 123,\n \"color\": \"<string>\",\n \"allowIndividualProviderBooking\": true,\n \"displayOrder\": 123,\n \"reservedTimeMinutes\": 123,\n \"category\": \"<string>\",\n \"isDoubleBookable\": true,\n \"isPopular\": true,\n \"onlyBookableOverThePhone\": true,\n \"creditCardRequired\": true,\n \"collectCreditCard\": true,\n \"autoGfeTreatments\": [\n \"<string>\"\n ],\n \"brandName\": \"<string>\",\n \"internalNotes\": \"<string>\",\n \"sortOrder\": 123,\n \"allowCustomPricing\": true,\n \"externalId\": \"<string>\",\n \"prepTimeDuration\": 123,\n \"prepTimeBuffer\": 123,\n \"prepTimeName\": \"<string>\",\n \"prepTimeColor\": \"<string>\",\n \"prepProviderIds\": [\n \"<string>\"\n ],\n \"bookables\": [\n {\n \"bookableId\": \"<string>\",\n \"startOffset\": 0,\n \"duration\": 5040\n }\n ],\n \"checklists\": [\n {\n \"name\": \"<string>\",\n \"position\": 123,\n \"id\": \"<string>\",\n \"optional\": false\n }\n ],\n \"exemptedTaxIds\": [\n \"<string>\"\n ]\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("TENANT", "<tenant>")
req.Header.Add("API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.decodahealth.com/admin/services/bulk")
.header("TENANT", "<tenant>")
.header("API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"updates\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"duration\": 123,\n \"description\": \"<string>\",\n \"price\": 123,\n \"displayPrice\": 123,\n \"displayPriceMax\": 123,\n \"priceStartsAt\": true,\n \"cost\": 123,\n \"estimated\": true,\n \"bookingFee\": 123,\n \"bookingFeeText\": \"<string>\",\n \"reminderMinutesBefore\": 123,\n \"cancellationCost\": 123,\n \"hoursBeforeCancellingCosts\": 123,\n \"bookingFeePercentage\": 123,\n \"cancellationFeePctWithin24h\": 123,\n \"cancellationFeePctWithin48h\": 123,\n \"refundBookingFeeBefore48h\": true,\n \"hoursBeforeBookingFeeRefundable\": 123,\n \"followUpMinutesAfter\": 123,\n \"followUpSmsTemplate\": \"<string>\",\n \"reminderSmsTemplate\": \"<string>\",\n \"locationIds\": [\n \"<string>\"\n ],\n \"providerIds\": [\n \"<string>\"\n ],\n \"formIds\": [\n \"<string>\"\n ],\n \"confirmationSmsTemplate\": \"<string>\",\n \"cancellationSmsTemplate\": \"<string>\",\n \"noShowSmsTemplate\": \"<string>\",\n \"overrideNoticeSmsTemplate\": \"<string>\",\n \"shortNoticeBlock\": 123,\n \"minutesBeforeRebookingAllowed\": 123,\n \"color\": \"<string>\",\n \"allowIndividualProviderBooking\": true,\n \"displayOrder\": 123,\n \"reservedTimeMinutes\": 123,\n \"category\": \"<string>\",\n \"isDoubleBookable\": true,\n \"isPopular\": true,\n \"onlyBookableOverThePhone\": true,\n \"creditCardRequired\": true,\n \"collectCreditCard\": true,\n \"autoGfeTreatments\": [\n \"<string>\"\n ],\n \"brandName\": \"<string>\",\n \"internalNotes\": \"<string>\",\n \"sortOrder\": 123,\n \"allowCustomPricing\": true,\n \"externalId\": \"<string>\",\n \"prepTimeDuration\": 123,\n \"prepTimeBuffer\": 123,\n \"prepTimeName\": \"<string>\",\n \"prepTimeColor\": \"<string>\",\n \"prepProviderIds\": [\n \"<string>\"\n ],\n \"bookables\": [\n {\n \"bookableId\": \"<string>\",\n \"startOffset\": 0,\n \"duration\": 5040\n }\n ],\n \"checklists\": [\n {\n \"name\": \"<string>\",\n \"position\": 123,\n \"id\": \"<string>\",\n \"optional\": false\n }\n ],\n \"exemptedTaxIds\": [\n \"<string>\"\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.decodahealth.com/admin/services/bulk")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["TENANT"] = '<tenant>'
request["API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"updates\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"duration\": 123,\n \"description\": \"<string>\",\n \"price\": 123,\n \"displayPrice\": 123,\n \"displayPriceMax\": 123,\n \"priceStartsAt\": true,\n \"cost\": 123,\n \"estimated\": true,\n \"bookingFee\": 123,\n \"bookingFeeText\": \"<string>\",\n \"reminderMinutesBefore\": 123,\n \"cancellationCost\": 123,\n \"hoursBeforeCancellingCosts\": 123,\n \"bookingFeePercentage\": 123,\n \"cancellationFeePctWithin24h\": 123,\n \"cancellationFeePctWithin48h\": 123,\n \"refundBookingFeeBefore48h\": true,\n \"hoursBeforeBookingFeeRefundable\": 123,\n \"followUpMinutesAfter\": 123,\n \"followUpSmsTemplate\": \"<string>\",\n \"reminderSmsTemplate\": \"<string>\",\n \"locationIds\": [\n \"<string>\"\n ],\n \"providerIds\": [\n \"<string>\"\n ],\n \"formIds\": [\n \"<string>\"\n ],\n \"confirmationSmsTemplate\": \"<string>\",\n \"cancellationSmsTemplate\": \"<string>\",\n \"noShowSmsTemplate\": \"<string>\",\n \"overrideNoticeSmsTemplate\": \"<string>\",\n \"shortNoticeBlock\": 123,\n \"minutesBeforeRebookingAllowed\": 123,\n \"color\": \"<string>\",\n \"allowIndividualProviderBooking\": true,\n \"displayOrder\": 123,\n \"reservedTimeMinutes\": 123,\n \"category\": \"<string>\",\n \"isDoubleBookable\": true,\n \"isPopular\": true,\n \"onlyBookableOverThePhone\": true,\n \"creditCardRequired\": true,\n \"collectCreditCard\": true,\n \"autoGfeTreatments\": [\n \"<string>\"\n ],\n \"brandName\": \"<string>\",\n \"internalNotes\": \"<string>\",\n \"sortOrder\": 123,\n \"allowCustomPricing\": true,\n \"externalId\": \"<string>\",\n \"prepTimeDuration\": 123,\n \"prepTimeBuffer\": 123,\n \"prepTimeName\": \"<string>\",\n \"prepTimeColor\": \"<string>\",\n \"prepProviderIds\": [\n \"<string>\"\n ],\n \"bookables\": [\n {\n \"bookableId\": \"<string>\",\n \"startOffset\": 0,\n \"duration\": 5040\n }\n ],\n \"checklists\": [\n {\n \"name\": \"<string>\",\n \"position\": 123,\n \"id\": \"<string>\",\n \"optional\": false\n }\n ],\n \"exemptedTaxIds\": [\n \"<string>\"\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body[
{
"id": "<string>",
"name": "<string>",
"duration": 123,
"description": "<string>",
"price": 123,
"displayPrice": 123,
"displayPriceMax": 123,
"priceStartsAt": false,
"cost": 123,
"estimated": false,
"bookingFee": 123,
"bookingFeeText": "<string>",
"reminderMinutesBefore": 123,
"cancellationCost": 123,
"hoursBeforeCancellingCosts": 123,
"bookingFeePercentage": 123,
"cancellationFeePctWithin24h": 123,
"cancellationFeePctWithin48h": 123,
"refundBookingFeeBefore48h": true,
"hoursBeforeBookingFeeRefundable": 123,
"followUpMinutesAfter": 123,
"followUpSmsTemplate": "<string>",
"reminderSmsTemplate": "<string>",
"locationIds": [
"<string>"
],
"providerIds": [
"<string>"
],
"createdDate": "2023-11-07T05:31:56Z",
"updatedDate": "2023-11-07T05:31:56Z",
"formIds": [
"<string>"
],
"confirmationSmsTemplate": "<string>",
"cancellationSmsTemplate": "<string>",
"noShowSmsTemplate": "<string>",
"overrideNoticeSmsTemplate": "<string>",
"shortNoticeBlock": 123,
"visibility": "ALL",
"minutesBeforeRebookingAllowed": 123,
"color": "<string>",
"allowIndividualProviderBooking": true,
"displayOrder": 123,
"reservedTimeMinutes": 123,
"category": "<string>",
"isDoubleBookable": true,
"isPopular": false,
"onlyBookableOverThePhone": false,
"creditCardRequired": false,
"collectCreditCard": false,
"autoGfeTreatments": [
"<string>"
],
"brandName": "<string>",
"internalNotes": "<string>",
"sortOrder": 123,
"allowCustomPricing": false,
"externalId": "<string>",
"prepTimeDuration": 123,
"prepTimeBuffer": 123,
"prepTimeName": "<string>",
"prepTimeColor": "<string>",
"prepProviderIds": [
"<string>"
],
"checklists": [
{
"name": "<string>",
"position": 123,
"id": "<string>",
"optional": false
}
],
"bookables": [
{
"bookableId": "<string>",
"startOffset": 0,
"duration": 5040
}
],
"exemptedTaxIds": [
"<string>"
]
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Headers
The tenant you are making this request on behalf of
Your api key
Body
application/json
Request schema for bulk updating multiple services.
Show child attributes
Show child attributes
Response
Successful Response
Available options:
ALL, NEW, EXISTING, NO Available options:
AMPOULES, APPLICATORS, BOTTLES, BOXES, CAPSULES, CUPS, DOSES, G_PER_ML, GRAMS, IU, IU_PER_ML, OUNCES, FLUID_OUNCES, KG, KITS, LITERS, MCG, MG, MG_PER_ML, ML, MMOL, MICROGRAM_PER_ML, PACKS, PAIRS, PATCHES, PERCENTAGE, PIECES, POUCHES, ROLLS, SACHETS, SHEETS, SPRAYS, STRIPS, SYRINGES, TABLETS, TABLETS_PER_DAY, TESTS, TUBES, UNITS, VIALS, TREATMENTS, SESSIONS, PULSES, JOULES, CENTIMETERS, THREAD_COUNT, INJECTIONS, WRINKLE_UNITS, POUNDS, FEET, INCHES Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I
