Saltar al contingut principal
GET

Llistat de contactes

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

Retorna una llista paginada de contactes del teu compte. Pots filtrar per `phone`, `mobile`, `email`, `code` o `custom_id` per trobar contactes específics. Tots els filtres utilitzen coincidència exacta. Els resultats estan paginats per cursor.

Paràmetres

Paràmetres de consulta

phonestringopcional

Filtrar contactes per número de telèfon exacte

mobilestringopcional

Filtrar contactes per número de mòbil exacte

emailstringopcional

Filtrar contactes per adreça d'email exacta

custom_idstringopcional

Filtrar contactes per identificador de referència externa

codestringopcional

Filtrar contactes per número d'identificació fiscal exacte (NIF/CIF)

cursorstringopcional

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

limitintegeropcional= 50

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

Petició

python
import requests

url = "https://api.holded.com/api/v2/contacts?phone=value&mobile=value&email=value"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Accept": "application/json",
}

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

Respostes

Resposta

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
}

Respostes exitoses

200Llistat de contactesapplication/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

Respostes d'error

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