Customers
The Customer object represents a customer record in your Custom Trades CRM account.
Endpoints
The Customer object
Attributes
uuidstringUnique identifier for the customer
first_namestringCustomer's first name
last_namestringCustomer's last name
company_namestring |nullCompany name (for commercial customers)
emailstring |nullEmail address
phonestring |nullPhone number (xxx-xxx-xxxx format)
customer_typestring'Residential' or 'Commercial'
is_vipbooleanWhether customer is marked as VIP
physical_address1string |nullPhysical address line 1
physical_address2string |nullPhysical address line 2
physical_citystring |nullPhysical city
physical_statestring |nullPhysical state
physical_zipstring |nullPhysical ZIP code
billing_address1string |nullBilling address line 1
billing_address2string |nullBilling address line 2
billing_citystring |nullBilling city
billing_statestring |nullBilling state
billing_zipstring |nullBilling ZIP code
primary_service_location_uuidUUID |nullPrimary service location UUID
notesstring |nullInternal notes
internal_flagsJSONB |nullInternal flags/metadata
on_my_way_notify_viastring |nullNotification preference ('email', 'sms', 'both')
created_atstringISO timestamp of creation
updated_atstringISO timestamp of last update
deleted_atstring |nullISO timestamp of soft deletion (null if not deleted)
THE CUSTOMER OBJECT
{ "uuid": "123e4567-e89b-12d3-a456-426614174000", "first_name": "John", "last_name": "Doe", "email": "john@example.com", "phone": "206-555-1234", "customer_type": "Residential", "is_vip": false}List customers
Returns a paginated list of customers for your company.
Parameters
include_deleted(boolean, default: false)requiredInclude soft-deleted customers
filter(string)Filter by type: 'all', 'residential', 'commercial', 'vip'
search(string)Search term (searches name, email, phone, customer_id)
page(number, default: 1)requiredPage number
limit(number, default: 50, max: 100)requiredItems per page
success(boolean)Whether the request succeeded.
data(object)Object containing customers and pagination. See "The Customer object" table for attribute list.
data.customers(array)List of Customer objects. Each item has the same shape as the Customer object.
data.pagination(object)Pagination metadata.
data.pagination.page(number)Current page number.
data.pagination.limit(number)Items per page.
data.pagination.total(number)Total number of items.
data.pagination.total_pages(number)Total number of pages.
Returns
success(boolean)Whether the request succeeded.
data(object)Object containing customers and pagination. See "The Customer object" table for attribute list.
curl -G \ https://customtradescrm.com/api/v1/customers?filter=residential&search=john \ -H "Authorization: Bearer ctc_live_sk_test_1234567890abcdefghijklmnopqrstuvwxyz"Response
{ "success": true, "data": { "customers": [ { "uuid": "123e4567-e89b-12d3-a456-426614174000", "first_name": "John", "last_name": "Doe", "email": "john@example.com", "phone": "206-555-1234", "customer_type": "Residential", "is_vip": false } ], "pagination": { "page": 1, "limit": 50, "total": 1, "total_pages": 1 } }}Get a customer
Returns a specific customer by UUID. **Response attributes:** - `success` (boolean) - Whether the request succeeded. - `data` (object) - The Customer object. See "The Customer object" table for attribute list.
Returns
success(boolean)Whether the request succeeded.
data(object)The Customer object. See "The Customer object" table for attribute list.
curl -G \ https://customtradescrm.com/api/v1/customers/123e4567-e89b-12d3-a456-426614174000 \ -H "Authorization: Bearer ctc_live_sk_test_1234567890abcdefghijklmnopqrstuvwxyz"Response
{ "success": true, "data": { "uuid": "123e4567-e89b-12d3-a456-426614174000", "first_name": "John", "last_name": "Doe", "company_name": null, "email": "john@example.com", "phone": "206-555-1234", "customer_type": "Residential", "is_vip": false, "physical_address1": "123 Main St", "physical_address2": null, "physical_city": "Seattle", "physical_state": "WA", "physical_zip": "98101", "billing_address1": "123 Main St", "billing_address2": null, "billing_city": "Seattle", "billing_state": "WA", "billing_zip": "98101", "primary_service_location_uuid": null, "notes": null, "internal_flags": null, "on_my_way_notify_via": null, "created_at": "2024-01-15T10:30:00Z", "updated_at": "2024-01-15T10:30:00Z", "deleted_at": null }}Create a customer
Creates a new customer.
Parameters
first_name(string)requiredCustomer's first name
last_name(string)requiredCustomer's last name
company_name(string)Company name (for commercial customers)
email(string)Email address
phone(string)Phone number (xxx-xxx-xxxx format)
customer_type(string)'Residential' or 'Commercial' (default: 'Residential')
is_vip(string)boolean (default: false)
primary_service_location_uuid(string)UUID of primary service location
notes(string)Internal notes
internal_flags(string)JSONB object
on_my_way_notify_via(string)'email', 'sms', 'both', or null
Returns
success(boolean)Whether the request succeeded.
data(object)The created Customer object. See "The Customer object" table for attribute list.
curl -X POST \ https://customtradescrm.com/api/v1/customers \ -H "Authorization: Bearer ctc_live_sk_test_1234567890abcdefghijklmnopqrstuvwxyz" \ -H "Content-Type: application/json" \ --json '{ 'Response
{ "success": true, "data": { "uuid": "123e4567-e89b-12d3-a456-426614174000", "first_name": "John", "last_name": "Doe", "company_name": null, "email": "john@example.com", "phone": "206-555-1234", "customer_type": "Residential", "is_vip": false, "physical_address1": null, "physical_address2": null, "physical_city": null, "physical_state": null, "physical_zip": null, "billing_address1": "123 Main St", "billing_address2": null, "billing_city": "Seattle", "billing_state": "WA", "billing_zip": "98101", "primary_service_location_uuid": null, "notes": null, "internal_flags": null, "on_my_way_notify_via": null, "created_at": "2024-01-15T10:30:00Z", "updated_at": "2024-01-15T10:30:00Z", "deleted_at": null }}Update a customer
Updates a customer. All fields are optional (partial update). **Response attributes:** - `success` (boolean) - Whether the request succeeded. - `data` (object) - The updated Customer object. See "The Customer object" table for attribute list.
Returns
success(boolean)Whether the request succeeded.
data(object)The updated Customer object. See "The Customer object" table for attribute list.
curl -X PUT \ https://customtradescrm.com/api/v1/customers/123e4567-e89b-12d3-a456-426614174000 \ -H "Authorization: Bearer ctc_live_sk_test_1234567890abcdefghijklmnopqrstuvwxyz" \ -H "Content-Type: application/json" \ --json '{ 'Response
{ "success": true, "data": { "uuid": "123e4567-e89b-12d3-a456-426614174000", "first_name": "John", "last_name": "Doe", "company_name": null, "email": "newemail@example.com", "phone": "206-555-1234", "customer_type": "Residential", "is_vip": true, "physical_address1": "123 Main St", "physical_address2": null, "physical_city": "Seattle", "physical_state": "WA", "physical_zip": "98101", "billing_address1": "123 Main St", "billing_address2": null, "billing_city": "Seattle", "billing_state": "WA", "billing_zip": "98101", "primary_service_location_uuid": null, "notes": null, "internal_flags": null, "on_my_way_notify_via": null, "created_at": "2024-01-15T10:30:00Z", "updated_at": "2024-01-16T14:20:00Z", "deleted_at": null }}Delete a customer
Soft deletes a customer (sets `deleted_at` timestamp). **Response attributes:** - `success` (boolean) - Whether the request succeeded. - `data` (object) - Confirmation payload. - `data.message` (string) - Success message.
Returns
success(boolean)Whether the request succeeded.
data(object)Confirmation payload.
curl -X DELETE \ https://customtradescrm.com/api/v1/customers/123e4567-e89b-12d3-a456-426614174000 \ -H "Authorization: Bearer ctc_live_sk_test_1234567890abcdefghijklmnopqrstuvwxyz"Response
{ "success": true, "data": { "message": "Customer deleted successfully" }}