This section covers endpoints for updating and managing customer-related resources including contact emails, phone numbers, and company names (razones sociales).
Manage email addresses associated with a customer.
Add Email
Add a new email address for a customer.
Path Parameters
Request Body
Whether this email should be used for invoicing
Additional notes about this email
Contact person’s name for this email
Contact person’s role or position
curl --location 'https://api.example.com/api/customers/1/emails' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_TOKEN' \
--data-raw '{
"email": "[email protected] ",
"is_for_invoicing": true,
"name": "John Doe",
"role": "Finance Manager",
"notes": "Primary contact for billing"
}'
{
"email_id" : 1 ,
"customer_id" : 1 ,
"email" : "[email protected] " ,
"is_for_invoicing" : true ,
"name" : "John Doe" ,
"role" : "Finance Manager" ,
"notes" : "Primary contact for billing" ,
"is_locked" : false ,
"created_at" : "2024-01-15T10:30:00Z"
}
Update Email
Update an existing email address for a customer.
Path Parameters
The email record ID to update
Request Body
The updated email address
Whether this email should be used for invoicing
Updated notes about this email
curl --location --request PUT 'https://api.example.com/api/customers/1/emails/1' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_TOKEN' \
--data-raw '{
"email": "[email protected] ",
"is_for_invoicing": false,
"notes": "Updated contact email"
}'
200 - Success
404 - Not Found
{
"email_id" : 1 ,
"customer_id" : 1 ,
"email" : "[email protected] " ,
"is_for_invoicing" : false ,
"notes" : "Updated contact email" ,
"updated_at" : "2024-01-15T10:30:00Z"
}
Toggle Email Lock
Toggle the locked status of an email address.
Path Parameters
The email record ID to toggle
curl --location 'https://api.example.com/api/customers/1/emails/1/toggle-lock' \
--header 'Authorization: Bearer YOUR_TOKEN'
Manage phone numbers associated with a customer.
Add Phone
Add a new phone number for a customer.
Path Parameters
Request Body
Phone extension if applicable
Whether this number has WhatsApp enabled
Additional notes about this phone
Contact person’s name for this phone
Contact person’s role or position
curl --location 'https://api.example.com/api/customers/1/phones' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_TOKEN' \
--data-raw '{
"phone": "+1234567890",
"extension": "123",
"is_whatsapp": true,
"name": "Jane Smith",
"role": "Sales Manager",
"notes": "Available 9-5 EST"
}'
{
"phone_id" : 1 ,
"customer_id" : 1 ,
"phone" : "+1234567890" ,
"extension" : "123" ,
"is_whatsapp" : true ,
"name" : "Jane Smith" ,
"role" : "Sales Manager" ,
"notes" : "Available 9-5 EST" ,
"is_locked" : false ,
"created_at" : "2024-01-15T10:30:00Z"
}
Update Phone
Update an existing phone number for a customer.
Path Parameters
The phone record ID to update
Request Body
Whether this number has WhatsApp enabled
Updated notes about this phone
curl --location --request PUT 'https://api.example.com/api/customers/1/phones/1' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_TOKEN' \
--data-raw '{
"phone": "+1234567899",
"extension": "456",
"is_whatsapp": false
}'
200 - Success
404 - Not Found
{
"phone_id" : 1 ,
"customer_id" : 1 ,
"phone" : "+1234567899" ,
"extension" : "456" ,
"is_whatsapp" : false ,
"updated_at" : "2024-01-15T10:30:00Z"
}
Toggle Phone Lock
Toggle the locked status of a phone number.
Company Names (Razones Sociales)
Manage legal company names and billing information for a customer.
List Company Names
Retrieve all company names associated with a customer.
Path Parameters
curl --location 'https://api.example.com/api/customers/1/company-names' \
--header 'Authorization: Bearer YOUR_TOKEN'
{
"success" : true ,
"company_names" : [
{
"company_name_id" : 1 ,
"customer_id" : 1 ,
"name" : "Acme Corp Ltd." ,
"tax_id" : "ABC123456789" ,
"billing_email" : "[email protected] " ,
"address" : "123 Main St" ,
"billing_address" : "PO Box 456" ,
"is_active" : true ,
"is_default" : true ,
"created_at" : "2024-01-15T10:30:00Z"
}
]
}
Create Company Name
Add a new company name (razón social) for a customer.
Path Parameters
Request Body
Tax identification number
Email address for billing purposes
Billing address (if different from physical address)
Whether this company name is active
Whether this is the default company name for the customer
curl --location 'https://api.example.com/api/customers/1/company-names' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_TOKEN' \
--data-raw '{
"name": "Acme Corp Ltd.",
"tax_id": "ABC123456789",
"billing_email": "[email protected] ",
"address": "123 Main St, City",
"billing_address": "PO Box 456, City",
"is_active": true,
"is_default": true
}'
{
"company_name_id" : 1 ,
"customer_id" : 1 ,
"name" : "Acme Corp Ltd." ,
"tax_id" : "ABC123456789" ,
"billing_email" : "[email protected] " ,
"address" : "123 Main St, City" ,
"billing_address" : "PO Box 456, City" ,
"is_active" : true ,
"is_default" : true ,
"created_at" : "2024-01-15T10:30:00Z"
}
Update Company Name
Update an existing company name for a customer.
Path Parameters
The company name ID to update
Request Body
All fields from the create endpoint are available for update.
curl --location --request PUT 'https://api.example.com/api/customers/1/company-names/1' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_TOKEN' \
--data-raw '{
"name": "Acme Corporation Ltd.",
"tax_id": "ABC123456789",
"billing_email": "[email protected] "
}'
200 - Success
404 - Not Found
{
"company_name_id" : 1 ,
"customer_id" : 1 ,
"name" : "Acme Corporation Ltd." ,
"tax_id" : "ABC123456789" ,
"billing_email" : "[email protected] " ,
"updated_at" : "2024-01-15T10:30:00Z"
}
Set Default Company Name
Mark a company name as the default for a customer.
Path Parameters
The company name ID to set as default
curl --location 'https://api.example.com/api/customers/1/company-names/1/set-default' \
--header 'Authorization: Bearer YOUR_TOKEN'
Toggle Company Name Active Status
Activate or deactivate a company name.
Path Parameters
The company name ID to toggle
Request Body
The desired active status
curl --location 'https://api.example.com/api/customers/1/company-names/1/toggle-active' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_TOKEN' \
--data-raw '{
"is_active": false
}'
200 - Success
404 - Not Found
{
"company_name_id" : 1 ,
"is_active" : false ,
"updated_at" : "2024-01-15T10:30:00Z"
}