v1

latestOpenAPI 3.0.1Apache 2.02026-07-2473111182.6 KB
Lead

Update an existing lead

Updates an existing lead. Only the fields provided in the request body are changed.

put/api/business/{businessId}/branch/{branchId}/leads/{leadId}

Path parameters

businessIdstring required
branchIdstring required
leadIdinteger required

Request body

mobilestring

Mobile phone number of the lead

emailstring

Email address of the lead

firstNamestring

First name of the lead

lastNamestring

Last name of the lead

contactableByEmailboolean

Whether the lead can be contacted by email

contactableByMobileboolean

Whether the lead can be contacted by mobile

status'NEW_LEAD' | 'CONTACT_ATTEMPTED' | 'CONTACT_MADE' | 'INTERESTED' | 'APPOINTMENT_SCHEDULED' | 'CONVERTED' | 'LOST' | 'DELETED'

Status to set on the lead

smsMarketingOptOutboolean

Whether the lead has opted out of SMS marketing

emailMarketingOptOutboolean

Whether the lead has opted out of email marketing

clientIdstring

ID of the client matched to this lead

Example request

{
  "mobile": "1234567890",
  "email": "john.doe@example.com",
  "firstName": "John",
  "lastName": "Doe",
  "contactableByEmail": true,
  "contactableByMobile": true,
  "clientId": "client789"
}

Response

Lead updated successfully

leadIdinteger

Unique identifier for the lead

businessIdstring

Unique identifier for the business

branchIdstring

Unique identifier for the branch

mobilestring

Mobile phone number of the lead

emailstring

Email address of the lead

firstNamestring

First name of the lead

lastNamestring

Last name of the lead

contactableByEmailboolean

Whether the lead can be contacted by email

contactableByMobileboolean

Whether the lead can be contacted by mobile

status'NEW_LEAD' | 'CONTACT_ATTEMPTED' | 'CONTACT_MADE' | 'INTERESTED' | 'APPOINTMENT_SCHEDULED' | 'CONVERTED' | 'LOST' | 'DELETED'

Current status of the lead

sourcestring

Source where the lead originated from

lastActivityDatestring date-time

Date and time of the last activity on this lead

smsMarketingOptOutboolean

Whether the lead has opted out of SMS marketing

emailMarketingOptOutboolean

Whether the lead has opted out of email marketing

clientIdstring

Client ID if the lead has been converted to a client

updatedBystring

ID of the user who last updated the lead

updateAction'MANUAL_UPDATE' | 'APPOINTMENT_CONVERTED' | 'APPOINTMENT_CANCELLED' | 'APPOINTMENT_CANCELLED_OR_DELETED' | 'APPOINTMENT_DELETED' | 'APPOINTMENT_BOOKED' | 'CLIENT_MATCHED_BY_MOBILE' | 'CLIENT_MATCHED_BY_EMAIL' | 'EXISTING_CLIENT' | 'MARKETING_CONSENT' | 'ONE_CLICK_UNSUBSCRIBE' | 'SUBMITTED_FORM'

Action that triggered the last update to the lead

adCampaignNamestring

Name of the advertising campaign that generated this lead

notestring

Additional notes about the lead

Example response

{
  "leadId": 12345,
  "businessId": "business123",
  "branchId": "branch456",
  "mobile": "1234567890",
  "email": "john.doe@example.com",
  "firstName": "John",
  "lastName": "Doe",
  "contactableByEmail": true,
  "contactableByMobile": true,
  "source": "THIRD_PARTY_API",
  "lastActivityDate": "2024-01-15T10:30:00Z",
  "clientId": "client789",
  "updatedBy": "user123",
  "adCampaignName": "Summer Sale Campaign",
  "messageHistory": [
    {
      "type": "EMAIL",
      "sendDate": "2024-01-15T10:30:00Z",
      "channel": "email"
    }
  ],
  "note": "Interested in hair styling services"
}