Augmenting Integrations Lead Momentum Tools
LeadmoApiV1 Class
The LeadmoApiV1 class is a Python client designed to facilitate interactions with the Lead Momentum API. This client provides an easy-to-use interface for managing contacts and appointments within the Lead Momentum platform. It abstracts away the complexities of making HTTP requests and handling authentication, allowing developers to focus on their application's core functionality.
Capabilities
The LeadmoApiV1 class offers the following capabilities:
Contact Management
- Create Contact: Add a new contact to your Lead Momentum account.
- Lookup Contact: Retrieve contact details using contact identifiers.
- Update Contact: Modify existing contact information, such as address and phone number.
- Delete Contact: Remove a contact from your account.
- Get Contact by ID: Fetch detailed information about a contact using their unique identifier.
Appointment Management
- Get Available Appointment Slots: Retrieve available time slots for scheduling appointments.
- Create Appointment: Schedule a new appointment using available slots.
- Get Appointment by ID: Retrieve detailed information about a specific appointment.
- Update Appointment: Change the details of an existing appointment.
- Update Appointment Status: Modify the status of an appointment (e.g., confirmed, canceled).
- Delete Appointment: Cancel and remove an appointment from the schedule.
Usage
Initialization
To use the LeadmoApiV1 client, instantiate it with your API key:
from augint_tools.leadmo_api.v1.client import LeadmoApiV1
# Initialize the client
api_key = "your_api_key_here"
leadmo = LeadmoApiV1(api_key=api_key)
Alternatively, you can set the API key as an environment variable and initialize the client without passing the key explicitly:
from augint_tools.leadmo_api.v1.client import LeadmoApiV1
os.environ["LEADMO_BEARER_TOKEN"] = "your_api_key_here"
# Initialize the client
leadmo = LeadmoApiV1()
Examples
Creating a Contact
# Define contact details
contact_data = {
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
"phone": "+1234567890"
}
# Create the contact
response = leadmo.create_contact(**contact_data)
print(response)
Scheduling an Appointment
# Get available appointment slots
slots_response = leadmo.get_available_appointment_slots(calendar_id="your_calendar_id", timezone="US/Pacific")
next_slot = list(slots_response.values())[0]["slots"][0]
# Create an appointment
appointment_response = leadmo.create_appointment(
phone=contact_data.get("phone"),
calendar_id="your_calendar_id",
selected_slot=next_slot,
selected_timezone="US/Pacific"
)
print(appointment_response)
Updating Contact Information
# Update the contact's address
update_response = leadmo.update_contact(contact_id=contact_id, address1="1234 Main St.")
print(update_response)
Deleting an Appointment
# Delete the appointment
leadmo.delete_appointment(appointment_id=appointment_id)
Conclusion
The LeadmoApiV1 class streamlines the process of integrating with the Lead Momentum API, providing a simple and efficient way to manage contacts and appointments programmatically. By utilizing this client, developers can focus on building robust applications while leveraging the powerful features offered by the Lead Momentum platform.
examples as needed for your project's documentation!
Metadata
Release files for augint-leadmo 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| augint_leadmo-1.0.0.tar.gz | 17.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| augint_leadmo-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 36.8 kB
Release files / augint_leadmo-1.0.0.tar.gz
| Download URL | augint_leadmo-1.0.0.tar.gz |
|---|---|
| Size | 17.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ba63e6e16c7d4515f32ce7a7715978a310fe8beb97d86b1c91d582cfaabf680f
|
|
BLAKE2b-256 checksum How to use checksums |
89045aae22d141a26ceaf1a5ffa21bd562d763a90b6225ccedbbd3d9d51ee85e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.1 CPython/3.10.16 Linux/6.8.0-1021-azure
|
Release files / augint_leadmo-1.0.0-py3-none-any.whl
| Download URL | augint_leadmo-1.0.0-py3-none-any.whl |
|---|---|
| Size | 19.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d5be942e3bb6b067ebfad254bfa26808773e83564e6a91a0a0a828f712d339c5
|
|
BLAKE2b-256 checksum How to use checksums |
cf6abda28baa47c3202ed876fca392e92b828cb1953f193c123d770ba1cbb256
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.1 CPython/3.10.16 Linux/6.8.0-1021-azure
|