GET
Llistat d'oportunitats
Scope:
crm:deals.readhttps://api.holded.com/api/v2/leadsRetorna una llista paginada d'oportunitats CRM del teu compte.
Paràmetres
Paràmetres de consulta
cursor
stringopcionalCursor opac per a la paginació. Utilitza el valor retornat a la resposta anterior
limit
integeropcional= 50Nombre màxim d'oportunitats a retornar per pàgina
Petició
python
import requests
url = "https://api.holded.com/api/v2/leads?cursor=value&limit=50"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Accept": "application/json",
}
response = requests.get(url, headers=headers)
print(response.json())Respostes
Resposta
json
{
"items": [
{
"id": "507f1f77bcf86cd799439011",
"user_id": "string",
"created_by": "string",
"assigned_to": "string",
"funnel_id": "string",
"contact_id": "string",
"contact_name": "string",
"name": "string",
"person_id": "string",
"person_name": "string",
"value": "1500.00",
"potential": "75",
"due_date": "string",
"stage_id": "string",
"created_at": "string",
"updated_at": "string",
"custom_fields": [
{}
],
"status": "open"
}
],
"has_more": false,
"cursor": "string"
}Respostes exitoses
200Llistat d'oportunitatsapplication/jsonobject
items[]object[]required
idstringrequired
Unique identifier
user_idstringrequired
Owner user ID
created_bystringrequired
Creator user ID
assigned_tostring | nullrequired
Assigned user ID
funnel_idstringrequired
Funnel ID
contact_idstringrequired
Contact ID
contact_namestringrequired
Contact name
namestringrequired
Lead name
person_idstring | nullrequired
Person ID
person_namestring | nullrequired
Person name
valuestringrequired
Deal value as decimal string
potentialstringrequired
Deal potential as a decimal string
due_datestring | nullrequired
Due date in ISO 8601 format
stage_idstringrequired
Current stage ID
created_atstring | nullrequired
Creation date in ISO 8601 format
updated_atstring | nullrequired
Last update date in ISO 8601 format
custom_fields[]object[]required
Custom fields
statusstringrequired
Lead status
Enum:
openwonlosthas_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/json403Permisos insuficientsapplication/json429Límit de sol·licituds exceditapplication/json