New API version v7.8.64 has been released! 🎉
REST Documentation
PATCH Update Customer

Update Customer

This endpoint allows you to update an existing customer. All fields are optional; only provided fields will be updated.

Request

PATCH /api/v1/customers/:customer_number
curl --request PATCH \
     --url 'https://www.zep-online.de/zepinstanz/next/api/v1/customers/C-12345' \
     --header 'Accept: application/json' \
     --header 'Authorization: Bearer {token}' \
     --header 'Content-Type: application/json' \
     --data '{
  "name": "Acme Corporation Ltd",
  "email": "contact@acme-corp.com",
  "phone": "+1 555-1234",
  "website": "https://www.acme-corp.com",
  "status": 1,
  "vat": 19.0,
  "payment_target": 30
}'

Parameters

  • customer_number (string, required): The customer number of the customer to update

Optional Fields

All fields are optional. You can update individual or multiple fields at once:

  • customer_number (string): Unique customer number/identifier (max. 32 characters)
  • name (string): Primary customer name (max. 120 characters)
  • additional_name (string): Additional name or legal entity name (max. 120 characters)
  • website (string): Customer website URL (max. 120 characters)
  • email (string): Primary contact email (max. 320 characters)
  • phone (string): Primary contact phone number (max. 32 characters)
  • fax (string): Fax number (max. 32 characters)
  • currency (string): Currency code (must exist in currencies table)
  • comments (string): Additional comments or notes about the customer
  • industry (string): Industry or business sector (max. 32 characters)
  • vat (number): VAT percentage rate (0-100)
  • tax_number (string): Tax identification number (max. 32 characters)
  • iban (string): International Bank Account Number (max. 34 characters)
  • bic (string): Bank Identifier Code (SWIFT code, max. 11 characters)
  • payment_target (integer): Payment target in days (≥ 0)
  • payment_target_discount (integer): Early payment discount period in days (≥ 0)
  • status (integer): Customer status
    • 0 - Inactive
    • 1 - Active
  • billing_procedure (boolean): Enable special billing procedure
  • automated_invoicing (boolean): Enable automated invoicing
  • debit_payment (boolean): Enable debit payment method
  • department_id (integer): Department ID (must exist in departments table)
  • dynamic_attributes (array): Custom dynamic attributes for the customer
  • categories (array): Array of category IDs to associate with this customer

Response

{
	"data": {
		"id": 789,
		"customer_number": "C-12345",
		"name": "Acme Corporation Ltd",
		"additional_name": "Acme Corp.",
		"email": "contact@acme-corp.com",
		"phone": "+1 555-1234",
		"website": "https://www.acme-corp.com",
		"currency": "USD",
		"status": 1,
		"vat": 19.0,
		"payment_target": 30,
		"created": "2024-01-15T10:30:00.000000Z",
		"modified": "2024-11-20T14:25:00.000000Z"
	},
	"info": null
}

Response Fields

  • data: The updated customer object
  • info: Optional consistency information when customer data was adjusted during update

Error Codes

  • 401 Unauthorized: Invalid or missing authentication
  • 404 Not Found: Customer not found
  • 422 Unprocessable Entity: Validation error

Notes

  • Only the submitted fields will be updated; unspecified fields remain unchanged
  • Customer number can be changed but must remain unique
  • Currency code must exist in the system currency table
  • Department ID must reference an existing department
  • VAT value must be between 0 and 100
  • Payment target values must be non-negative