Llistat de serveis
sales:services.readhttps://api.holded.com/api/v2/servicesRetorna una llista paginada de serveis del teu catàleg.
Paràmetres
Paràmetres de consulta
integeropcional= 50Nombre màxim de serveis a retornar per pàgina. Per defecte 25, màxim 100
stringopcionalCursor opac per a la paginació. Utilitza el valor retornat a la resposta anterior
booleanopcional= falseSi s'inclouen els serveis arxivats en els resultats
Petició
import requests
url = "https://api.holded.com/api/v2/services?limit=50&cursor=value&include_archived=false"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Accept": "application/json",
}
response = requests.get(url, headers=headers)
print(response.json())Respostes
Resposta
{
"items": [
{
"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
}
],
"has_more": false,
"cursor": "string"
}Respostes exitoses
200Llistat de serveisapplication/jsonUnique identifier of the service
Name of the service
Internal reference code for the service
Description of the service
Sale price as a decimal string
Cost price as a decimal string
List of tags attached to the service
List of tax identifiers applied to the service
Identifier of the sales channel assigned to this service
Hex color code used in the UI
Duration in minutes as a decimal string
Whether the service is archived
Whether there are more items on the next page
Opaque cursor to pass as ?cursor= to fetch the next page. Null on the last page.
Respostes d'error
401API key no vàlida o no proporcionadaapplication/json403Permisos insuficientsapplication/json429Límit de sol·licituds exceditapplication/json