> For the complete documentation index, see [llms.txt](https://docs.hos.accessacloud.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hos.accessacloud.com/atreemo-api/api-reference/atreemo-api-reference/sales-leads.md).

# Sales Leads

Api Methods for SalesLeads

## AssignLead

> The AssignLead.

```json
{"openapi":"3.0.3","info":{"title":"Atreemo API","version":"0.1.0"},"tags":[{"name":"SalesLeads","description":"Api Methods for SalesLeads"}],"servers":[{"url":"https://apim-hospitality-dev-uksouth.azure-api.net/atreemo-api","description":"Local DEV APIM import draft only; not a deployed endpoint announcement."}],"security":[{"AtreemoBearer":[]}],"components":{"securitySchemes":{"AtreemoBearer":{"type":"http","scheme":"bearer","description":"Atreemo access token obtained by the caller from the Atreemo instance `POST /token` endpoint (OAuth2 password grant) and sent as `Authorization: Bearer <token>`. See the Authorisation guide."}},"schemas":{"AssignLeadInput":{"type":"object","nullable":true,"properties":{"LeadID":{"type":"integer","format":"int32"},"AssignedTo":{"type":"integer","format":"int32"},"Assignedby":{"type":"integer","format":"int32"},"LocationID":{"type":"integer","format":"int32"},"CategoryID":{"type":"integer","format":"int32","nullable":true},"SubCategoryID":{"type":"integer","format":"int32","nullable":true},"SourceID":{"type":"integer","format":"int32"},"AssignToLocation":{"type":"boolean"}},"description":"Source-backed JSON members, including inheritance and JSON naming/ignore attributes. No property is required solely because its CLR value type is non-nullable. Runtime and deployment alignment are unverified."},"PostSLPOutput":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"},"description":"List of errors if exist"},"ProjectID":{"type":"integer","format":"int32","description":"ID of the new project"},"response":{"type":"boolean","description":"Status of the call"}}}}},"paths":{"/api/SalesLeads/AssignLead":{"post":{"operationId":"SalesLeadsAssignLead","summary":"AssignLead","tags":["SalesLeads"],"description":"The AssignLead.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignLeadInput"}}}},"responses":{"200":{"description":"OK (sample status in the public collection).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostSLPOutput"}}}}}}}}}
```

## GetAllCategories

> The GetAllCategories.

```json
{"openapi":"3.0.3","info":{"title":"Atreemo API","version":"0.1.0"},"tags":[{"name":"SalesLeads","description":"Api Methods for SalesLeads"}],"servers":[{"url":"https://apim-hospitality-dev-uksouth.azure-api.net/atreemo-api","description":"Local DEV APIM import draft only; not a deployed endpoint announcement."}],"security":[{"AtreemoBearer":[]}],"components":{"securitySchemes":{"AtreemoBearer":{"type":"http","scheme":"bearer","description":"Atreemo access token obtained by the caller from the Atreemo instance `POST /token` endpoint (OAuth2 password grant) and sent as `Authorization: Bearer <token>`. See the Authorisation guide."}},"schemas":{"GetAllCategoriesOutput":{"type":"object","properties":{"Categories":{"type":"array","items":{"$ref":"#/components/schemas/Lead_Category"},"description":"List of categories"},"Errors":{"type":"array","items":{"type":"string"},"description":"List of errors if exist"},"Response":{"type":"boolean","description":"Status of the call"}}},"Lead_Category":{"type":"object","nullable":true,"properties":{"CategoryID":{"type":"integer","format":"int32"},"Name":{"type":"string","nullable":true},"Description":{"type":"string","nullable":true},"CreatedBy":{"type":"integer","format":"int32"},"URD":{"type":"string","format":"date-time"},"LastModifiedBy":{"type":"integer","format":"int32","nullable":true},"LastModifiedOn":{"type":"string","format":"date-time"},"Deleted":{"type":"boolean"},"CreatedUser":{"type":"string","nullable":true},"ModificationUser":{"type":"string","nullable":true},"DisplayForSurveys":{"type":"boolean"},"DisplayForFeedback":{"type":"boolean"},"DisplayForSLP":{"type":"boolean"},"DisplayForTracker":{"type":"boolean"},"CategoryBrandID":{"type":"integer","format":"int32","nullable":true},"BrandIDFromConnectedUser":{"type":"integer","format":"int32","nullable":true},"DefaultTemplate":{"type":"integer","format":"int32","nullable":true},"SenderVenue":{"type":"integer","format":"int32"},"BrandName":{"type":"string","nullable":true},"IsShowDeleted":{"type":"boolean","readOnly":true}},"description":"Source-backed JSON members, including inheritance and JSON naming/ignore attributes. No property is required solely because its CLR value type is non-nullable. Runtime and deployment alignment are unverified."}}},"paths":{"/api/SalesLeads/GetAllCategories":{"get":{"operationId":"SalesLeadsGetAllCategories","summary":"GetAllCategories","tags":["SalesLeads"],"description":"The GetAllCategories.","responses":{"200":{"description":"OK (sample status in the public collection).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetAllCategoriesOutput"}}}}}}}}}
```

## GetAllSources

> The GetAllSources.

```json
{"openapi":"3.0.3","info":{"title":"Atreemo API","version":"0.1.0"},"tags":[{"name":"SalesLeads","description":"Api Methods for SalesLeads"}],"servers":[{"url":"https://apim-hospitality-dev-uksouth.azure-api.net/atreemo-api","description":"Local DEV APIM import draft only; not a deployed endpoint announcement."}],"security":[{"AtreemoBearer":[]}],"components":{"securitySchemes":{"AtreemoBearer":{"type":"http","scheme":"bearer","description":"Atreemo access token obtained by the caller from the Atreemo instance `POST /token` endpoint (OAuth2 password grant) and sent as `Authorization: Bearer <token>`. See the Authorisation guide."}},"schemas":{"GetAllSourcesOutput":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"},"description":"List of errors if exist"},"response":{"type":"boolean","description":"Status of the call"},"Sources":{"type":"array","items":{"$ref":"#/components/schemas/SlpSource"},"description":"List of sources"}}},"SlpSource":{"type":"object","properties":{"SourceID":{"type":"integer","format":"int32","description":"Slp Status ID"},"SourceName":{"type":"string","description":"Slp Status Name"}}}}},"paths":{"/api/SalesLeads/GetAllSources":{"get":{"operationId":"SalesLeadsGetAllSources","summary":"GetAllSources","tags":["SalesLeads"],"description":"The GetAllSources.","responses":{"200":{"description":"OK (sample status in the public collection).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetAllSourcesOutput"}}}}}}}}}
```

## GetAllStatus

> The GetAllStatus.

```json
{"openapi":"3.0.3","info":{"title":"Atreemo API","version":"0.1.0"},"tags":[{"name":"SalesLeads","description":"Api Methods for SalesLeads"}],"servers":[{"url":"https://apim-hospitality-dev-uksouth.azure-api.net/atreemo-api","description":"Local DEV APIM import draft only; not a deployed endpoint announcement."}],"security":[{"AtreemoBearer":[]}],"components":{"securitySchemes":{"AtreemoBearer":{"type":"http","scheme":"bearer","description":"Atreemo access token obtained by the caller from the Atreemo instance `POST /token` endpoint (OAuth2 password grant) and sent as `Authorization: Bearer <token>`. See the Authorisation guide."}},"schemas":{"GetAllLeadStatusOutput":{"type":"object","properties":{"Errors":{"type":"array","items":{"type":"string"},"description":"List of errors if exist"},"Response":{"type":"boolean","description":"Status of the call"},"Status":{"type":"array","items":{"$ref":"#/components/schemas/Lead_Status"},"description":"List of Status"}}},"Lead_Status":{"type":"object","nullable":true,"properties":{"StatusID":{"type":"integer","format":"int32"},"PriorityID":{"type":"integer","format":"int32"},"StatusDesc":{"type":"string","nullable":true},"StatusColor":{"type":"string","nullable":true},"IsAppointment":{"type":"boolean"},"IsSale":{"type":"boolean"},"IsFollowUp":{"type":"boolean"},"IsFinalStatus":{"type":"boolean"},"EnablePriority":{"type":"boolean"},"ShowDeleted":{"type":"boolean"},"StatusTemplate":{"type":"string","nullable":true,"readOnly":true},"PipelineStageID":{"type":"integer","format":"int32"},"PipelineGroupID":{"type":"integer","format":"int32"},"DispayInFilters":{"type":"boolean"},"BrandID":{"type":"integer","format":"int32","nullable":true}},"description":"Source-backed JSON members, including inheritance and JSON naming/ignore attributes. No property is required solely because its CLR value type is non-nullable. Runtime and deployment alignment are unverified."}}},"paths":{"/api/SalesLeads/GetAllStatus":{"get":{"operationId":"SalesLeadsGetAllStatus","summary":"GetAllStatus","tags":["SalesLeads"],"description":"The GetAllStatus.","responses":{"200":{"description":"OK (sample status in the public collection).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetAllLeadStatusOutput"}}}}}}}}}
```

## GetLeads

> Searches leads using FilterInput and the authenticated user, passing PageSize and Offset to the database lookup. PageSize must be positive. The action returns Leads\_Output with \_Leads, Remaining, Response and Errors, not the similarly named LeadsByCtcID\_Output annotation. Remaining is computed from the returned TotalCounts and PageSize; its relationship to Offset depends on the procedure and needs runtime confirmation.

```json
{"openapi":"3.0.3","info":{"title":"Atreemo API","version":"0.1.0"},"tags":[{"name":"SalesLeads","description":"Api Methods for SalesLeads"}],"servers":[{"url":"https://apim-hospitality-dev-uksouth.azure-api.net/atreemo-api","description":"Local DEV APIM import draft only; not a deployed endpoint announcement."}],"security":[{"AtreemoBearer":[]}],"components":{"securitySchemes":{"AtreemoBearer":{"type":"http","scheme":"bearer","description":"Atreemo access token obtained by the caller from the Atreemo instance `POST /token` endpoint (OAuth2 password grant) and sent as `Authorization: Bearer <token>`. See the Authorisation guide."}},"schemas":{"FilterInput":{"type":"object","nullable":true,"properties":{"Source":{"type":"string","nullable":true},"SubSource":{"type":"string","nullable":true},"Categories":{"type":"string","nullable":true},"SubCategories":{"type":"string","nullable":true},"Status":{"type":"string","nullable":true},"BrandID":{"type":"integer","format":"int32","nullable":true},"CtcID":{"type":"integer","format":"int32"},"LeadID":{"type":"integer","format":"int32"},"PageSize":{"type":"integer","format":"int32"},"Offset":{"type":"integer","format":"int32"},"StartDate":{"type":"string","nullable":true},"EndDate":{"type":"string","nullable":true},"Locations":{"type":"string","nullable":true},"AppDate":{"type":"string","nullable":true},"FollowUpDate":{"type":"string","nullable":true}},"description":"Source-backed JSON members, including inheritance and JSON naming/ignore attributes. No property is required solely because its CLR value type is non-nullable. Runtime and deployment alignment are unverified."},"LeadsQueryOutput":{"type":"object","properties":{"Response":{"type":"boolean"},"Remaining":{"type":"boolean"},"_Leads":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/LeadQueryItem"}},"Errors":{"type":"array","nullable":true,"items":{"type":"string","nullable":true}}},"description":"Actual Leads_Output return shape used by SalesLeads/GetLeads; distinct from its LeadsByCtcID_Output response annotation."},"LeadQueryItem":{"type":"object","nullable":true,"properties":{"LeadID":{"type":"integer","format":"int32"},"FullName":{"type":"string","nullable":true},"PriorityDesc":{"type":"string","nullable":true},"StatusDesc":{"type":"string","nullable":true},"CtcID":{"type":"integer","format":"int32"},"Location":{"type":"string","nullable":true},"Region":{"type":"string","nullable":true},"CreateDate":{"type":"string","format":"date-time"},"Source":{"type":"string","nullable":true},"LeadSource":{"type":"string","nullable":true},"NameClaimedBy":{"type":"string","nullable":true},"CategoryName":{"type":"string","nullable":true},"IsWalkIn":{"type":"boolean"},"Revenue":{"type":"string","nullable":true},"SubCategoryName":{"type":"string","nullable":true},"SubSourceName":{"type":"string","nullable":true},"BrandName":{"type":"string","nullable":true},"TotalPrice":{"type":"number","format":"float"},"IsClaimed":{"type":"boolean"},"FollowUpDate":{"type":"string","format":"date-time"},"AppointmentDate":{"type":"string","format":"date-time"},"TotalCounts":{"type":"integer","format":"int32"}}}}},"paths":{"/api/SalesLeads/GetLeads":{"post":{"operationId":"SalesLeadsGetLeads","summary":"GetLeads","tags":["SalesLeads"],"description":"Searches leads using FilterInput and the authenticated user, passing PageSize and Offset to the database lookup. PageSize must be positive. The action returns Leads_Output with _Leads, Remaining, Response and Errors, not the similarly named LeadsByCtcID_Output annotation. Remaining is computed from the returned TotalCounts and PageSize; its relationship to Offset depends on the procedure and needs runtime confirmation.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilterInput"}}}},"responses":{"200":{"description":"Source returns Leads_Output, despite the LeadsByCtcID_Output annotation. Runtime alignment remains unverified.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadsQueryOutput"}}}}}}}}}
```

## GetLeadsByCtcID

> The GetLeadsByCtcID.

```json
{"openapi":"3.0.3","info":{"title":"Atreemo API","version":"0.1.0"},"tags":[{"name":"SalesLeads","description":"Api Methods for SalesLeads"}],"servers":[{"url":"https://apim-hospitality-dev-uksouth.azure-api.net/atreemo-api","description":"Local DEV APIM import draft only; not a deployed endpoint announcement."}],"security":[{"AtreemoBearer":[]}],"components":{"securitySchemes":{"AtreemoBearer":{"type":"http","scheme":"bearer","description":"Atreemo access token obtained by the caller from the Atreemo instance `POST /token` endpoint (OAuth2 password grant) and sent as `Authorization: Bearer <token>`. See the Authorisation guide."}},"schemas":{"LeadsByCtcID_Output":{"type":"object","properties":{"Errors":{"type":"array","items":{"type":"string"},"description":"List of errors if exist"},"Leads":{"type":"array","items":{"$ref":"#/components/schemas/Lead_Grid"},"description":"List of leads"},"Response":{"type":"boolean","description":"Status of the call"}}},"Lead_Grid":{"type":"object","nullable":true,"properties":{"LeadID":{"type":"integer","format":"int32"},"SourceID":{"type":"integer","format":"int32","nullable":true},"FullName":{"type":"string","nullable":true},"AppDate":{"type":"string","format":"date-time","nullable":true},"PriorityDesc":{"type":"string","nullable":true},"PriorityColor":{"type":"string","nullable":true},"AppID":{"type":"integer","format":"int32","nullable":true},"PriorityTemplate":{"type":"string","nullable":true,"readOnly":true},"MasterTemplate":{"type":"string","nullable":true,"readOnly":true},"StatusID":{"type":"integer","format":"int32"},"StatusDesc":{"type":"string","nullable":true},"StatusColor":{"type":"string","nullable":true},"StatusTemplate":{"type":"string","nullable":true,"readOnly":true},"StartSessionDate":{"type":"string","format":"date-time","nullable":true},"ConversationStatusID":{"type":"integer","format":"int32"},"ConversationStatusDesc":{"type":"string","nullable":true},"SessionRemainingTime":{"type":"string","nullable":true},"SessionTimeTemplate":{"type":"string","nullable":true,"readOnly":true},"SessionTemplate":{"type":"string","nullable":true,"readOnly":true},"LocationID":{"type":"integer","format":"int32","nullable":true},"CpyID":{"type":"integer","format":"int32"},"CtcID":{"type":"integer","format":"int32"},"CtcUID":{"type":"string","nullable":true},"Location":{"type":"string","nullable":true},"CreateDate":{"type":"string","format":"date-time"},"FollowUpDate":{"type":"string","format":"date-time","nullable":true},"Source":{"type":"string","nullable":true},"LeadSource":{"type":"string","nullable":true},"IsClaimed":{"type":"boolean"},"ClaimedBy":{"type":"integer","format":"int32","nullable":true},"NameClaimedBy":{"type":"string","nullable":true},"CategoryName":{"type":"string","nullable":true},"CategoryID":{"type":"integer","format":"int32","nullable":true},"ContactMade":{"type":"boolean"},"IsWalkIn":{"type":"boolean"},"IsAppointmentShow":{"type":"boolean","nullable":true},"Revenue":{"type":"string","nullable":true},"SubCategoryID":{"type":"integer","format":"int32","nullable":true},"SubCategoryName":{"type":"string","nullable":true},"CorporateID":{"type":"integer","format":"int32","nullable":true},"CorporateName":{"type":"string","nullable":true},"SubSourceName":{"type":"string","nullable":true},"IsWalkInTemplate":{"type":"string","nullable":true,"readOnly":true},"IsContactMadeTemplate":{"type":"string","nullable":true,"readOnly":true},"IsAppointmentShowTemplate":{"type":"string","nullable":true,"readOnly":true},"IsFavoriteLead":{"type":"boolean"},"BrandName":{"type":"string","nullable":true},"BrandID":{"type":"integer","format":"int32","nullable":true},"TotalPrice":{"type":"number","format":"float"},"Region":{"type":"string","nullable":true},"HasComment":{"type":"boolean"},"BookingID":{"type":"string","nullable":true},"BookingStatus":{"type":"string","nullable":true},"VisitDate":{"type":"string","format":"date-time","nullable":true},"Covers":{"type":"integer","format":"int32","nullable":true},"IsMaster":{"type":"boolean","nullable":true},"AlertEvent":{"type":"boolean"},"FromSlave":{"type":"boolean","nullable":true},"HasBooking":{"type":"boolean"},"CountChild":{"type":"integer","format":"int32"},"IsFinalStatus":{"type":"boolean"},"Notes":{"type":"string","nullable":true},"LeadValue":{"type":"number","format":"double"},"IsMerged":{"type":"boolean"},"HasMasterBooking":{"type":"boolean"},"IsSynchronised":{"type":"boolean"},"OnboardingApplicationId":{"type":"string","nullable":true},"OnboardingApplicationStatus":{"type":"string","nullable":true},"OnboardingApplicationStage":{"type":"string","nullable":true}},"description":"Source-backed JSON members, including inheritance and JSON naming/ignore attributes. No property is required solely because its CLR value type is non-nullable. Runtime and deployment alignment are unverified."}}},"paths":{"/api/SalesLeads/GetLeadsByCtcID":{"get":{"operationId":"SalesLeadsGetLeadsByCtcId","summary":"GetLeadsByCtcID","tags":["SalesLeads"],"description":"The GetLeadsByCtcID.","parameters":[{"name":"CtcID","in":"query","schema":{"type":"integer","format":"int32"},"description":"Native query parameter. CLR int CtcID in the pinned controller signature.","required":true}],"responses":{"200":{"description":"OK (sample status in the public collection).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadsByCtcID_Output"}}}}}}}}}
```

## GetSubCategoriesByCategoryID

> The GetSubCategoriesByCategoryID.

```json
{"openapi":"3.0.3","info":{"title":"Atreemo API","version":"0.1.0"},"tags":[{"name":"SalesLeads","description":"Api Methods for SalesLeads"}],"servers":[{"url":"https://apim-hospitality-dev-uksouth.azure-api.net/atreemo-api","description":"Local DEV APIM import draft only; not a deployed endpoint announcement."}],"security":[{"AtreemoBearer":[]}],"components":{"securitySchemes":{"AtreemoBearer":{"type":"http","scheme":"bearer","description":"Atreemo access token obtained by the caller from the Atreemo instance `POST /token` endpoint (OAuth2 password grant) and sent as `Authorization: Bearer <token>`. See the Authorisation guide."}},"schemas":{"GetLeadSubCategoriesOutput":{"type":"object","properties":{"Errors":{"type":"array","items":{"type":"string"},"description":"List of errors if exist"},"Response":{"type":"boolean","description":"Status of the call"},"SubCategories":{"type":"array","items":{"$ref":"#/components/schemas/Lead_SubCategory"},"description":"List of sub categories"}}},"Lead_SubCategory":{"type":"object","nullable":true,"properties":{"SubCategoryID":{"type":"integer","format":"int32"},"Name":{"type":"string","nullable":true},"DisplayForSurveys":{"type":"boolean"},"DisplayForFeedback":{"type":"boolean"},"DisplayForSLP":{"type":"boolean"},"CategoryID":{"type":"integer","format":"int32"},"CategoryName":{"type":"string","nullable":true},"DisplayForTracker":{"type":"boolean"},"ParentDisplayForSurveys":{"type":"boolean"},"ParentDisplayForSLP":{"type":"boolean"},"ParentDisplayForTracker":{"type":"boolean"},"Deleted":{"type":"boolean"},"IsShowDeleted":{"type":"boolean","readOnly":true}},"description":"Source-backed JSON members, including inheritance and JSON naming/ignore attributes. No property is required solely because its CLR value type is non-nullable. Runtime and deployment alignment are unverified."}}},"paths":{"/api/SalesLeads/GetSubCategoriesByCategoryID":{"get":{"operationId":"SalesLeadsGetSubCategoriesByCategoryId","summary":"GetSubCategoriesByCategoryID","tags":["SalesLeads"],"description":"The GetSubCategoriesByCategoryID.","parameters":[{"name":"CategoryID","in":"query","schema":{"type":"integer","format":"int32"},"description":"Native query parameter. CLR int CategoryID in the pinned controller signature.","required":true}],"responses":{"200":{"description":"OK (sample status in the public collection).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetLeadSubCategoriesOutput"}}}}}}}}}
```

## Patch

> Applies provided lead fields to LeadID after loading the existing lead and checking status, priority, location/category and other effective values. The custom binder distinguishes omitted fields from provided values. The action can also link products, save audit information and arrange/send reminders; it is not a side-effect-free partial assignment. Inspect lowercase response and errors in PostSLPOutput.

```json
{"openapi":"3.0.3","info":{"title":"Atreemo API","version":"0.1.0"},"tags":[{"name":"SalesLeads","description":"Api Methods for SalesLeads"}],"servers":[{"url":"https://apim-hospitality-dev-uksouth.azure-api.net/atreemo-api","description":"Local DEV APIM import draft only; not a deployed endpoint announcement."}],"security":[{"AtreemoBearer":[]}],"components":{"securitySchemes":{"AtreemoBearer":{"type":"http","scheme":"bearer","description":"Atreemo access token obtained by the caller from the Atreemo instance `POST /token` endpoint (OAuth2 password grant) and sent as `Authorization: Bearer <token>`. See the Authorisation guide."}},"schemas":{"PatchLeadsInput":{"type":"object","nullable":true,"properties":{"LocationID":{"type":"integer","format":"int32","nullable":true},"SourceID":{"type":"integer","format":"int32","nullable":true},"StatusID":{"type":"integer","format":"int32","nullable":true},"PriorityID":{"type":"integer","format":"int32","nullable":true},"CategoryID":{"type":"integer","format":"int32","nullable":true},"SubCategoryID":{"type":"integer","format":"int32","nullable":true},"Notes":{"type":"string","nullable":true},"AppDate":{"type":"string","format":"date-time","nullable":true},"FollowUpDate":{"type":"string","format":"date-time","nullable":true},"EventDate":{"type":"string","format":"date-time","nullable":true},"EventEndDate":{"type":"string","format":"date-time","nullable":true},"ProvisionalEventDate":{"type":"string","format":"date-time","nullable":true},"ProvisionalEndDate":{"type":"string","format":"date-time","nullable":true},"PostSalescallDate":{"type":"string","format":"date-time","nullable":true},"ContactMade":{"type":"boolean","nullable":true},"ContactMadeDate":{"type":"string","format":"date-time","nullable":true},"ContactType":{"type":"integer","format":"int32","nullable":true},"IsWalkIn":{"type":"boolean","nullable":true},"MembershipType":{"type":"integer","format":"int32","nullable":true},"CorporateID":{"type":"integer","format":"int32","nullable":true},"FeedbackID":{"type":"integer","format":"int32","nullable":true},"IsAppReminder":{"type":"boolean","nullable":true},"AppReminderNote":{"type":"string","nullable":true},"IsFollowUpReminder":{"type":"boolean","nullable":true},"FollowUpReminderNote":{"type":"string","nullable":true},"IsAppointmentShow":{"type":"boolean","nullable":true},"POSRevenue":{"type":"string","nullable":true},"BrandID":{"type":"integer","format":"int32","nullable":true},"Covers":{"type":"integer","format":"int32","nullable":true},"VisitDate":{"type":"string","format":"date-time","nullable":true},"BookingTypeID":{"type":"string","nullable":true},"SubSourceID":{"type":"integer","format":"int32","nullable":true},"Budget":{"type":"string","nullable":true},"ExpectedRevenue":{"type":"string","nullable":true},"PipelineStageID":{"type":"integer","format":"int32","nullable":true},"BookingStatus":{"type":"string","nullable":true},"SurveyOpCode":{"type":"integer","format":"int32","nullable":true},"SurveyResponseID":{"type":"integer","format":"int32","nullable":true},"Products":{"type":"array","items":{"$ref":"#/components/schemas/ProductLeadProperties"},"nullable":true}},"description":"Source-backed JSON members, including inheritance and JSON naming/ignore attributes. No property is required solely because its CLR value type is non-nullable. Runtime and deployment alignment are unverified. Omit a field to leave it unchanged; provided-null handling is controlled by the custom patch binder. Internal *Provided flags are excluded from JSON."},"ProductLeadProperties":{"type":"object","nullable":true,"properties":{"ProductID":{"type":"integer","format":"int32"},"ID":{"type":"integer","format":"int32"},"LeadID":{"type":"integer","format":"int32"},"UnitPrice":{"type":"number","format":"float"},"Discount":{"type":"number","format":"float"},"Total":{"type":"number","format":"float"},"FullName":{"type":"string","nullable":true},"Description":{"type":"string","nullable":true},"Quantity":{"type":"integer","format":"int32","nullable":true},"QuantityEstimate":{"type":"integer","format":"int32"},"Estimate":{"type":"number","format":"float"},"GrossCost":{"type":"number","format":"float"},"TotalPrice":{"type":"number","format":"float"},"CtcID":{"type":"integer","format":"int32"},"URD":{"type":"string","format":"date-time"},"ModifiedBy":{"type":"string","nullable":true},"Picture":{"type":"string","nullable":true},"LongDescription":{"type":"string","nullable":true}},"description":"Property-name JSON contract used by PatchLeadsModelBinder JObject.ToObject, whose default Json.NET resolver ignores Serializable. This differs from the ordinary Web API formatter used by Post/Put."},"PostSLPOutput":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"},"description":"List of errors if exist"},"ProjectID":{"type":"integer","format":"int32","description":"ID of the new project"},"response":{"type":"boolean","description":"Status of the call"}}}}},"paths":{"/api/SalesLeads/Patch":{"patch":{"operationId":"SalesLeadsPatch","summary":"Patch","tags":["SalesLeads"],"description":"Applies provided lead fields to LeadID after loading the existing lead and checking status, priority, location/category and other effective values. The custom binder distinguishes omitted fields from provided values. The action can also link products, save audit information and arrange/send reminders; it is not a side-effect-free partial assignment. Inspect lowercase response and errors in PostSLPOutput.","parameters":[{"name":"LeadID","in":"query","schema":{"type":"integer","format":"int32"},"description":"Native query parameter. CLR int LeadID in the pinned controller signature.","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchLeadsInput"}}}},"responses":{"200":{"description":"OK (sample status in the public collection).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostSLPOutput"}}}}}}}}}
```

## Post

> The Post.

```json
{"openapi":"3.0.3","info":{"title":"Atreemo API","version":"0.1.0"},"tags":[{"name":"SalesLeads","description":"Api Methods for SalesLeads"}],"servers":[{"url":"https://apim-hospitality-dev-uksouth.azure-api.net/atreemo-api","description":"Local DEV APIM import draft only; not a deployed endpoint announcement."}],"security":[{"AtreemoBearer":[]}],"components":{"securitySchemes":{"AtreemoBearer":{"type":"http","scheme":"bearer","description":"Atreemo access token obtained by the caller from the Atreemo instance `POST /token` endpoint (OAuth2 password grant) and sent as `Authorization: Bearer <token>`. See the Authorisation guide."}},"schemas":{"PostLeadsInput":{"type":"object","nullable":true,"properties":{"CpyID":{"type":"integer","format":"int32"},"CtcID":{"type":"integer","format":"int32"},"FullName":{"type":"string","nullable":true},"LocationID":{"type":"integer","format":"int32"},"SourceID":{"type":"integer","format":"int32"},"StatusID":{"type":"integer","format":"int32"},"PriorityID":{"type":"integer","format":"int32"},"ProductIDs":{"type":"array","items":{"type":"string","nullable":true},"nullable":true},"Value":{"type":"number","format":"float","nullable":true},"CategoryID":{"type":"integer","format":"int32"},"SubCategoryID":{"type":"integer","format":"int32"},"LeadSource":{"type":"string","nullable":true},"SurveyOpCode":{"type":"integer","format":"int32","nullable":true},"SurveyResponseID":{"type":"integer","format":"int32","nullable":true},"Notes":{"type":"string","nullable":true},"NotesTime":{"type":"string","nullable":true},"AdminNotes":{"type":"string","nullable":true},"AdminNotesTime":{"type":"string","nullable":true},"CtcComment":{"type":"string","nullable":true},"SaleCancelled":{"type":"boolean"},"FeedbackID":{"type":"integer","format":"int32"},"MembershipType":{"type":"integer","format":"int32","nullable":true},"FollowUpDate":{"type":"string","format":"date-time","nullable":true},"ContactMade":{"type":"boolean"},"ContactMadeDate":{"type":"string","format":"date-time","nullable":true},"IsWalkIn":{"type":"boolean"},"EventDate":{"type":"string","format":"date-time","nullable":true},"EventEndDate":{"type":"string","format":"date-time","nullable":true},"ProvisionalEventDate":{"type":"string","format":"date-time","nullable":true},"ProvisionalEndDate":{"type":"string","format":"date-time","nullable":true},"PostSalescallDate":{"type":"string","format":"date-time","nullable":true},"AppDate":{"type":"string","format":"date-time","nullable":true},"Products":{"type":"array","items":{"$ref":"#/components/schemas/ProductLead"},"nullable":true},"CorporateID":{"type":"integer","format":"int32","nullable":true},"IsAppReminder":{"type":"boolean","nullable":true},"AppReminderNote":{"type":"string","nullable":true},"IsFollowUpReminder":{"type":"boolean","nullable":true},"FollowUpReminderNote":{"type":"string","nullable":true},"ContactType":{"type":"integer","format":"int32"},"POSRevenue":{"type":"string","nullable":true},"IsAppointmentShow":{"type":"boolean","nullable":true},"IsClaimed":{"type":"boolean"},"EcastOpCode":{"type":"integer","format":"int32","nullable":true},"AppID":{"type":"integer","format":"int32","nullable":true},"FollowUpID":{"type":"integer","format":"int32","nullable":true},"BrandID":{"type":"integer","format":"int32","nullable":true},"BookingID":{"type":"string","nullable":true},"CollinsStatus":{"type":"string","nullable":true},"Covers":{"type":"integer","format":"int32","nullable":true},"VisitDate":{"type":"string","format":"date-time","nullable":true},"BookingTypeID":{"type":"string","nullable":true},"SubSourceID":{"type":"integer","format":"int32","nullable":true},"Budget":{"type":"string","nullable":true},"BookingReference":{"type":"string","nullable":true},"ExpectedRevenue":{"type":"string","nullable":true},"PipelineStageID":{"type":"integer","format":"int32"},"BookingStatus":{"type":"string","nullable":true},"UserID":{"type":"integer","format":"int32"},"OnboardingApplicationId":{"type":"string","nullable":true},"OnboardingApplicationStatus":{"type":"string","nullable":true},"OnboardingApplicationStage":{"type":"string","nullable":true}},"description":"Source-backed JSON members, including inheritance and JSON naming/ignore attributes. No property is required solely because its CLR value type is non-nullable. Runtime and deployment alignment are unverified."},"ProductLead":{"type":"object","nullable":true,"properties":{"<ProductID>k__BackingField":{"type":"integer","format":"int32"},"<ID>k__BackingField":{"type":"integer","format":"int32"},"<LeadID>k__BackingField":{"type":"integer","format":"int32"},"<UnitPrice>k__BackingField":{"type":"number","format":"float"},"<Discount>k__BackingField":{"type":"number","format":"float"},"<Total>k__BackingField":{"type":"number","format":"float"},"<FullName>k__BackingField":{"type":"string","nullable":true},"<Description>k__BackingField":{"type":"string","nullable":true},"<Quantity>k__BackingField":{"type":"integer","format":"int32","nullable":true},"<QuantityEstimate>k__BackingField":{"type":"integer","format":"int32"},"<Estimate>k__BackingField":{"type":"number","format":"float"},"<GrossCost>k__BackingField":{"type":"number","format":"float"},"<TotalPrice>k__BackingField":{"type":"number","format":"float"},"<CtcID>k__BackingField":{"type":"integer","format":"int32"},"<URD>k__BackingField":{"type":"string","format":"date-time"},"<ModifiedBy>k__BackingField":{"type":"string","nullable":true},"<Picture>k__BackingField":{"type":"string","nullable":true},"<LongDescription>k__BackingField":{"type":"string","nullable":true}},"description":"Serializable CLR class: Web API 5.2.7 JsonContractResolver sets IgnoreSerializableAttribute=false. The JSON contract uses instance fields, including compiler-generated backing fields, rather than ordinary CLR property names. Computed properties without backing fields are not included. Runtime-unverified."},"PostSLPOutput":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"},"description":"List of errors if exist"},"ProjectID":{"type":"integer","format":"int32","description":"ID of the new project"},"response":{"type":"boolean","description":"Status of the call"}}}}},"paths":{"/api/SalesLeads/Post":{"post":{"operationId":"SalesLeadsPost","summary":"Post","tags":["SalesLeads"],"description":"The Post.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostLeadsInput"}}}},"responses":{"200":{"description":"OK (sample status in the public collection).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostSLPOutput"}}}}}}}}}
```

## Put

> The Put.

```json
{"openapi":"3.0.3","info":{"title":"Atreemo API","version":"0.1.0"},"tags":[{"name":"SalesLeads","description":"Api Methods for SalesLeads"}],"servers":[{"url":"https://apim-hospitality-dev-uksouth.azure-api.net/atreemo-api","description":"Local DEV APIM import draft only; not a deployed endpoint announcement."}],"security":[{"AtreemoBearer":[]}],"components":{"securitySchemes":{"AtreemoBearer":{"type":"http","scheme":"bearer","description":"Atreemo access token obtained by the caller from the Atreemo instance `POST /token` endpoint (OAuth2 password grant) and sent as `Authorization: Bearer <token>`. See the Authorisation guide."}},"schemas":{"PutLeadsInput":{"type":"object","nullable":true,"properties":{"LeadID":{"type":"integer","format":"int32"},"IsAddAppointment":{"type":"boolean"},"IsAddFollowUp":{"type":"boolean"},"UpdatedByBooking":{"type":"boolean"}},"allOf":[{"$ref":"#/components/schemas/PostLeadsInput"}],"description":"Source-backed JSON members, including inheritance and JSON naming/ignore attributes. No property is required solely because its CLR value type is non-nullable. Runtime and deployment alignment are unverified."},"PostLeadsInput":{"type":"object","nullable":true,"properties":{"CpyID":{"type":"integer","format":"int32"},"CtcID":{"type":"integer","format":"int32"},"FullName":{"type":"string","nullable":true},"LocationID":{"type":"integer","format":"int32"},"SourceID":{"type":"integer","format":"int32"},"StatusID":{"type":"integer","format":"int32"},"PriorityID":{"type":"integer","format":"int32"},"ProductIDs":{"type":"array","items":{"type":"string","nullable":true},"nullable":true},"Value":{"type":"number","format":"float","nullable":true},"CategoryID":{"type":"integer","format":"int32"},"SubCategoryID":{"type":"integer","format":"int32"},"LeadSource":{"type":"string","nullable":true},"SurveyOpCode":{"type":"integer","format":"int32","nullable":true},"SurveyResponseID":{"type":"integer","format":"int32","nullable":true},"Notes":{"type":"string","nullable":true},"NotesTime":{"type":"string","nullable":true},"AdminNotes":{"type":"string","nullable":true},"AdminNotesTime":{"type":"string","nullable":true},"CtcComment":{"type":"string","nullable":true},"SaleCancelled":{"type":"boolean"},"FeedbackID":{"type":"integer","format":"int32"},"MembershipType":{"type":"integer","format":"int32","nullable":true},"FollowUpDate":{"type":"string","format":"date-time","nullable":true},"ContactMade":{"type":"boolean"},"ContactMadeDate":{"type":"string","format":"date-time","nullable":true},"IsWalkIn":{"type":"boolean"},"EventDate":{"type":"string","format":"date-time","nullable":true},"EventEndDate":{"type":"string","format":"date-time","nullable":true},"ProvisionalEventDate":{"type":"string","format":"date-time","nullable":true},"ProvisionalEndDate":{"type":"string","format":"date-time","nullable":true},"PostSalescallDate":{"type":"string","format":"date-time","nullable":true},"AppDate":{"type":"string","format":"date-time","nullable":true},"Products":{"type":"array","items":{"$ref":"#/components/schemas/ProductLead"},"nullable":true},"CorporateID":{"type":"integer","format":"int32","nullable":true},"IsAppReminder":{"type":"boolean","nullable":true},"AppReminderNote":{"type":"string","nullable":true},"IsFollowUpReminder":{"type":"boolean","nullable":true},"FollowUpReminderNote":{"type":"string","nullable":true},"ContactType":{"type":"integer","format":"int32"},"POSRevenue":{"type":"string","nullable":true},"IsAppointmentShow":{"type":"boolean","nullable":true},"IsClaimed":{"type":"boolean"},"EcastOpCode":{"type":"integer","format":"int32","nullable":true},"AppID":{"type":"integer","format":"int32","nullable":true},"FollowUpID":{"type":"integer","format":"int32","nullable":true},"BrandID":{"type":"integer","format":"int32","nullable":true},"BookingID":{"type":"string","nullable":true},"CollinsStatus":{"type":"string","nullable":true},"Covers":{"type":"integer","format":"int32","nullable":true},"VisitDate":{"type":"string","format":"date-time","nullable":true},"BookingTypeID":{"type":"string","nullable":true},"SubSourceID":{"type":"integer","format":"int32","nullable":true},"Budget":{"type":"string","nullable":true},"BookingReference":{"type":"string","nullable":true},"ExpectedRevenue":{"type":"string","nullable":true},"PipelineStageID":{"type":"integer","format":"int32"},"BookingStatus":{"type":"string","nullable":true},"UserID":{"type":"integer","format":"int32"},"OnboardingApplicationId":{"type":"string","nullable":true},"OnboardingApplicationStatus":{"type":"string","nullable":true},"OnboardingApplicationStage":{"type":"string","nullable":true}},"description":"Source-backed JSON members, including inheritance and JSON naming/ignore attributes. No property is required solely because its CLR value type is non-nullable. Runtime and deployment alignment are unverified."},"ProductLead":{"type":"object","nullable":true,"properties":{"<ProductID>k__BackingField":{"type":"integer","format":"int32"},"<ID>k__BackingField":{"type":"integer","format":"int32"},"<LeadID>k__BackingField":{"type":"integer","format":"int32"},"<UnitPrice>k__BackingField":{"type":"number","format":"float"},"<Discount>k__BackingField":{"type":"number","format":"float"},"<Total>k__BackingField":{"type":"number","format":"float"},"<FullName>k__BackingField":{"type":"string","nullable":true},"<Description>k__BackingField":{"type":"string","nullable":true},"<Quantity>k__BackingField":{"type":"integer","format":"int32","nullable":true},"<QuantityEstimate>k__BackingField":{"type":"integer","format":"int32"},"<Estimate>k__BackingField":{"type":"number","format":"float"},"<GrossCost>k__BackingField":{"type":"number","format":"float"},"<TotalPrice>k__BackingField":{"type":"number","format":"float"},"<CtcID>k__BackingField":{"type":"integer","format":"int32"},"<URD>k__BackingField":{"type":"string","format":"date-time"},"<ModifiedBy>k__BackingField":{"type":"string","nullable":true},"<Picture>k__BackingField":{"type":"string","nullable":true},"<LongDescription>k__BackingField":{"type":"string","nullable":true}},"description":"Serializable CLR class: Web API 5.2.7 JsonContractResolver sets IgnoreSerializableAttribute=false. The JSON contract uses instance fields, including compiler-generated backing fields, rather than ordinary CLR property names. Computed properties without backing fields are not included. Runtime-unverified."},"PostSLPOutput":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"},"description":"List of errors if exist"},"ProjectID":{"type":"integer","format":"int32","description":"ID of the new project"},"response":{"type":"boolean","description":"Status of the call"}}}}},"paths":{"/api/SalesLeads/Put":{"post":{"operationId":"SalesLeadsPut","summary":"Put","tags":["SalesLeads"],"description":"The Put.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutLeadsInput"}}}},"responses":{"200":{"description":"OK (sample status in the public collection).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostSLPOutput"}}}}}}}}}
```

## UpdateLeadByBooking

> The UpdateLeadByBooking.

```json
{"openapi":"3.0.3","info":{"title":"Atreemo API","version":"0.1.0"},"tags":[{"name":"SalesLeads","description":"Api Methods for SalesLeads"}],"servers":[{"url":"https://apim-hospitality-dev-uksouth.azure-api.net/atreemo-api","description":"Local DEV APIM import draft only; not a deployed endpoint announcement."}],"security":[{"AtreemoBearer":[]}],"components":{"securitySchemes":{"AtreemoBearer":{"type":"http","scheme":"bearer","description":"Atreemo access token obtained by the caller from the Atreemo instance `POST /token` endpoint (OAuth2 password grant) and sent as `Authorization: Bearer <token>`. See the Authorisation guide."}},"schemas":{"LeadBookingInput":{"type":"object","nullable":true,"properties":{"LeadID":{"type":"integer","format":"int32"},"CtcID":{"type":"integer","format":"int32"},"CollinsLocationID":{"type":"string","nullable":true},"Status":{"type":"string","nullable":true},"BookingID":{"type":"string","nullable":true},"BookingTypeName":{"type":"string","nullable":true},"BookingTypeID":{"type":"string","nullable":true},"Covers":{"type":"integer","format":"int32"},"VisitDate":{"type":"string","format":"date-time"},"Partner_source":{"type":"string","nullable":true},"BookingReference":{"type":"string","nullable":true},"Notes":{"type":"string","nullable":true},"NotesTime":{"type":"string","nullable":true},"AdminNotes":{"type":"string","nullable":true},"AdminNotesTime":{"type":"string","nullable":true},"CtcComment":{"type":"string","nullable":true},"Budget":{"type":"string","nullable":true}},"description":"Source-backed JSON members, including inheritance and JSON naming/ignore attributes. No property is required solely because its CLR value type is non-nullable. Runtime and deployment alignment are unverified."},"PostSLPOutput":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"},"description":"List of errors if exist"},"ProjectID":{"type":"integer","format":"int32","description":"ID of the new project"},"response":{"type":"boolean","description":"Status of the call"}}}}},"paths":{"/api/SalesLeads/UpdateLeadByBooking":{"post":{"operationId":"SalesLeadsUpdateLeadByBooking","summary":"UpdateLeadByBooking","tags":["SalesLeads"],"description":"The UpdateLeadByBooking.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadBookingInput"}}}},"responses":{"200":{"description":"OK (sample status in the public collection).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostSLPOutput"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.hos.accessacloud.com/atreemo-api/api-reference/atreemo-api-reference/sales-leads.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
