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
| Field | Type | Description | Validations |
|---|---|---|---|
erp_customer_id | String | Customer ID in ERP | Cannot be empty. Must exist in Customers — see the warning below |
names | String | Contact first name(s) | Cannot be empty |
lastnames | String | Contact last name(s) | Cannot be empty |
is_primary | Boolean | Is primary contact? | Mandatory: 1 or 0. Any other value (true, si, yes) is rejected |
Optional Fields
| Field | Type | Description | Validations | Default |
|---|---|---|---|---|
email | String | Contact email | Valid email format. At least email OR mobile_phone required | null |
mobile_phone | String | Mobile phone number | Digits only: spaces, + and dashes are rejected. If provided, mobile_phone_code is required | null |
mobile_phone_code | String | Country code for mobile | Digits only. Required if mobile_phone is present | null |
phone | String | Landline number | Digits only. Does not require phone_code | null |
phone_code | String | Country code for landline | Digits only | null |
job_title | String | Job 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 to0. 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_idin 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