Business - Leads
Add a lead to the database
Endpoint
POST /api/v1/leads
Parameters
Name | Description |
---|---|
contact_form_id | Contact Form |
first_name | First Name |
last_name | Last Name |
company_name | Company Name |
email required | Email Address |
phone | Phone |
subject | Subject |
message | Message |
event_date | Event Date |
event_time | Event Time |
event_length | Event Length |
venue_name | Venue Name |
venue_street | Venue Street |
venue_city | Venue City |
venue_state | Venue State |
venue_zip | Venue Zip |
lead_source | Lead Source |
estimated_budget | Estimated Budget |
estimated_number_guests | Estimated Number of Guests |
event_type | Event Type |
package_id | Package ID |
employee_id | Staff ID |
contact_preference | Contact Preference |
notes | Notes |
Request
Route
POST /api/v1/leads
Headers
Accept: application/json
Content-Type: application/json
App-Id: 382079ee-fdf5-4673-b10a-c522a6d1ac20
App-Secret: U0Pr2zlwV5RXnJPhqzaK8JFzGRjbVlPlVEccRHIB
Franchise-Id: 249
Body
{
"first_name": "John",
"last_name": "Smith",
"email": "jsmith@gmail.com",
"subject": "POST /api/v1/leads",
"lead_source": "Test",
"employee_id": 34,
"contact_preference": "Phone"
}
Response
Simulated Response
Status
200
Headers
Content-Type: application/json; charset=utf-8
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: fc2cf581-e058-455b-8fb4-831df57d633f
Content-Length: 1537
Body
{
"meta": {
"status": "ok"
},
"data": {
"id": "25",
"type": "lead",
"attributes": {
"id": 25,
"email": "jsmith@gmail.com",
"first_name": "John",
"last_name": "Smith",
"company_name": null,
"phone": null,
"event_date": null,
"event_time": null,
"venue_name": null,
"venue_address": null,
"venue_city": null,
"venue_state": null,
"venue_zip": null,
"venue_map_url": "https://www.google.com/maps/search/",
"venue_latitude": null,
"venue_longitude": null,
"venue_google_place_id": null,
"estimated_budget": null,
"estimated_number_guests": null,
"subject": "POST /api/v1/leads",
"message": null,
"source": "Test",
"notes": "Subject: POST /api/v1/leads\n",
"lead_event_type": null,
"lead_type": null,
"last_contact_at": null,
"times_contacted": 0,
"origin": "Template Club",
"length_in_hours": null,
"length_in_minutes": null,
"indoor_outdoor": null,
"starts_at": null,
"ends_at": null,
"title": "John Smith",
"setup_at": null,
"pickup_at": null,
"dropoff_at": null,
"brand_id": 309,
"brand_name": "Stanton, Murray and Aufderhar 118",
"created_at": "2023-10-27T17:37:03.582-07:00",
"token": "RE9-THZZ-MZH",
"spam": false,
"archived": false,
"converted_to_event": false,
"length_in_days": null,
"event_type_id": null,
"utm_source": null,
"utm_campaign": null,
"utm_medium": null,
"utm_term": null,
"utm_content": null,
"gclid": null,
"package_name": null,
"package_group_name": null,
"service_name": null,
"length": null,
"formatted_time_range": "",
"formatted_date_range": "",
"formatted_datetime_range": "",
"custom_fields": [
],
"created_at_description": "Created less than a minute ago",
"referred_by_user_id": null,
"referred_by_user_name": null,
"referred_by_user_email": null
}
}
}
Request
Route
POST /api/v1/leads
Headers
Accept: application/json
Content-Type: application/json
App-Id: 382079ee-fdf5-4673-b10a-c522a6d1ac20
App-Secret: U0Pr2zlwV5RXnJPhqzaK8JFzGRjbVlPlVEccRHIB
Franchise-Id: 249
Body
{
"first_name": "John",
"last_name": "Smith",
"email": "jsmith@gmail.com",
"subject": "POST /api/v1/leads",
"lead_source": "Test",
"employee_id": 34,
"contact_preference": "Phone"
}
Response
Simulated Response
Status
200
Headers
Content-Type: application/json; charset=utf-8
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: e10f451d-976d-42a8-bc8f-a79687b2f794
Content-Length: 1537
Body
{
"meta": {
"status": "ok"
},
"data": {
"id": "26",
"type": "lead",
"attributes": {
"id": 26,
"email": "jsmith@gmail.com",
"first_name": "John",
"last_name": "Smith",
"company_name": null,
"phone": null,
"event_date": null,
"event_time": null,
"venue_name": null,
"venue_address": null,
"venue_city": null,
"venue_state": null,
"venue_zip": null,
"venue_map_url": "https://www.google.com/maps/search/",
"venue_latitude": null,
"venue_longitude": null,
"venue_google_place_id": null,
"estimated_budget": null,
"estimated_number_guests": null,
"subject": "POST /api/v1/leads",
"message": null,
"source": "Test",
"notes": "Subject: POST /api/v1/leads\n",
"lead_event_type": null,
"lead_type": null,
"last_contact_at": null,
"times_contacted": 0,
"origin": "Template Club",
"length_in_hours": null,
"length_in_minutes": null,
"indoor_outdoor": null,
"starts_at": null,
"ends_at": null,
"title": "John Smith",
"setup_at": null,
"pickup_at": null,
"dropoff_at": null,
"brand_id": 309,
"brand_name": "Stanton, Murray and Aufderhar 118",
"created_at": "2023-10-27T17:37:03.608-07:00",
"token": "HV4-TDYN-7AW",
"spam": false,
"archived": false,
"converted_to_event": false,
"length_in_days": null,
"event_type_id": null,
"utm_source": null,
"utm_campaign": null,
"utm_medium": null,
"utm_term": null,
"utm_content": null,
"gclid": null,
"package_name": null,
"package_group_name": null,
"service_name": null,
"length": null,
"formatted_time_range": "",
"formatted_date_range": "",
"formatted_datetime_range": "",
"custom_fields": [
],
"created_at_description": "Created less than a minute ago",
"referred_by_user_id": null,
"referred_by_user_name": null,
"referred_by_user_email": null
}
}
}