Skip to main content
POST

Create a service

Scope:sales:services.write
https://api.holded.com/api/v2/services

Creates 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/json
object
idstring

Error responses

400Bad requestapplication/json
401Invalid or missing API keyapplication/json
403Insufficient permissionsapplication/json
422Validation errorapplication/json
429Rate limit exceededapplication/json