{"swagger":"2.0","info":{"version":"v3-diary","title":"agentOS API V3, Diary Call Group"},"host":"live-api.letmc.com","schemes":["https"],"paths":{"/v3/diary/{shortname}/{branchID}/guest/search":{"get":{"tags":["DiaryController"],"summary":"Match Guest Parameters with existing applicants","operationId":"DiaryController_SearchGuest","consumes":[],"produces":["application/json","text/json"],"parameters":[{"name":"shortname","in":"path","description":"","required":true,"type":"string"},{"name":"branchID","in":"path","description":"","required":true,"type":"string"},{"name":"forename","in":"query","description":"","required":true,"type":"string"},{"name":"emailaddress","in":"query","description":"","required":true,"type":"string"},{"name":"surname","in":"query","description":"","required":true,"type":"string"},{"name":"offset","in":"query","description":"","required":true,"type":"integer","format":"int32"},{"name":"count","in":"query","description":"","required":true,"type":"integer","format":"int32"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GuestDiaryParametersResultsModel"}}}}},"/v3/diary/{shortName}/allocations":{"get":{"tags":["DiaryController"],"summary":"Get a list of all available allocations for a date + 7 days for a specified appointment type","operationId":"DiaryController_GetAllocations","consumes":[],"produces":["application/json","text/json"],"parameters":[{"name":"shortName","in":"path","description":"The unique client short-name","required":true,"type":"string"},{"name":"preferredDate","in":"query","description":"The date to search from","required":true,"type":"string","format":"date-time"},{"name":"appointmentType","in":"query","description":"The unique appointment type identifier","required":true,"type":"string"},{"name":"lettings","in":"query","description":"Sales or Lettings property?","required":false,"type":"boolean"},{"name":"propertyIdentifier","in":"query","description":"The unique property identifier (Sales or Lettings) determines branch and property type","required":false,"type":"string"},{"name":"branchID","in":"query","description":"Branch ID to check appointments (required if no property submitted)","required":false,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/DiaryBookingModel"}}}}}},"/v3/diary/{shortName}/appointment":{"get":{"tags":["DiaryController"],"summary":"Get an appointment by ID","operationId":"DiaryController_GetAppointment","consumes":[],"produces":["application/json","text/json"],"parameters":[{"name":"shortName","in":"path","description":"Company short name","required":true,"type":"string"},{"name":"appointmentID","in":"query","description":"Appointment ID","required":true,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/DiaryAppointmentModel"}}}},"put":{"tags":["DiaryController"],"summary":"Update an existing appointment using its unique identifier","operationId":"DiaryController_PutAppointment","consumes":["application/json","text/json","application/x-www-form-urlencoded"],"produces":["application/json","text/json"],"parameters":[{"name":"shortName","in":"path","description":"The unique client short-name","required":true,"type":"string"},{"name":"appointmentID","in":"query","description":"The unique appointment id","required":true,"type":"string"},{"name":"appointmentDetails","in":"body","description":"The appointment details model","required":true,"schema":{"$ref":"#/definitions/DiaryAppointmentDetails"}},{"name":"lettings","in":"query","description":"Sales or Lettings property?","required":false,"type":"boolean"},{"name":"AllowMarketingCorrespondence","in":"query","description":"Sales or Lettings property?","required":false,"type":"boolean"}],"responses":{"200":{"description":"OK","schema":{"type":"string"}}}},"post":{"tags":["DiaryController"],"summary":"Post an appointment into a valid diary allocation","operationId":"DiaryController_PostAppointment","consumes":["application/json","text/json","application/x-www-form-urlencoded"],"produces":["application/json","text/json"],"parameters":[{"name":"shortName","in":"path","description":"The unique client short-name","required":true,"type":"string"},{"name":"propertyIdentifier","in":"query","description":"The unique property identifier (Sales or Lettings)","required":true,"type":"array","items":{"type":"string"},"collectionFormat":"multi"},{"name":"appointmentDetails","in":"body","description":"The appointment details model","required":true,"schema":{"$ref":"#/definitions/DiaryAppointmentDetails"}},{"name":"lettings","in":"query","description":"Sales or Lettings property?","required":false,"type":"boolean"}],"responses":{"200":{"description":"OK","schema":{"type":"string"}}}},"delete":{"tags":["DiaryController"],"summary":"Delete an existing appointment using its unique identifier","operationId":"DiaryController_DeleteAppointment","consumes":[],"produces":["application/json","text/json"],"parameters":[{"name":"shortName","in":"path","description":"The unique client short-name","required":true,"type":"string"},{"name":"appointmentID","in":"query","description":"The unique appointment id","required":true,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"type":"string"}}}}},"/v3/diary/{shortName}/appointment/{appointmentID}/cancel":{"patch":{"tags":["DiaryController"],"summary":"Cancel an existing appointment using its unique identifier","operationId":"DiaryController_CancelAppointment","consumes":[],"produces":["application/json","text/json"],"parameters":[{"name":"shortName","in":"path","description":"The unique client short-name","required":true,"type":"string"},{"name":"appointmentID","in":"path","description":"The unique appointment id","required":true,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"type":"string"}}}}},"/v3/diary/{shortName}/appointment/feedback":{"post":{"tags":["DiaryController"],"summary":"Submit appointment feedback","operationId":"DiaryController_AddFeedback","consumes":["application/json","text/json","application/x-www-form-urlencoded"],"produces":["application/json","text/json"],"parameters":[{"name":"shortName","in":"path","description":"The unique client short-name","required":true,"type":"string"},{"name":"submissionModel","in":"body","description":"Feedback submission model","required":true,"schema":{"$ref":"#/definitions/FeedbackSubmissionModel"}}],"responses":{"200":{"description":"OK","schema":{"type":"string"}}}}},"/v3/diary/{shortName}/appointmentsbetweendates":{"get":{"tags":["DiaryController"],"summary":"A collection of diary appointments linked to a company filtered between specific dates and by appointment type","operationId":"DiaryController_GetAppointmentsBetweenDates","consumes":[],"produces":["application/json","text/json"],"parameters":[{"name":"shortName","in":"path","description":"The unique client short-name","required":true,"type":"string"},{"name":"branchID","in":"query","description":"The unique ID of the Branch","required":true,"type":"string"},{"name":"startDate","in":"query","description":"The search from date","required":true,"type":"string","format":"date-time"},{"name":"endDate","in":"query","description":"The search to date","required":true,"type":"string","format":"date-time"},{"name":"appointmentTypesToSearch","in":"query","description":"The appointment IDs to search for","required":true,"type":"array","items":{"type":"string"},"collectionFormat":"multi"},{"name":"offset","in":"query","description":"The index of the first item to return","required":true,"type":"integer","format":"int32"},{"name":"count","in":"query","description":"The maximum number of items to return (up to 1000 per request)","required":true,"type":"integer","format":"int32"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/DiaryAppointmentModelResults"}}}}},"/v3/diary/{shortName}/appointmenttypes":{"get":{"tags":["DiaryController"],"summary":"A collection of all diary appointment types","operationId":"DiaryController_GetAppointmentTypes","consumes":[],"produces":["application/json","text/json"],"parameters":[{"name":"shortName","in":"path","description":"The unique client short-name","required":true,"type":"string"},{"name":"offset","in":"query","description":"The index of the first item to return","required":true,"type":"integer","format":"int32"},{"name":"count","in":"query","description":"The maximum number of items to return (up to 1000 per request)","required":true,"type":"integer","format":"int32"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/DiaryAppointmentTypeModelResults"}}}}},"/v3/diary/{shortName}/company/branches":{"get":{"tags":["CompanyController"],"summary":"All branches defined for a company","operationId":"CompanyController_GetBranches","consumes":[],"produces":["application/json","text/json"],"parameters":[{"name":"shortName","in":"path","description":"The unique client short-name","required":true,"type":"string"},{"name":"offset","in":"query","description":"The index of the first item to return","required":true,"type":"integer","format":"int32"},{"name":"count","in":"query","description":"The maximum number of items to return (up to 1000 per request)","required":true,"type":"integer","format":"int32"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/AdvertisingBranchModelResults"}}}}},"/v3/diary/{shortName}/company/branches/{branchID}":{"get":{"tags":["CompanyController"],"summary":"Get a specific branch given its unique Object ID (OID)","operationId":"CompanyController_GetBranches","consumes":[],"produces":["application/json","text/json"],"parameters":[{"name":"shortName","in":"path","description":"The unique client short-name","required":true,"type":"string"},{"name":"branchID","in":"path","description":"The unique ID of the Branch","required":true,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/AdvertisingBranchModel"}}}}},"/v3/diary/{shortName}/recurringappointment":{"get":{"tags":["DiaryController"],"summary":"Retrieves all recurring appointments:-","operationId":"DiaryController_GetRecurringAppointments","consumes":[],"produces":["application/json","text/json"],"parameters":[{"name":"shortName","in":"path","description":"The unique client short-name","required":true,"type":"string"},{"name":"branchID","in":"query","description":"The unique ID of the Branch","required":true,"type":"string"},{"name":"appointmentTypesToSearch","in":"query","description":"The appointment IDs to search for","required":true,"type":"array","items":{"type":"string"},"collectionFormat":"multi"},{"name":"offset","in":"query","description":"The index of the first item to return","required":true,"type":"integer","format":"int32"},{"name":"count","in":"query","description":"The maximum number of items to return (up to 1000 per request)","required":true,"type":"integer","format":"int32"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/DiaryAppointmentModelResults"}}}}}},"definitions":{"AdvertisingBranchModelResults":{"description":"Holds results from a paged query returning BranchModel values","type":"object","properties":{"Data":{"description":"The resulting data returned from the paged query range","type":"array","items":{"$ref":"#/definitions/AdvertisingBranchModel"}},"Count":{"format":"int32","description":"The total number of results available for all pages","type":"integer"}}},"AdvertisingBranchModel":{"description":"Defines a single branch of a client.","type":"object","properties":{"OID":{"description":"The unique Object ID (OID).","type":"string"},"ETag":{"description":"A unique identifier defining the object and change revision.","type":"string"},"Name":{"description":"The branch name.","type":"string"},"CompanyName":{"description":"The relevant company name, if not the one specified on the branch then the one on company.","type":"string"},"Address1":{"description":"Branch address line 1.","type":"string"},"Address2":{"description":"Branch address line 2.","type":"string"},"Address3":{"description":"Branch address line 3.","type":"string"},"Address4":{"description":"Branch address line 4.","type":"string"},"Postcode":{"description":"Branch address postcode.","type":"string"},"WebAddress":{"description":"Branch web address.","type":"string"},"EMailAddress":{"description":"Branch email address.","type":"string"},"LandPhone":{"description":"Branch land phone number.","type":"string"},"FaxPhone":{"description":"Branch fax phone number.","type":"string"},"County":{"description":"County","type":"string"}}},"DiaryAppointmentModelResults":{"description":"Holds results from a paged query returning DiaryAppointmentModel values","type":"object","properties":{"Data":{"description":"The resulting data returned from the paged query range","type":"array","items":{"$ref":"#/definitions/DiaryAppointmentModel"}},"Count":{"format":"int32","description":"The total number of results available for all pages","type":"integer"}}},"DiaryAppointmentModel":{"description":"Represents a single diary appointment for a staff member.","type":"object","properties":{"OID":{"description":"The unique Object ID (OID).","type":"string"},"ETag":{"description":"A unique identifier defining the object and change revision.","type":"string"},"CreatedAt":{"format":"date-time","description":"The date/time this appointment was created.","type":"string"},"Start":{"format":"date-time","description":"The start date/time of this appointment.","type":"string"},"End":{"format":"date-time","description":"The end date/time of this appointment.","type":"string"},"Subject":{"description":"The appointment subject text.","type":"string"},"Comment":{"description":"The appointment comments text.","type":"string"},"Staff":{"description":"The staff member holding this appointment.","type":"string"},"CreatedBy":{"description":"The staff member that created this appointment.","type":"string"},"Cancelled":{"description":"Whether the appointment has been cancelled.","type":"boolean"},"AppointmentType":{"description":"The diary appointment type.","type":"string"},"RemindAt":{"format":"date-time","description":"The date/time to remind the staff member of this appointment.","type":"string"},"RemindBefore":{"description":"The number of minutes before the appointment start date/time to remind the staff member. -1 means don't remind.","enum":["Min","Min2","Min5","Min10","Min15","Min30","Min45","Hour","Hour2","Hour3","Hour6","Hour12","Day","Day2","Day3","Week","NoReminder"],"type":"string"},"LinkedProperties":{"description":"A collection of properties linked to the appointment:-","type":"array","items":{"$ref":"#/definitions/LinkedPropertiesModel"}},"LinkedGuest":{"description":"Linked Guest Model:-","type":"array","items":{"$ref":"#/definitions/LinkedGuestModel"},"readOnly":true},"Recurrence":{"format":"int32","description":"The reccurrence interval for the appointment:-","type":"integer"},"RecurrenceType":{"description":"The type of recurrence:-","type":"string"},"NextRecurringDate":{"format":"date-time","description":"Date appointment next repeats:-","type":"string"}}},"LinkedPropertiesModel":{"description":"Holds information on linked properties","type":"object","properties":{"OID":{"description":"OID","type":"string"},"ETag":{"description":"ETag","type":"string"},"AddressNumber":{"description":"Address Number","type":"string"},"AddressFlatRoomNumber":{"description":"Address Flat Room Number","type":"string"},"Address1":{"description":"Address 1","type":"string"},"Address2":{"description":"Address2","type":"string"},"Address3":{"description":"Address 3","type":"string"},"Address4":{"description":"Address 4","type":"string"},"Postcode":{"description":"Postcode","type":"string"},"MainLandlord":{"$ref":"#/definitions/LinkedLandlordModel","description":"The main landlord linked to the property"},"LatestTenancy":{"$ref":"#/definitions/LatestTenancyModel","description":"The latest tenancy linked to the property"}}},"LinkedGuestModel":{"description":"Holds information on guests","type":"object","properties":{"OID":{"description":"Guest OID:-","type":"string","readOnly":true},"GlobalReference":{"description":"Guest Global Reference:-","type":"string","readOnly":true},"CreatedAt":{"format":"date-time","description":"Guest Created At:-","type":"string","readOnly":true},"Name":{"description":"Guest Name:-","type":"string","readOnly":true},"Email":{"description":"Guest Email:-","type":"string","readOnly":true},"Mobile":{"description":"Guest Mobile:-","type":"string","readOnly":true}}},"LinkedLandlordModel":{"description":"Holds information on landlords","type":"object","properties":{"OID":{"description":"OID","type":"string"},"ETag":{"description":"ETag","type":"string"},"Title":{"description":"Title","type":"string"},"Forename":{"description":"Forename","type":"string"},"Surname":{"description":"Surname","type":"string"},"PhoneNumber":{"description":"Landlord's phone number","type":"string"},"Email":{"description":"Landlord's email address","type":"string"}}},"LatestTenancyModel":{"description":"Holds information on the most recent tenancy linked to the property.","type":"object","properties":{"OID":{"description":"OID","type":"string"},"ETag":{"description":"ETag","type":"string"},"GlobalReference":{"description":"The unique global reference of the Tenancy","type":"string"},"StartDate":{"format":"date-time","description":"The start date of the Tenancy","type":"string"},"FixedDate":{"format":"date-time","description":"The fixed date of the Tenancy","type":"string"},"EndDate":{"format":"date-time","description":"The end date of the Tenancy","type":"string"},"IsTenancyProposed":{"description":"Is the tenancy Proposed?","type":"boolean"},"IsTenancySigned":{"description":"Is the tenancy signed?","type":"boolean"},"IsTenancyEnded":{"description":"Has the Tenancy ended?","type":"boolean"},"LinkedTenants":{"description":"A collection of tenants linked to the tenancy:-","type":"array","items":{"$ref":"#/definitions/LinkedTenantModel"}},"AccessArrangements":{"description":"Access Arrangements","type":"string","readOnly":true},"AccessName1":{"description":"Arrange access contact name 1","type":"string","readOnly":true},"AccessName2":{"description":"Arrange access contact name 2","type":"string","readOnly":true},"AccessName3":{"description":"Arrange access contact name 3","type":"string","readOnly":true},"AccessMobile1":{"description":"Arrange access Mobile 1","type":"string","readOnly":true},"AccessMobile2":{"description":"Arrange access Mobile 2","type":"string","readOnly":true},"AccessMobile3":{"description":"Arrange access Mobile 3","type":"string","readOnly":true}}},"LinkedTenantModel":{"description":"Holds information on tenants","type":"object","properties":{"OID":{"description":"OID","type":"string"},"ETag":{"description":"ETag","type":"string"},"Title":{"description":"Title","type":"string"},"Forename":{"description":"Forename","type":"string"},"Surname":{"description":"Surname","type":"string"},"PhoneNumber":{"description":"Tenant's phone number","type":"string"},"Email":{"description":"Tenant's email address","type":"string"}}},"DiaryAppointmentDetails":{"description":"Submission Model - Structure to submit the appointment details","type":"object","properties":{"AllocationDetails":{"$ref":"#/definitions/DiaryBookingModel","description":"Allocation details to link the appointment too"},"AppointmentType":{"description":"The Appointment Type ID","type":"string"},"Subject":{"description":"The subject of the appointment","type":"string"},"ExtraComments":{"description":"Additional appointment comments","type":"string"},"Guests":{"description":"A collection of guests linked to the appointment. If none leave empty","type":"array","items":{"$ref":"#/definitions/DiaryGuestDetails"}}}},"DiaryBookingModel":{"description":"Represents a viewing booking slot","type":"object","properties":{"Start":{"format":"date-time","description":"The start time of the booking","type":"string"},"End":{"format":"date-time","description":"The end time of the booking","type":"string"},"StaffName":{"description":"The name of the staff member this booking is with","type":"string"},"StaffID":{"description":"The unique ID of the staff member this booking is with","type":"string"}}},"DiaryGuestDetails":{"description":"Submission Model - Structure to submit appointment guest details","type":"object","properties":{"OID":{"description":"The unique identifier of a user, only submit this is known","type":"string"},"Forename":{"description":"Forename","type":"string"},"Surname":{"description":"Surname","type":"string"},"MobilePhone":{"description":"Mobile phone","type":"string"},"EmailAddress":{"description":"Email address","type":"string"},"AllowMarketingCorrespondence":{"description":"Marketing Correspondence Preferences","type":"boolean"}}},"DiaryAppointmentTypeModelResults":{"description":"Holds results from a paged query returning DiaryAppointmentTypeModel values","type":"object","properties":{"Data":{"description":"The resulting data returned from the paged query range","type":"array","items":{"$ref":"#/definitions/DiaryAppointmentTypeModel"}},"Count":{"format":"int32","description":"The total number of results available for all pages","type":"integer"}}},"DiaryAppointmentTypeModel":{"description":"Represents a diary appointment type.","type":"object","properties":{"OID":{"description":"The unique Object ID (OID).","type":"string"},"ETag":{"description":"A unique identifier defining the object and change revision.","type":"string"},"Name":{"description":"The appointment type name.","type":"string"},"SystemType":{"description":"The appointment system type.","enum":["Viewing","ViewAndValue","OpeningInspection","InterimInspection","ClosingInspection","SalesAppraisal","Custom"],"type":"string"}}},"FeedbackSubmissionModel":{"description":"Feedback Submission Model:-","type":"object","properties":{"AppointmentID":{"description":"Appointment to submit feedback to:-","type":"string"},"PropertyID":{"description":"Property to submit feedback to:-","type":"string"},"Feedback":{"description":"Feedback to submit:-","type":"string"}}},"GuestDiaryParametersResultsModel":{"description":"Contacts Person Model Results:-","type":"object","properties":{"Data":{"description":"Results data:-","type":"array","items":{"$ref":"#/definitions/GuestDiaryParametersModel"}},"Count":{"format":"int32","description":"Results count:-","type":"integer"},"Links":{"description":"Results links:-","type":"array","items":{"$ref":"#/definitions/BaseHypermediaLink"}}}},"GuestDiaryParametersModel":{"description":"Guest Diary Parameters Model","type":"object","properties":{"OID":{"description":"Guest OID","type":"string","readOnly":true},"Forename":{"description":"Guest Forename","type":"string","readOnly":true},"Surname":{"description":"Guest Surname","type":"string","readOnly":true},"ContactMobile":{"description":"Guest Mobile Phone","type":"string","readOnly":true},"EmailAddress":{"description":"Guest Email Address","type":"string","readOnly":true}}},"BaseHypermediaLink":{"description":"Hypermedia Link Class","type":"object","properties":{"Relationship":{"description":"The hypermedia link relationship to current result object.","type":"string"},"Href":{"description":"The hypermedia href","type":"string"},"Method":{"description":"The http method type","type":"string"}}}},"securityDefinitions":{"basic":{"type":"basic","description":"Basic HTTP Authentication"},"apiKey":{"type":"apiKey","description":"ApiKey Authentication","name":"ApiKey","in":"header"}}}