Tenant Mutation
Create or Update in EverReal
Mutation Types
type Mutation {
upsertTenant(tenant: TenantInput): Tenant
deleteTenant(externalId: String): AsyncEventResponse
removeTenant(id: String): Boolean
}
Here are details on the capabilities of different mutations
The
upsertTenant
mutation is used to create or update a tenant in Everreal system and tenant added to the system cannot be modified by Everreal and if needs to be modified it should be done via the same endpoint itself.The
deleteTenant
mutation is used to delete the tenant relation with the external integration source, doing this will not delete the tenant but instead it will remain as a detached tenant from integration and can be modified using Everreal.The
removeTenant
mutation is used to remove the tenant from the system, in order to perform removeTenant, please make sure that all the contracts assosiated with the tenant is been removed ( reference to delete contract)
Schema Definition
items with ! notation are required
input TenantInput {
id:String #EverReal UUID typically can be passes in case of updating externalId
externalTenantId: String! #externalTenantId by which the tenent is identified
unitId: String! #unitId by which the tenent will be attached to. You have to either pass unitId or exteranalunitId
externalUnitId: String! #exteranalunitId by which the tenent will be attached to. You have to either pass unitId or exteranalunitId
firstName: String!
lastName: String!
email: String
companyName: String
phoneNumber: String
cellPhoneNumber: String
additionalTenants: [AdditionalTenant]
coldRent: String # number format should be numeric "123456.34"
serviceCharges: String # number format should be numeric "123456.34"
heatingCosts: String # number format should be numeric "123456.34"
totalRent: String # number format should be numeric "123456.34"
securityDeposit: String # number format should be numeric "123456.34"
contractStartDate: String #date format should be "YYYY-MM-DD" or "DD.MM.YYYY"
contractEndDate: String #date format should be "YYYY-MM-DD" or "DD.MM.YYYY"
meta: MetaInformation!
}
input AdditionalTenant {
externalId: String
firstName: String
lastName: String
email: String
phoneNumber: String
}
input MetaInformation {
source: String!
}
type AsyncEventResponse {
statusCode: Int
message: String
}
Below we are providing a full example how to create or update a tenant, all this information is not required, only the ones that was using ! notation previously.
mutation {
upsertTenant(
tenant: {
meta: { source: "INTEGRATION_SOURCE" }
externalTenantId: "91001+006"
externalUnitId: "11092+1101"
firstName: "Ivana"
lastName: "Maric"
email: "[email protected]"
coldRent: "900.00"
serviceCharges: "880.00"
heatingCosts: "3.00"
totalRent: "500"
securityDeposit: "500"
contractStartDate: "01.01.2020"
contractEndDate: "01.01.2024"
companyName: "gmbh"
}
) { id }
}
Last updated
Was this helpful?