Saltar al contingut principal
GET

Llistat de serveis

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

Retorna una llista paginada de serveis del teu catàleg.

Paràmetres

Paràmetres de consulta

limitintegeropcional= 50

Nombre màxim de serveis a retornar per pàgina. Per defecte 25, màxim 100

cursorstringopcional

Cursor opac per a la paginació. Utilitza el valor retornat a la resposta anterior

include_archivedbooleanopcional= false

Si s'inclouen els serveis arxivats en els resultats

Petició

python
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

json
{
  "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/json
object
items[]object[]required
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

has_morebooleanrequired

Whether there are more items on the next page

cursorstring | nulloptional

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/json
403Permisos insuficientsapplication/json
429Límit de sol·licituds exceditapplication/json