Saltar al contingut principal
GET

Obtenir un servei

Scope:sales:services.read
https://api.holded.com/api/v2/services/{serviceId}

Recupera tots els detalls d'un servei específic pel seu identificador únic.

Paràmetres

Paràmetres de ruta

serviceIdstringobligatori

ID del servei (ObjectId hexadecimal de 24 caràcters)

Petició

python
import requests

url = "https://api.holded.com/api/v2/services/{serviceId}"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Accept": "application/json",
}

response = requests.get(url, headers=headers)
print(response.json())

Respostes

Resposta

json
{
  "id": "507f1f77bcf86cd799439011",
  "name": "Consulting",
  "code": "SRV-001",
  "description": "Consulting service",
  "price": "100.00",
  "cost": "50.00",
  "tags": [
    "string"
  ],
  "taxes": [
    "string"
  ],
  "sales_channel_id": "string",
  "color": "string",
  "duration": "string",
  "archived": false
}

Respostes exitoses

200Servei trobatapplication/json
object
idstring

Unique identifier of the service

namestring

Name of the service

codestring

Internal reference code for the service

descriptionstring

Description of the service

pricestring

Sale price as a decimal string

coststring

Cost price as a decimal string

tags[]string[]

List of tags attached to the service

taxes[]string[]

List of tax identifiers applied to the service

sales_channel_idstring | null

Identifier of the sales channel assigned to this service

colorstring | null

Hex color code used in the UI

durationstring | null

Duration in minutes as a decimal string

archivedboolean

Whether the service is archived

Respostes d'error

401API key no vàlida o no proporcionadaapplication/json
403Permisos insuficientsapplication/json
404Servei no trobatapplication/json
429Límit de sol·licituds exceditapplication/json