Saltar al contenido principal
GET

Buscar contactos por nombre

Scope:contacts:contacts.read
https://api.holded.com/api/v2/contacts/search

Busca contactos por nombre. Compara contra el campo `name` con coincidencia por prefijo (estilo autocompletado): `?name=Joh` coincide con `John Due`, `John Smith`, etc. Sensible a tokens, insensible a mayúsculas y diacríticos. La respuesta incluye un valor `cursor` y un booleano `has_more`. Pasa el `cursor` en la siguiente petición para obtener la página siguiente. El tamaño de página por defecto es 25 contactos. Puedes aumentarlo hasta 100 con el parámetro `limit`.

Parámetros

Parámetros de consulta

namestringobligatorio

Término de búsqueda comparado contra el campo `name` del contacto (coincidencia por prefijo, insensible a mayúsculas y diacríticos)

cursorstringopcional

Cursor opaco para paginación. Usa el valor devuelto en la respuesta anterior para obtener la página siguiente

limitintegeropcional= 50

Número máximo de contactos a devolver por página. Por defecto 25, máximo 100

Petición

python
import requests

url = "https://api.holded.com/api/v2/contacts/search?name=value&cursor=value&limit=50"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Accept": "application/json",
}

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

Respuestas

Respuesta

json
{
  "items": [
    {
      "id": "507f1f77bcf86cd799439011",
      "custom_id": "string",
      "name": "string",
      "code": "string",
      "vat_number": "string",
      "trade_name": "string",
      "is_person": false,
      "email": "string",
      "mobile": "string",
      "phone": "string",
      "type": "client",
      "iban": "string",
      "swift": "string",
      "sepa_ref": "string",
      "sepa_date": "2024-01-15",
      "tax_operation": "string",
      "group_id": "string",
      "tags": [
        "string"
      ],
      "created_at": "2024-01-15T10:30:00Z",
      "updated_at": "2024-01-15T10:30:00Z",
      "bill_address": {
        "address": "string",
        "city": "string",
        "postal_code": "string",
        "province": "string",
        "country": "string",
        "country_code": "ES",
        "info": "string"
      },
      "client_record": {
        "num": 0,
        "name": "string"
      },
      "supplier_record": {
        "num": 0,
        "name": "string"
      },
      "defaults": {
        "sales_channel": "string",
        "expenses_account": "string",
        "due_days": 0,
        "payment_day": 0,
        "payment_method": "string",
        "discount": 0,
        "language": "string",
        "currency": "string",
        "sales_tax": [
          "..."
        ],
        "purchases_tax": [
          "..."
        ],
        "accumulate_in_form_347": false,
        "numbering_series": {
          "invoice": "...",
          "receipt": "...",
          "salesorder": "...",
          "estimate": "...",
          "order": "...",
          "proform": "...",
          "waybill": "..."
        }
      },
      "shipping_addresses": [
        {
          "shipping_id": "...",
          "name": "...",
          "address": "...",
          "city": "...",
          "postal_code": "...",
          "province": "...",
          "country": "...",
          "country_code": "...",
          "notes": "...",
          "private_notes": "..."
        }
      ],
      "notes": [
        {
          "note_id": "...",
          "name": "...",
          "description": "...",
          "color": "...",
          "updated_at": "..."
        }
      ],
      "contact_persons": [
        {
          "id": "..."
        }
      ],
      "custom_fields": [
        {
          "field": "...",
          "value": "..."
        }
      ],
      "extra_emails": [
        "string"
      ],
      "website": "string",
      "social_networks": {},
      "rate": {
        "id": "string",
        "name": "string",
        "description": "string"
      }
    }
  ],
  "cursor": "string",
  "has_more": false
}

Respuestas exitosas

200Listado de contactos que coinciden con los criterios de búsquedaapplication/json
object
items[]object[]
idstring

Unique identifier of the contact

custom_idstring | null

Your external reference identifier for this contact

namestring

Full name of the contact or company

codestring | null

Tax identification number

vat_numberstring | null

EU VAT number for intra-community operations

trade_namestring | null

Commercial trading name, if different from the legal name

is_personboolean

Whether the contact is an individual person rather than a company

emailstring | null

Primary email address

mobilestring | null

Mobile phone number

phonestring | null

Landline phone number

typestring | null

Classification of the contact

Enum:clientdebtorsuppliercreditorlead
ibanstring | null

IBAN bank account number

swiftstring | null

SWIFT/BIC code of the bank

sepa_refstring | null

SEPA mandate reference for direct debit collections

sepa_datestring<date> | null

Date the SEPA direct debit mandate was signed

tax_operationstring | null

Fiscal operation type of the contact (e.g. general, intra, receq, exento)

group_idstring | null

Identifier of the contact group this contact belongs to

tags[]string[]

List of tags attached to the contact

created_atstring<date-time> | null

Timestamp when the contact was created

updated_atstring<date-time> | null

Timestamp when the contact was last modified

bill_addressobject | null

Billing address of the contact

client_recordobject | null

Accounting account (chart of accounts) used when this contact acts as a client

supplier_recordobject | null

Accounting account (chart of accounts) used when this contact acts as a supplier

defaultsobject | null

Default settings applied to new documents for this contact

shipping_addresses[]object[]

List of shipping addresses

notes[]object[]

Internal notes attached to the contact

contact_persons[]object[]

People associated with this contact. Only their ids are returned, get the contact by this `id` for the rest of the fields

custom_fields[]object[]

User-defined custom fields

extra_emails[]string[]

Additional email addresses for the contact

websitestring | null

Website URL of the contact

social_networksobject | null

Social network profiles of the contact

rateobject | null

Price rate assigned to this contact

cursorstring | null
has_moreboolean

Respuestas de error

400Falta el parámetro `name` obligatorioapplication/json
401API key inválida o no proporcionadaapplication/json
403Permisos insuficientesapplication/json
429Límite de solicitudes excedidoapplication/json