Update a service
Scope: sales:services.write https://api.alladdin.com/api/v2/services/{serviceId}
Updates an existing service. Only the fields included in the request body will be modified — omitted fields will keep their current value.
Parameters
Path parameters
serviceId string required
Service ID (24-char hex ObjectId)
Request body
object name string description string | null price number cost number | null tax number | null taxes[] string[] | null
Array of tax keys to apply. Retrieve valid keys from GET /api/v2/taxes before setting this field.
tags[] string[] | null sales_channel_id string | null code string | null color string | null duration number | null
Request
import requests
url = "https://api.alladdin.com/api/v2/services/{serviceId}"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Accept": "application/json",
}
payload = {
"name": "Consulting",
"description": "Consulting service",
"price": 100,
"cost": 50,
"tax": 21,
"taxes": [
"string"
],
"tags": [
"string"
],
"sales_channel_id": "string",
"code": "string",
"color": "string",
"duration": 0
}
response = requests.put(url, headers=headers, json=payload)
print(response.json())Responses
Response
{
"id": "string"
}Success responses
200 Service updated application/json object id string
Error responses
400 Bad request application/json 401 Invalid or missing API key application/json 403 Insufficient permissions application/json 404 Service not found application/json 429 Rate limit exceeded application/json
