@datafire/letmc_customer v4.0.0
@datafire/letmc_customer
Client library for LetMC Api V2, Customer Login
Installation and Usage
npm install --save @datafire/letmc_customer
let letmc_customer = require('@datafire/letmc_customer').create({
apiKey: "",
username: "",
password: ""
});
.then(data => {
console.log(data);
});
Description
Actions
v2.customer.shortName.branch.branches.get
All branches defined for a company
letmc_customer.v2.customer.shortName.branch.branches.get({
"shortName": "",
"offset": 0,
"count": 0
}, context)
Input
- input
object
- shortName required
string
: The unique client short-name - offset required
integer
: The index of the first item to return - count required
integer
: The maximum number of items to return (up to 1000 per request)
- shortName required
Output
- output BranchModelResults
v2.customer.shortName.branch.branches.branchID.get
Get a specific branch given its unique Object ID (OID)
letmc_customer.v2.customer.shortName.branch.branches.branchID.get({
"shortName": "",
"branchID": ""
}, context)
Input
- input
object
- shortName required
string
: The unique client short-name - branchID required
string
: The unique ID of the Branch
- shortName required
Output
- output BranchModel
LandlordController_GetAccounts
Get the accounting details for the landlord.
letmc_customer.LandlordController_GetAccounts({
"shortName": "",
"token": ""
}, context)
Input
- input
object
- shortName required
string
: The unique client short-name - token required
string
: The login token returned from the /session POST call
- shortName required
Output
- output LandlordAccountingModel
LandlordController_GetDocument
Download a Document
letmc_customer.LandlordController_GetDocument({
"shortName": "",
"token": "",
"ID": ""
}, context)
Input
- input
object
- shortName required
string
: The unique client short-name - token required
string
: The login token returned from the /session POST call - ID required
string
: The Document ID
- shortName required
Output
- output Object
LandlordController_GetInvetoryReport
Generate a Inventory PDF for a tenancy
letmc_customer.LandlordController_GetInvetoryReport({
"shortName": "",
"token": "",
"tenancyID": ""
}, context)
Input
- input
object
- shortName required
string
: The unique client short-name - token required
string
: The login token returned from the /session POST call - tenancyID required
string
: The Tenancy ID
- shortName required
Output
- output Object
LandlordController_GetInvoice
Get an invoice pdf belonging to the landlord.
letmc_customer.LandlordController_GetInvoice({
"shortName": "",
"token": "",
"invoiceID": ""
}, context)
Input
- input
object
- shortName required
string
: The unique client short-name - token required
string
: The login token returned from the /session POST call - invoiceID required
string
: The invoice ID to load.
- shortName required
Output
- output Object
LandlordController_GetLandlordCrmEntries
Retrieve landlord's CRM ID
letmc_customer.LandlordController_GetLandlordCrmEntries({
"shortName": "",
"token": ""
}, context)
Input
- input
object
- shortName required
string
: The unique client short-name - token required
string
: The login token returned from the /session POST call
- shortName required
Output
- output
array
- items LandlordCrmEntry
LandlordController_GetMaintenanceJobs
Get Active maintenance jobs.
letmc_customer.LandlordController_GetMaintenanceJobs({
"shortName": "",
"token": ""
}, context)
Input
- input
object
- shortName required
string
: The unique client short-name - token required
string
: The login token returned from the /session POST call
- shortName required
Output
- output LandlordMaintenanceModel
LandlordController_GetProfitLossReport
Generate a Profit and Loss Report
letmc_customer.LandlordController_GetProfitLossReport({
"shortName": "",
"token": ""
}, context)
Input
- input
object
- shortName required
string
: The unique client short-name - token required
string
: The login token returned from the /session POST call
- shortName required
Output
- output LandlordProfitLossModel
LandlordController_GetRentArrears
Rent Arrears
letmc_customer.LandlordController_GetRentArrears({
"shortName": "",
"token": ""
}, context)
Input
- input
object
- shortName required
string
: The unique client short-name - token required
string
: The login token returned from the /session POST call
- shortName required
Output
- output LandlordRentArrearsModel
LandlordController_GetSASReport
Generate a Self Assessment Tax Report
letmc_customer.LandlordController_GetSASReport({
"shortName": "",
"token": "",
"yearEnd": 0
}, context)
Input
- input
object
- shortName required
string
: The unique client short-name - token required
string
: The login token returned from the /session POST call - yearEnd required
integer
: The Tax Year End.
- shortName required
Output
- output Object
LandlordController_GetSettings
Get contact details of all linked landlords.
letmc_customer.LandlordController_GetSettings({
"shortName": "",
"token": ""
}, context)
Input
- input
object
- shortName required
string
: The unique client short-name - token required
string
: The login token returned from the /session POST call
- shortName required
Output
- output LandlordSettingsModel
LandlordController_GetSummaryDetails
Get the summary details for the landlord.
letmc_customer.LandlordController_GetSummaryDetails({
"shortName": "",
"token": ""
}, context)
Input
- input
object
- shortName required
string
: The unique client short-name - token required
string
: The login token returned from the /session POST call
- shortName required
Output
- output LandlordSummaryModel
LandlordController_GetTenancy
Get tenancy details.
letmc_customer.LandlordController_GetTenancy({
"shortName": "",
"token": "",
"tenancyID": ""
}, context)
Input
- input
object
- shortName required
string
: The unique client short-name - token required
string
: The login token returned from the /session POST call - tenancyID required
string
: The Tenancy ID
- shortName required
Output
- output LandlordTenancyModel
LandlordController_GetTenancyAgreementReport
Generate a Tenancy Agreement Copy (PDF)
letmc_customer.LandlordController_GetTenancyAgreementReport({
"shortName": "",
"token": "",
"tenancyID": ""
}, context)
Input
- input
object
- shortName required
string
: The unique client short-name - token required
string
: The login token returned from the /session POST call - tenancyID required
string
: The Tenancy ID
- shortName required
Output
- output Object
PhotoController_GetPhotoDownload
Downloads the photo of a property given the photo ID.
letmc_customer.PhotoController_GetPhotoDownload({
"shortName": "",
"token": "",
"photoID": ""
}, context)
Input
- input
object
- shortName required
string
: The unique client short-name - token required
string
: The login token returned from the /session POST call - photoID required
string
: The unique ID of the photo on the property - width
integer
: An optional parameter specifying the image width - height
integer
: An optional parameter specifying the image height
- shortName required
Output
- output Object
PropertyController_GetPropertiesPhotos
A collection showing all the photos linked to a specific block, property or room
letmc_customer.PropertyController_GetPropertiesPhotos({
"shortName": "",
"token": "",
"propertyID": "",
"offset": 0,
"count": 0
}, context)
Input
- input
object
- shortName required
string
: The unique client short-name - token required
string
: The login token returned from the /session POST call - propertyID required
string
: The unique ID of the Property - offset required
integer
: The index of the first item to return - count required
integer
: The maximum number of items to return (up to 1000 per request)
- shortName required
Output
- output LandlordPhotoModelResults
SessionController_Logout
Logout a customer previously logged in via the Login endpoint.
letmc_customer.SessionController_Logout({
"shortName": "",
"token": ""
}, context)
Input
- input
object
- shortName required
string
: The unique client short-name - token required
string
: The login token returned from the /session POST call
- shortName required
Output
Output schema unknown
SessionController_GetSessionInfo
Gets information about the currently logged on customer.
letmc_customer.SessionController_GetSessionInfo({
"shortName": "",
"token": ""
}, context)
Input
- input
object
- shortName required
string
: The unique client short-name - token required
string
: The login token returned from the /session POST call
- shortName required
Output
- output
string
SessionController_Login
Login as a customer given their username and password.
letmc_customer.SessionController_Login({
"shortName": "",
"username": "",
"password": ""
}, context)
Input
- input
object
- shortName required
string
: The unique client short-name - username required
string
: The user's username. - password required
string
: The user's password.
- shortName required
Output
- output
string
SessionController_CreateLandlordLogin
Send a request to the in-tray to create a landlord login.
letmc_customer.SessionController_CreateLandlordLogin({
"shortName": "",
"email": "",
"title": "",
"forename": "",
"surname": "",
"propertyAdresss": "",
"contactDetails": ""
}, context)
Input
- input
object
- shortName required
string
: The unique client short-name - email required
string
: The email address of the landlord - title required
string
: The title of the landlord - forename required
string
: The forename of the landlord - surname required
string
: The surname of the landlord - propertyAdresss required
string
: Address of the property linked to the landlord - contactDetails required
string
: Contact details of the landlord - branchID
string
: (Optional) The branch ID linked to the login. This will determine which in tray the request display in
- shortName required
Output
Output schema unknown
SessionController_ChangePassword
Change the password of a customer given their existing and new password.
letmc_customer.SessionController_ChangePassword({
"shortName": "",
"token": "",
"oldPassword": "",
"newPassword": ""
}, context)
Input
- input
object
- shortName required
string
: The unique client short-name - token required
string
: The login token returned from the /session POST call - oldPassword required
string
: The customer's existing password. - newPassword required
string
: The customer's new password.
- shortName required
Output
Output schema unknown
SessionController_ResetPassword
Reset the customer's password. An email will be sent out to reset.
letmc_customer.SessionController_ResetPassword({
"shortName": "",
"email": ""
}, context)
Input
- input
object
- shortName required
string
: The unique client short-name - email required
string
: The login Email Address.
- shortName required
Output
Output schema unknown
Definitions
BranchModel
- BranchModel
object
: Defines a single branch of a client.- Address1
string
: Branch address line 1. - Address2
string
: Branch address line 2. - Address3
string
: Branch address line 3. - Address4
string
: Branch address line 4. - CompanyName
string
: The relevant company name, if not the one specified on the branch then the one on company. - County
string
: County - EMailAddress
string
: Branch email address. - ETag
string
: A unique identifier defining the object and change revision. - FaxPhone
string
: Branch fax phone number. - LandPhone
string
: Branch land phone number. - Name
string
: The branch name. - OID
string
: The unique Object ID (OID). - Postcode
string
: Branch address postcode. - WebAddress
string
: Branch web address.
- Address1
BranchModelResults
- BranchModelResults
object
: Holds results from a paged query returning BranchModel values- Count
integer
: The total number of results available for all pages - Data
array
: The resulting data returned from the paged query range- items BranchModel
- Count
KeyValuePairString,String
- KeyValuePairString,String
object
- key
string
- value
string
- key
LandlordAccountingEntryModel
- LandlordAccountingEntryModel
object
: Landlord Accounting - Finance Entry- Amount
number
: Amount - Date
string
: Payment Date - Description
string
: Description. - TransactionNumber
integer
: Transaction Number
- Amount
LandlordAccountingInvoiceModel
- LandlordAccountingInvoiceModel
object
: Invoices- Date
string
: Payment Date - InvoiceID
string
: Transaction Number - IsMaintenanceInvoice
boolean
: Does this invoice contain contractor payments?
- Date
LandlordAccountingModel
- LandlordAccountingModel
object
: Landlord Accounting- AccountBalance
number
: Account Balance - LastPayment
string
: Last Payment Made - PaymentHistory
array
: Payment History - Statements
array
: Statements
- AccountBalance
LandlordChaseNoteModel
- LandlordChaseNoteModel
object
: Landlord Arrears Chase Note.- Date
string
: Created Date - Note
string
: Note. - NoteType
string
: Note Type - TenantID
string
: Tenant
- Date
LandlordCrmEntry
- LandlordCrmEntry
object
: Class for Landlord CRM Entries- BranchID
string
- GlobalReference
string
- Name
string
- OID
string
- BranchID
LandlordDetailsModel
- LandlordDetailsModel
object
: Landlord Details- Address
string
: Address - Email
string
: Email - GlobalReference
string
: User Friendly ID - ID
string
: ID - Mobile
string
: Mobile - Name
string
: Name - Phone
string
: Phone
- Address
LandlordLettingsInspectionModel
- LandlordLettingsInspectionModel
object
: Lettings Inspection- InspectionDate
string
: InspectionDate - Notes
string
: Notes
- InspectionDate
LandlordMaintenanceCertificateModel
- LandlordMaintenanceCertificateModel
object
: Maintenance Certificate- Due
string
: Due - Files
array
: Files- items LettingsLandlordDocument
- Status
string
: Status. - Type
string
: Type
- Due
LandlordMaintenanceJobModel
- LandlordMaintenanceJobModel
object
: Maintenance Job- AssignedTo
string
: AssignedTo - Description
string
: Description - Property
string
: Property - Reported
string
: Reported - Status
string
: Status
- AssignedTo
LandlordMaintenanceModel
- LandlordMaintenanceModel
object
: Landlord Maintenance- Jobs
array
: Maintenance Jobs.
- Jobs
LandlordMaintenancePreferenceModel
- LandlordMaintenancePreferenceModel
object
: Maintenance Preference- Name
string
: Name - Notes
string
: Notes. - Type
string
: Type
- Name
LandlordPhotoModel
- LandlordPhotoModel
object
: Stores a photo related to a property structure.- ETag
string
: A unique identifier defining the object and change revision. - FileName
string
: The file name. - OID
string
: The unique Object ID (OID). - PhotoType
string
(values: Photo, Map, FloorPlan, SiteMap, AerialPhoto): The photo type.
- ETag
LandlordPhotoModelResults
- LandlordPhotoModelResults
object
: Holds results from a paged query returning LandlordPhotoModel values- Count
integer
: The total number of results available for all pages - Data
array
: The resulting data returned from the paged query range- items LandlordPhotoModel
- Count
LandlordProfitLossModel
- LandlordProfitLossModel
object
: Class to represent proffit loss report.- DirectCosts LandlordProfitLossSectionModel
- GrossProfitLoss LandlordProfitLossSectionModel
- Income LandlordProfitLossSectionModel
LandlordProfitLossRowModel
- LandlordProfitLossRowModel
object
: Class for a group of entries.- MonthTotals
array
: Month Totals - NominalCode
string
: Nominal Code - Title
string
: Title of the values. - Total
string
: Total for all months.
- MonthTotals
LandlordProfitLossSectionModel
- LandlordProfitLossSectionModel
object
: Class for a group of entries.- Rows
array
: Rows.
- Rows
LandlordRentArrearsModel
- LandlordRentArrearsModel
object
: Landlord Rent Arrears.- ChaseNotes
array
: Chase Notes- items LandlordChaseNoteModel
- RentCollected
number
: Rent Collected - RentOutstanding
array
: Outstanding Rent - TotalRentArrears
number
: Rent Arrears
- ChaseNotes
LandlordRentOustandingItem
- LandlordRentOustandingItem
object
: Outstanding Rent- DebtDays
integer
: Days since the tenant went into arrears - OutstandingRent
number
: Outstanding Rent - Property
string
: Property - Tenant
string
: Tenant - TenantID
string
: TenantID
- DebtDays
LandlordSettingsModel
- LandlordSettingsModel
object
: Landlord Settings- LinkedAccounts
array
: Linked Accounts- items LandlordDetailsModel
- LinkedAccounts
LandlordSummaryModel
- LandlordSummaryModel
object
: Landlord Summary - Landing Page.- AccountBalance
number
: Account Balance - LastPayment
string
: Last Payment Made - Tenancies
array
: Tenancies - TotalRentArrears
number
: Rent Arrears
- AccountBalance
LandlordSummaryTenancyModel
- LandlordSummaryTenancyModel
object
: Landlord Summary - Landing Page.- Bond
number
: Bomd - Description
string
: Description. - GlobalReference
string
: User Friendly ID - ID
string
: ID - MaintenanceJobs
integer
: Maintenance Jobs. - ManagedRent
boolean
: State of the tenancy - PropertyAddress
string
: Display Property Address - Rent
string
: Rent - RentArrears
number
: Rent Arrears - RentCollected
number
: Rent Arrears - TenancyProperty
string
: Tenancy Property - TenancyState
string
: State of the tenancy
- Bond
LandlordTenancyModel
- LandlordTenancyModel
object
: Landlord Tenancy Model.- ActualEndDate
string
: Actual End Date - Beds
integer
: Beds - Bond
number
: Bond - Certificates
array
: Maintenance Certificates. - FixedDate
string
: Fixed Date - GlobalReference
string
: User Friendly ID - ID
string
: ID - Inspections
array
: Inspections - ManagedRent
boolean
: State of the tenancy - Preferences
array
: Maintenance Preferences. - PreviousRentAmount
number
: Previous Rent Amount - PropertyAddress
string
: Display Property Address - Rent
string
: Rent - RentAmount
number
: Rent Amount - StartDate
string
: Start Date - TenancyProperty
string
: Tenancy Property - TenancyState
string
: State of the tenancy - Tenants
array
: Tenants- items
string
- items
- ActualEndDate
LettingsLandlordDocument
- LettingsLandlordDocument
object
: Document details.- FileName
string
: File Name - FileSize
integer
: File Size Bytes - ID
string
: ID - MIMEType
string
: MIME Type
- FileName
Object
- Object
object