Customers

Update a customer partially

Updates only the fields present in the body, leaving every other field of the customer as it is.

  • Null vs omitted: a field sent as null is cleared, which is different from omitting it (see PatchCustomerRequest). The result goes through the same validation as PUT.
  • AEAT census: the customer's Spanish tax identifier is only checked against the AEAT census when the request changes the nif or the legal_name. Editing anything else never asks the census. For a legal entity the census checks the CIF only and its legal_name is not verified, so the name never causes the rejection; only a natural person's NIF is crossed with the name. Duplicate and format checks run on every update.
  • Deprecated: use PATCH /v1/companies/{company_id}/customers/{customer_id}, which behaves identically.

Retires on 9 December 2026. See the migration guide for what moved where and what changes when you switch.

patch/v1/customers/{customer_id}

Request

  • Base URL: https://app.beel.es/api
  • URL: https://app.beel.es/api/v1/customers/{customer_id}
  • Auth: HTTP bearer

Path parameters

customer_idstring uuid required

Universally Unique Identifier (UUID v4)

Example:550e8400-e29b-41d4-a716-446655440000

Customer ID

Request body

nifstring

Spanish Tax ID (9 characters, uppercase only). Structural validation:

  • DNI: 8 digits + 1 letter (e.g., 12345678A)
  • NIE: X/Y/Z + 7 digits + 1 letter (e.g., X1234567A)
  • CIF: Organization letter + 7 digits + 1 control digit/letter (e.g., B12345674)
legal_namestring

Customer legal name. Cannot be cleared. Matched against the AEAT census only for individuals; for a company the name is not verified.

trade_namestring nullable

Customer trade name. Send null to clear it.

phonestring

A phone number as this API accepts it: 9 to 20 characters, and only digits, spaces, dashes, parentheses and an optional leading +. Every request that takes a phone number uses this schema.

It is Phone plus the rules enforced on input. A value this schema accepts always satisfies Phone, so anything you send here is something a response can return.

emailstring email nullable

Main contact address. Invoice emails go here only when the customer has no billing_emails. Send null to clear it.

websitestring nullable

Website URL. Send null to clear it.

billing_emailsEmail[] nullable

Addresses that receive the customer's invoice emails. When the send request names no recipients and the invoice has no email_config recipients, invoices go to these addresses, and not to email; email is used only when billing_emails is empty. Replaced as a whole; send null or [] to remove them all.

contact_personstring nullable

Contact person name. Send null to clear it.

notesstring nullable

Additional notes. Send null to clear it.

general_discountnumber nullable

General discount percentage. Send null to clear it.

activeboolean

Whether the customer is active or inactive.

Example request

{
  "nif": "12345678A",
  "address": {
    "street": "Calle Mayor, 123",
    "number": "123",
    "floor": "2º A",
    "door": "A",
    "postal_code": "28001",
    "city": "Madrid",
    "province": "Madrid",
    "country": "España",
    "country_code": "ES"
  },
  "phone": "+34 612 345 678",
  "billing_emails": [
    "user@example.com"
  ],
  "preferred_payment_method": {
    "method": "BANK_TRANSFER",
    "iban": "ES1234567890123456789012",
    "swift": "ABCDESMMXXX",
    "payment_term_days": 30
  }
}

Response

Customer updated successfully

successboolean required

Example response

{
  "success": true,
  "data": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "legal_name": "Empresa Cliente SL",
    "trade_name": "EmpresaCliente",
    "nif": "12345678A",
    "address": {
      "street": "Calle Mayor, 123",
      "number": "123",
      "floor": "2º A",
      "door": "A",
      "postal_code": "28001",
      "city": "Madrid",
      "province": "Madrid",
      "country": "España",
      "country_code": "ES"
    },
    "phone": "+34 612 345 678",
    "billing_emails": [
      "user@example.com"
    ],
    "contact_person": "María García",
    "preferred_payment_method": {
      "method": "BANK_TRANSFER",
      "iban": "ES1234567890123456789012",
      "swift": "ABCDESMMXXX",
      "payment_term_days": 30
    }
  },
  "meta": {
    "timestamp": "2025-01-15T10:30:00Z",
    "request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.