Properties Mutation

Create or update properties in EverReal

Mutation Types

Mutations are responsible to insert or update a specific register, the operation insert or update is defined by externalId, in case this property was imported previously, this mutation will updated the resource, otherwise will create the property.

type Mutation {
    upsertProperty(property: PropertyInput!)
    deleteProperty(externalId: String!)  
}

Here are details on the capabilities of different mutations

  • The upsertProperty mutation is used to create or update a property in Everreal system and property 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 deleteProperty mutation is used to delete the property relation with the external integration source, doing this will not delete the property but instead it will remain as a detached property from integration and can be modified using Everreal.

Schema Definition

items with ! notation are required

input PropertyInput {
  meta: MetaInformation!
  address: AddressInput!
  id: String #you can pass the id to change the externalId of the property
  externalPropertyId: String! #externalId by which the property will be identified
  ownerId: String #when ownershipType=INDIVIDUAL you should either pass externalOwnerId or ownerId where ownerId is Everreal generated Id
  externalOwnerId: String  #when ownershipType=INDIVIDUAL you should either pass externalOwnerId or ownerId where ownerId is Everreal generated I
  name: String!
  type: PROPERTY_TYPE!
  subtype: PROPERTY_TYPE!
  category: PROPERTY_CATEGORY!
  noOfStories: Int # The total number of floors of the building
  yearBuilt: Int
  ownershipType: PROPERTY_OWNERSHIP_TYPE! #when passed as MULTIPLE you dont need to pass ownerId or externalOwnerId
  responsibilityType: PROPERTY_RESPONSIBILITY_TYPE
  responsibleUserId: String
  propertyGroupId: String
  externalPropertyGroupId: String
  descriptions: PropertyDescriptionInput
}

input AddressInput {
  streetName: String!
  streetNumber: String!
  zipCode: String!
  city: String!
  country: String!
  location: GeoLocationInput
  placeId: String
}


input PropertyDescriptionInput {
  object: String
  amenities: String
  location: String
  other: String
}

input GeoLocationInput {
  lat: Float!
  lng: Float!
}

input MetaInformation {
  source: String!
}

If you don't have a value for a required field that is an enum, then pass the default value, for PROPERTY_OWNERSHIP_TYPE if passed INDIVIDUAL then it should contain ownerId.

When Owner or ResponsibleUser is changed in property the value will be inherited to the units attached to property and owner, unitResponsible will be updated respectively. Also, When OwnershipType and ResponsibilityUserType is changed to MULTIPLE,the value of the owner and responsible users will not be cleared in unit level instead retains previous value.

Below we are providing a full example how to create or update a property, all this information is not required, only the ones that was using ! notation previously.

mutation {
  upsertProperty(
    property: {
      meta: { source: "INTEGRATION_SOURCE" }
      name: "Munich Appartment"
      type: BUILDING
      externalPropertyId: "9098/501" 
      ownerId: "b8559500-bb35-11ec-a64e-4b00ff3d25d5" 
      externalOwnerId: "981/2"d
      category: RESIDENTIAL
      subtype: BUILDING
      noOfStories: 10
      address: {
        city: "Ludwigshafen a. Rhein"
        country: "DE"
        streetNumber: "44 - 68"
        streetName: "Hoher Weg"
        zipCode: "67067"
        location: { lat: 52.5705570, lng: 6.14847399999933 }
      }
      ownershipType: INDIVIDUAL 
    }
  ) {id}
}

Last updated