{"swagger":"2.0","info":{"version":"v4-referencing","title":"agentOS Api V4, Pre-Tenancy Referencing Call Group"},"host":"live-api.letmc.com","schemes":["https"],"paths":{"/V4/Referencing/{shortName}/applications/{applicationID}/documents":{"patch":{"tags":["ReferencingController"],"summary":"Attach referencing document to application:-","operationId":"ReferencingController_SubmitTenancyApplications","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":"applicationID","in":"path","description":"Branch to get the tenancy applications for","required":true,"type":"string"},{"name":"document","in":"body","description":"Document to attach","required":true,"schema":{"$ref":"#/definitions/ReferencingDocumentSubmissionModel"}}],"responses":{"200":{"description":"OK","schema":{"type":"string"}}}}},"/V4/Referencing/{shortName}/applications/{branchID}/{offset}/{count}":{"get":{"tags":["ReferencingController"],"summary":"Get all incomplete tenancy applications for the branch for referencing:-","operationId":"ReferencingController_GetTenancyApplicationForBranch","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":"Branch to get the tenancy applications for","required":true,"type":"string"},{"name":"offset","in":"path","description":"The index of the first item to return","required":true,"type":"integer","format":"int32"},{"name":"count","in":"path","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/TenancyApplicationModelResults"}}}}},"/v4/Referencing/{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/BaseBranchModel"}}}}},"/v4/Referencing/{shortName}/company/branches/{offset}/{count}":{"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":"path","description":"The index of the first item to return","required":true,"type":"integer","format":"int32"},{"name":"count","in":"path","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/BaseBranchModelResults"}}}}},"/v4/Referencing/{shortName}/company/object/{objectID}/customfield":{"get":{"tags":["CompanyController"],"summary":"Get Custom Field by ObjectID:-","operationId":"CompanyController_GetCustomfieldbyID","consumes":[],"produces":["application/json","text/json"],"parameters":[{"name":"shortName","in":"path","description":"The unique client short-name","required":true,"type":"string"},{"name":"objectID","in":"path","description":"The Unique Object ID","required":true,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/BaseCustomField"}}}}},"/v4/Referencing/{shortName}/company/objects/{objectID}/{fieldID}/customfield":{"post":{"tags":["CompanyController"],"summary":"Set Custom Field Value:-","operationId":"CompanyController_SetCustomFieldValue","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":"objectID","in":"path","description":"The Unique Object ID","required":true,"type":"string"},{"name":"fieldID","in":"path","description":"The Unique Field ID","required":true,"type":"string"},{"name":"value","in":"body","description":"Value to enter (string)","required":true,"schema":{"$ref":"#/definitions/BaseCustomFieldSubmissionModel"}}],"responses":{"200":{"description":"OK","schema":{"type":"string"}}}}},"/v4/Referencing/{shortName}/company/objects/{objectID}/{fieldID}/value":{"get":{"tags":["CompanyController"],"summary":"Get Custom Field Value:-","operationId":"CompanyController_GetCustomFieldValue","consumes":[],"produces":["application/json","text/json"],"parameters":[{"name":"shortName","in":"path","description":"The unique client short-name","required":true,"type":"string"},{"name":"objectID","in":"path","description":"The Unique Object ID","required":true,"type":"string"},{"name":"fieldID","in":"path","description":"The Unique Field ID","required":true,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"type":"object"}}}}}},"definitions":{"BaseBranchModelResults":{"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/BaseBranchModel"}},"Count":{"format":"int32","description":"The total number of results available for all pages","type":"integer"},"Links":{"description":"Base Hypermedia Links","type":"array","items":{"$ref":"#/definitions/BaseHypermediaLink"}}}},"BaseBranchModel":{"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"},"Links":{"description":"Hypermedia links","type":"array","items":{"$ref":"#/definitions/BaseHypermediaLink"}}}},"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"}}},"BaseCustomField":{"type":"object","properties":{"CustomFields":{"description":"Dynamic Custom Field:-","type":"array","items":{"$ref":"#/definitions/CustomFieldDataModel"}}}},"CustomFieldDataModel":{"type":"object","properties":{"ID":{"description":"Field ID:-","type":"string"},"TabName":{"description":"Tab on OS custom field belongs to:-","type":"string"},"GroupName":{"description":"The grouping on OS the custom field belongs to:-","type":"string"},"FieldName":{"description":"Name of the custom field:-","type":"string"},"Retired":{"description":"Is field retired:-","type":"boolean"},"Value":{"description":"Custom Field Value:-","type":"object"}}},"BaseCustomFieldSubmissionModel":{"type":"object","properties":{"customfieldValue":{"description":"Custom Field Value","type":"string"}}},"TenancyApplicationModelResults":{"description":"Tennancy Application Model Results:-","type":"object","properties":{"Data":{"description":"Results Data:-","type":"array","items":{"$ref":"#/definitions/TenancyApplicationModel"}},"Count":{"format":"int32","description":"Results Count:-","type":"integer"}}},"TenancyApplicationModel":{"description":"Tenancy Application Model:-","type":"object","properties":{"OID":{"description":"Unique Object ID:-","type":"string"},"Applicant":{"$ref":"#/definitions/ApplicantModel","description":"The tenancy Applicant:-"},"Tenancy":{"$ref":"#/definitions/TenancyModel","description":"The tenancy applied for:-"},"CanResolveTenancy":{"description":"Has the tenancy application provided enough information to resolve to a tenancy in the system, if not discard the tenancy application:-","type":"boolean"}}},"ApplicantModel":{"description":"Applicant Tenant Model:-","type":"object","properties":{"Name":{"$ref":"#/definitions/BaseNameModel","description":"Applicant Name:-"},"Email":{"description":"Applicant Email:-","type":"string"},"PhoneNumber":{"description":"Applicant Phone Number:-","type":"string"},"CurrentAddress":{"$ref":"#/definitions/BaseAddressModel","description":"Applicant's current address:-"}}},"TenancyModel":{"description":"Tenancy Model:-","type":"object","properties":{"OID":{"description":"Tenancy ID:-","type":"string"},"Address":{"$ref":"#/definitions/BaseAddressModel","description":"Tenancy Address:-"},"IsHmo":{"description":"Tenancy Is Hmo:-","type":"boolean"},"MonthlyRent":{"format":"double","description":"Monthly Rent Amount:-","type":"number"},"Deposit":{"format":"double","description":"Deposit Amount:-","type":"number"},"Documents":{"description":"Documents:-","type":"array","items":{"$ref":"#/definitions/BaseDocumentModel"}},"DepositHeld":{"format":"double","description":"Deposit Amount held by agent:-","type":"number"}}},"BaseNameModel":{"description":"Base model for a person's name:-","type":"object","properties":{"Title":{"description":"The person's title:-","type":"string"},"Forename":{"description":"The person's first name:-","type":"string"},"Middlename":{"description":"The person's middle names:-","type":"string"},"Surname":{"description":"The person's surname:-","type":"string"}}},"BaseAddressModel":{"description":"Base Address Model:-","type":"object","properties":{"Address1":{"description":"Address 1:-","type":"string"},"Address2":{"description":"Address 2:-","type":"string"},"Address3":{"description":"Address 3:-","type":"string"},"Address4":{"description":"Address 4:-","type":"string"},"Postcode":{"description":"Postcode:-","type":"string"},"FlatOrRoomNumber":{"description":"Flat Or Room Number:-","type":"string"},"AddressNumber":{"description":"Address Number:-","type":"string"}}},"BaseDocumentModel":{"description":"Base Document model:-","type":"object","properties":{"OID":{"description":"Document ID:-","type":"string","readOnly":true},"Filename":{"description":"Document Filename:-","type":"string","readOnly":true},"Filesize":{"description":"Document Filesize:-","type":"string","readOnly":true},"IsArchived":{"description":"Document is archived?","type":"boolean","readOnly":true},"IsPublic":{"description":"Document is public?","type":"boolean","readOnly":true},"Uploaded":{"format":"date-time","description":"Document upload date:-","type":"string","readOnly":true}}},"ReferencingDocumentSubmissionModel":{"description":"Model to represent online tenancy application documents.","type":"object","properties":{"DocumentName":{"description":"Document name","type":"string"},"MimeType":{"description":"Mime type","type":"string"},"Contents":{"description":"Base64 string to convert to document","type":"string"}}}},"securityDefinitions":{"basic":{"type":"basic","description":"Basic HTTP Authentication"},"apiKey":{"type":"apiKey","description":"ApiKey Authentication","name":"ApiKey","in":"header"}}}