Contacts

Manage contacts associated with customers.


Contact persons associated with customers.

Dependency: Requires Customers to be uploaded first.

Endpoint

POST /full-csv-integration/upload-contacts

  • Form Field: contactsFile

Required Fields

FieldTypeDescriptionValidations
erp_customer_idStringCustomer ID in ERPCannot be empty. Must exist in Customers — see the warning below
namesStringContact first name(s)Cannot be empty
lastnamesStringContact last name(s)Cannot be empty
is_primaryBooleanIs primary contact?Mandatory: 1 or 0. Any other value (true, si, yes) is rejected

Optional Fields

FieldTypeDescriptionValidationsDefault
emailStringContact emailValid email format. At least email OR mobile_phone requirednull
mobile_phoneStringMobile phone numberDigits only: spaces, + and dashes are rejected. If provided, mobile_phone_code is requirednull
mobile_phone_codeStringCountry code for mobileDigits only. Required if mobile_phone is presentnull
phoneStringLandline numberDigits only. Does not require phone_codenull
phone_codeStringCountry code for landlineDigits onlynull
job_titleStringJob position/title-null

Primary contact

  • If several contacts of the same customer arrive with is_primary = 1, the first one in the file is kept as primary and the rest are set to 0. This is not an error.
  • The primary from the file replaces the one the customer already had: the previous contact stops being primary, even if it is not in the file.

⚠️ Rows referencing a customer that does not exist: they are dropped while the file is processed and this is not reflected in the response, which had already confirmed the upload. If no erp_customer_id in the file exists in Customers, nothing is processed. Upload Customers first.

Repeated contacts: this file does not deduplicate. If the same person appears twice, two contacts are created.

When updating a contact that already exists, the landline (phone) is not modified: it is only stored when the contact is created.

Example CSV

erp_customer_id,names,lastnames,email,mobile_phone,mobile_phone_code,is_primary,job_title
CUST001,Juan,Pérez,juan.perez@abc.com,3001234567,57,1,Gerente General
CUST001,María,García,maria.garcia@abc.com,3009876543,57,0,Asistente
CUST002,Carlos,Rodríguez,carlos@xyz.com,3012345678,57,1,Director