# Update a location Partially update a location. Only provided fields will be updated. - Omitted fields: Not modified (current value preserved) - Provided fields: Updated to the new value - Null values: Clear the field (set to null) where applicable Endpoint: PATCH /locations/{id} Version: 1.0.0 Security: BearerAuth ## Path parameters: - `id` (string, required) Resource ID (UUID) or client key Example: "550e8400-e29b-41d4-a716-446655440000" ## Request fields (application/json): - `customerId` (string) Customer (shipper profile) this location belongs to Example: "550e8400-e29b-41d4-a716-446655440000" - `name` (string) Location name Example: "ABC Warehouse - Dallas" - `key` (string,null) Client-defined reference identifier Example: "ERP-LOC-DALLAS-01" - `type` (string) Type of location (SHIPPER, RECEIVER, or BOTH) Enum: "SHIPPER", "RECEIVER", "BOTH" - `isAppointmentRequired` (boolean) Whether appointments are required for this location Example: true - `notes` (string,null) External notes visible to carriers Example: "Call 24 hours ahead for appointment" - `internalNotes` (string,null) Internal notes (not visible to carriers) Example: "Use dock door 5 for expedited shipments" ## Response 200 fields (application/json): - `object` (string) Object type identifier Enum: "LOCATION" - `id` (string, required) Unique location identifier Example: "770e8400-e29b-41d4-a716-446655440000" - `customerId` (string, required) Customer (shipper profile) this location belongs to Example: "550e8400-e29b-41d4-a716-446655440000" - `customer` (object) The customer this location belongs to - `customer.id` (string, required) Unique customer identifier Example: "550e8400-e29b-41d4-a716-446655440000" - `customer.name` (string, required) Customer company name Example: "Acme Manufacturing Corp" - `customer.friendlyId` (string, required) Human-readable customer identifier, starts with "A" Example: "A123456" - `customer.status` (string, required) Customer account status (includes lead stages): - NEW: New lead, not yet contacted - CONTACTED: Initial contact made with lead - QUALIFIED: Lead has been qualified as potential customer - QUOTED: Quote has been provided to lead - NURTURING: Lead being nurtured for future opportunity - PENDING: Customer prospect pending activation - ACTIVE: Active customer account - INACTIVE: Deactivated customer account - BLOCKED: Customer account blocked from operations - CLOSED: Customer account permanently closed Enum: "NEW", "CONTACTED", "QUALIFIED", "QUOTED", "NURTURING", "PENDING", "ACTIVE", "INACTIVE", "BLOCKED", "CLOSED" - `customer.serviceTier` (any) Service tier level - `customer.website` (string,null) Customer website URL Example: "https://acme-manufacturing.com" - `customer.phoneNumber` (string,null) Primary phone number Example: "+1-555-123-4567" - `customer.industry` (any) Industry classification - `customer.annualRevenue` (any) Annual revenue range - `customer.annualSpend` (any) Annual freight spend estimate - `customer.spendType` (any) Customer spend type (contract vs spot pricing) - `customer.naics` (string,null) NAICS industry code Example: "336411" - `customer.ein` (string,null) Employer Identification Number Example: "12-3456789" - `customer.duns` (string,null) Dun & Bradstreet number Example: "123456789" - `customer.leadSource` (string,null) How this customer was acquired Example: "Referral" - `customer.dbaName` (string,null) Doing business as name Example: "Acme Corp DBA" - `customer.numberOfEmployees` (any) Company size by number of employees - `customer.externalId` (string,null) External system identifier Example: "EXT-12345" - `customer.currency` (any) Preferred currency for transactions - `customer.creditLimit` (number,null) Maximum credit allowed Example: 50000 - `customer.creditUsageWarning` (number,null) Credit usage warning threshold Example: 40000 - `customer.freeCreditReq` (number,null) Free credit requirement Example: 5000 - `customer.defaultMode` (any) Default transportation mode - `customer.defaultMargin` (number,null) Default margin percentage (0-1, e.g., 0.15 for 15%) Example: 0.15 - `customer.minMargin` (number,null) Minimum margin threshold Example: 0.1 - `customer.maxMargin` (number,null) Maximum margin threshold Example: 0.25 - `customer.defaultInternalNotes` (string,null) Default internal notes template Example: "Contact via email only" - `customer.defaultExternalNotes` (string,null) Default external notes template Example: "Please call 1 hour before delivery" - `customer.autoAcceptTender` (boolean,null) Auto-accept tender flag - `customer.group` (any) Customer group reference (minimal - id and key only) - `customer.paymentTerm` (any) Payment term configuration reference with full details - `customer.notes` (string,null) Internal notes about this customer Example: "Prefers email communication" - `customer.deactivationReason` (any) Reason for deactivation if status is INACTIVE - `customer.deactivationNotes` (string,null) Additional details about deactivation - `customer.deactivationDate` (string,null) When the customer was deactivated - `customer.closedAt` (string,null) When the customer account was closed - `customer.closedBy` (any) User who closed the account (full user details) - `customer.closedNotes` (string,null) Notes about account closure - `customer.corporateAddress` (any) Corporate headquarters address (nested location data) - `customer.billingAddress` (any) Billing address (nested location data) - `customer.qboCustomerId` (string,null) QuickBooks Online customer ID - `customer.key` (string,null) Client-defined reference identifier for this customer Example: "ERP-CUSTOMER-12345" - `customer.contacts` (array) Contacts for this customer - `customer.contacts.id` (string, required) Unique contact identifier Example: "550e8400-e29b-41d4-a716-446655440000" - `customer.contacts.key` (string,null) Client-defined reference identifier Example: "ERP-CONTACT-JOHN-001" - `customer.contacts.name` (string, required) Contact person's name Example: "John Smith" - `customer.contacts.contactInfo` (object, required) Contact information details (email, phone, title) - `customer.contacts.contactInfo.name` (string, required) Contact person's full name Example: "John Smith" - `customer.contacts.contactInfo.email` (string,null) Email address Example: "john.smith@example.com" - `customer.contacts.contactInfo.phoneNumber` (string,null) Phone number Example: "+1-555-0100" - `customer.contacts.contactInfo.title` (string,null) Job title or position Example: "Operations Manager" - `customer.contacts.phoneExtension` (string,null) Phone extension specific to this contact role Example: "1234" - `customer.contacts.isPrimary` (boolean, required) Whether this is the primary contact Example: true - `customer.contacts.contactTypes` (array,null) Types/roles this contact serves Enum: "ACCOUNT_MANAGER", "BILLING", "DOCK_SHIPPING", "EMERGENCY", "LOCATION_MANAGER", "OWNER", "PROCUREMENT", "PURCHASING", "RATES_PRICING", "RECEIVING", "SHIPPING" - `customer.contacts.notifications` (array,null) Shipment notification types Enum: "SHIPMENT_DELIVERED", "SHIPMENT_IN_TRANSIT", "SHIPMENT_LOADING", "SHIPMENT_OUT_FOR_DELIVERY", "SHIPMENT_PICKED_UP", "SHIPMENT_TENDER_REJECTED", "SHIPMENT_UNLOADING" - `customer.contacts.invitedUser` (any) User account invited/created for this contact - `customer.contacts.deletedBy` (any) User who deleted this contact - `customer.contacts.createdAt` (string, required) When the contact was created Example: "2025-01-15T10:00:00Z" - `customer.contacts.deletedAt` (string,null) When the contact was soft deleted - `customer.createdAt` (string, required) Timestamp when customer was created Example: "2025-01-15T10:00:00Z" - `customer.updatedAt` (string, required) Timestamp when customer was last updated Example: "2025-01-15T14:30:00Z" - `customer.deletedAt` (string,null) Timestamp when customer was soft-deleted (null if active) - `customer.deletedBy` (any) User who deleted the customer (full user details) - `name` (string, required) Location name Example: "ABC Warehouse - Dallas" - `key` (string,null) Client-defined reference identifier for this location Example: "ERP-LOC-DALLAS-01" - `type` (string) Type of location (SHIPPER, RECEIVER, or BOTH) Enum: "SHIPPER", "RECEIVER", "BOTH" - `isAppointmentRequired` (boolean, required) Whether appointments are required for this location Example: true - `notes` (string,null) External notes visible to carriers Example: "Call 24 hours ahead for appointment" - `internalNotes` (string,null) Internal notes (not visible to carriers) Example: "Use dock door 5 for expedited shipments" - `contacts` (array) Contacts for this location - `contacts.id` (string, required) Unique location contact identifier Example: "880e8400-e29b-41d4-a716-446655440000" - `contacts.customerContactId` (string, required) Customer contact linked to this location Example: "660e8400-e29b-41d4-a716-446655440000" - `contacts.customerContact` (object) The customer contact details - `contacts.customerContact.customer` (object, required) Customer this contact belongs to (full customer details) - `contacts.customerContact.customer.id` (string, required) Customer UUID Example: "550e8400-e29b-41d4-a716-446655440000" - `contacts.customerContact.customer.key` (string,null) Client-defined reference ID if set Example: "ERP-CUSTOMER-ACME" - `contacts.customerContact.customer.friendlyId` (string, required) Human-readable customer identifier Example: "A123456" - `contacts.customerContact.customer.status` (string, required) Customer status Enum: "PROSPECT", "ACTIVE", "INACTIVE", "CHURNED" - `contacts.customerContact.customer.createdAt` (string, required) When the customer was created Example: "2025-01-15T10:00:00Z" - `contacts.customerContact.customer.updatedAt` (string, required) When the customer was last updated Example: "2025-01-15T14:30:00Z" - `contacts.customerContact.customer.deletedAt` (string,null) When the customer was soft deleted (null if active) - `contacts.customerContact.name` (string, required) Contact person's name (denormalized from ContactInfo for convenience) Example: "John Smith" - `contacts.customerContact.contactInfo` (object, required) Contact information details (email, phone, title) - nested from parent Contact record - `contacts.customerContact.isPrimary` (boolean, required) Whether this is the primary contact for the customer Example: true - `contacts.customerContact.notifications` (array,null) Shipment notification types to send to this contact Enum: "SHIPMENT_DELIVERED", "SHIPMENT_IN_TRANSIT", "SHIPMENT_LOADING", "SHIPMENT_OUT_FOR_DELIVERY", "SHIPMENT_PICKED_UP", "SHIPMENT_TENDER_REJECTED", "SHIPMENT_UNLOADING" - `contacts.customerContact.invitedUser` (any) User account invited/created for this contact (full user details) - `contacts.customerContact.deletedBy` (any) User who deleted this contact (full user details) - `contacts.customerContact.deletedAt` (string,null) When the contact was soft deleted (null if active) - `contacts.isPrimary` (boolean, required) Whether this is the primary contact for the location Example: true - `contacts.contactTypes` (array) Roles/types for this location contact Enum: "ACCOUNT_MANAGER", "BILLING", "DOCK_SHIPPING", "EMERGENCY", "LOCATION_MANAGER", "OWNER", "PROCUREMENT", "PURCHASING", "RATES_PRICING", "RECEIVING", "SHIPPING" - `contacts.key` (string,null) Client-defined reference identifier for this location contact Example: "ERP-LOC-CONTACT-001" - `contacts.createdAt` (string, required) Timestamp when location contact was created Example: "2025-01-15T10:00:00Z" - `contacts.updatedAt` (string, required) Timestamp when location contact was last updated Example: "2025-01-15T14:30:00Z" - `contacts.deletedAt` (string,null) Timestamp when location contact was soft-deleted (null if active) - `createdAt` (string, required) Timestamp when location was created Example: "2025-01-15T10:00:00Z" - `updatedAt` (string, required) Timestamp when location was last updated Example: "2025-01-15T14:30:00Z" - `deletedAt` (string,null) Timestamp when location was soft-deleted (null if active) ## Response 400 fields (application/json): - `error` (string, required) Error code - `message` (string, required) Human-readable error message ## Response 401 fields (application/json): - `error` (string, required) Error code - `message` (string, required) Human-readable error message ## Response 404 fields (application/json): - `error` (string, required) Error code - `message` (string, required) Human-readable error message ## Response 409 fields (application/json): - `error` (string, required) Error code - `message` (string, required) Human-readable error message ## Response 500 fields (application/json): - `error` (string, required) Error code - `message` (string, required) Human-readable error message