POST
Create a service
Scope:
sales:services.writehttps://api.holded.com/api/v2/servicesCreates a new service in your catalog. Services represent non-physical items you sell or purchase, such as consulting hours, subscriptions, or support contracts. The response returns the new service `id`. You can then use this ID when adding line items to invoices and other documents.
Request body
object
namestringrequired
Service name
descriptionstring | nulloptional
Service description
pricenumberoptional
Unit sale price
costnumber | nulloptional
Unit cost price
taxnumber | nulloptional
Tax percentage
taxes[]string[] | nulloptional
List of tax identifiers to apply
tags[]string[] | nulloptional
List of tag names
sales_channel_idstring | nulloptional
Sales channel identifier
codestring | nulloptional
Internal reference code
colorstring | nulloptional
Display color
durationnumber | nulloptional
Duration in minutes
Request
python
import requests
url = "https://api.holded.com/api/v2/services"
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.post(url, headers=headers, json=payload)
print(response.json())Responses
Response
json
{
"id": "507f1f77bcf86cd799439011"
}Success responses
201Service createdapplication/jsonobject
idstring
Error responses
400Bad requestapplication/json401Invalid or missing API keyapplication/json403Insufficient permissionsapplication/json422Validation errorapplication/json429Rate limit exceededapplication/json