Units 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 unit was imported previously, this mutation will updated the resource, otherwise will create the unit.

type Mutation {
    upsertUnit(unit: UnitInput): Unit
    deleteUnit(externalId: String): Boolean  
}

Here are details on the capabilities of different mutations

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

Schema Definition

items with ! notation are required

input UnitInput {
  externalUnitId: String! #externalId by which the unit will be identified
  propertyId: String! #propertyId by which the unit will be attached to. You have to either pass propertyId or exteranalpropertyId 
  externalPropertyId: String! #externalPropertyId by which the unit will be attached to. You have t
  ownerId: String! #ownerId by which the unit will be attached to. You have to either pass ownerId or exteranalOwnerId 
  externalOwnerId: String! #externalOwnerId by which the unit will be attached to. You have to either pass ownerId or exteranalOwnerId
  category: UNIT_CATEGORY!
  type: UNIT_TYPE!
  name: String
  subtype: UNIT_SUBTYPES!
  netFloorSurface: Float
  livingSurface: Float
  rooms: UnitRoomsInput
  mainStorage: Boolean!
  floorNo: Int!
  amenities: AmenitiesInput
  descriptions: IUnitDescriptionInput
  financingType: UNIT_FINANCING_TYPE!
  targetRent: Float!
  surcharges: Float
  currentRent: Float
  availableFrom: Date # date in YYYY-MM-DD fromat
  onHoldStatus: Boolean
  onHoldReason: UNIT_ON_HOLD_REASON
  unitResponsibleId: String
  meta: MetaInformation!
}

input UnitParkingTypeInput {
  type: PARKING_TYPES
  quantity: Int
}

input UnitRoomsInput {
  rooms: Float
  bathrooms: Float
  bedrooms: Float
}


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

input MetaInformation {
  source: String!
}

enum UNIT_ON_HOLD_REASON {
  FIRST_TIME_USE
  CONSTRUCTION_MEASURES
  OCCUPANCY_RIGHT
  INTERNAL_USE
  RESERVED
  OTHER
}

enum UNIT_FINANCING_TYPE {
  PRIVATELY_FINANCED
  PUBLICLY_SUBSIDIZED
}

enum AMENITIES_INCLUDED {
  BUILTIN_KITCHEN
  ELEVATOR
  GOODS_LIFT
  BALCONY_OR_TERRACE
  GUEST_TOILET
  GARDEN
  BASEMENT
  STEPLESS_ENTRY
  LIVING_QUALIFICATION_CERTIFICATE
  SUITABLE_FOR_SHARED_APARTMENT
  SUITABLE_FOR_HOLIDAY
  CAFETERIA
  HIGH_VOLTAGE
  RAMP
  HYDRAULIC_RAMP
  TERRACE
  HAS_CRANE_RUNWAY
}

input AmenitiesInput {
  amenitiesIncluded: [AMENITIES_INCLUDED]
  hasParking: Boolean
  parking: UnitParkingType
  qualityOfAmenities: QUALITY_OF_AMENITIES
  condition: AMENITIES_CONDITION
  lastRenovationYear: Int
  heatingType: HEATING_TYPE
  mainEnergySource: ENERGY_SOURCE_TYPE
  energyPerformanceCertificateAvailability: ENERGY_PERFORMANCE_CERTIFICATE_AVAILABILITY
  energyCertificateCreationDate: ENERGY_CERTIFICATE_CREATION_DATE
  buildingEnergyRatingType: BUILDING_ENERGY_RATING_TYPE
  thermalCharacteristic: Float
  energyConsumptionContainsWarmWater: Boolean
  energyEfficiencyClass: ENERGY_EFFICIENCY_CLASS
  hasLanCables: YES_NO_BYAPPOINTMENT
  hasAirConditioning: YES_NO_BYAPPOINTMENT
  floorType: COMMERCIAL_UNIT_FLOORTYPE
  goodsLiftLoad: Float
  floorLoad: Float
  supplyType: STORE_SUPPLY_TYPE
  powerSupplyLoad: Float
  craneRunwayLoad: Float
}

type Amenities {
  amenitiesIncluded: [AMENITIES_INCLUDED]
  hasParking: Boolean
  parking: UnitParkingType
  qualityOfAmenities: QUALITY_OF_AMENITIES
  condition: AMENITIES_CONDITION
  lastRenovationYear: Int
  heatingType: HEATING_TYPE
  mainEnergySource: ENERGY_SOURCE_TYPE
  energyPerformanceCertificateAvailability: ENERGY_PERFORMANCE_CERTIFICATE_AVAILABILITY
  energyCertificateCreationDate: ENERGY_CERTIFICATE_CREATION_DATE
  buildingEnergyRatingType: BUILDING_ENERGY_RATING_TYPE
  thermalCharacteristic: Float
  energyConsumptionContainsWarmWater: Boolean
  energyEfficiencyClass: ENERGY_EFFICIENCY_CLASS
  hasLanCables: YES_NO_BYAPPOINTMENT
  hasAirConditioning: YES_NO_BYAPPOINTMENT
  floorType: COMMERCIAL_UNIT_FLOORTYPE
  goodsLiftLoad: Float
  floorLoad: Float
  supplyType: STORE_SUPPLY_TYPE
  powerSupplyLoad: Float
  craneRunwayLoad: Float
}

enum STORE_SUPPLY_TYPE {
  DIRECT_APPROACH
  NO_DIRECT_APPROACH
  CAR_APPROACH
  APPROACH_TO_THE_FRONT
  APPROACH_TO_THE_BACK
  FULL_TIME
  FORENOON
  NO_INFORMATION
}

enum ENERGY_SOURCE_TYPE {
  NO_INFORMATION
  GEOTHERMAL
  SOLAR_HEATING
  PELLET_HEATING
  GAS
  OIL
  DISTRICT_HEATING
  ELECTRICITY
  COAL
  ACID_GAS
  SOUR_GAS
  LIQUID_GAS
  STEAM_DISTRICT_HEATING
  WOOD
  WOOD_CHIPS
  COAL_COKE
  LOCAL_HEATING
  HEAT_SUPPLY
  BIO_ENERGY
  HYDRO_ENERGY
  ENVIRONMENTAL_THERMAL_ENERGY
  COMBINED_HEAT_AND_POWER_FOSSIL_FUELS
  COMBINED_HEAT_AND_POWER_RENEWABLE_ENERGY
  COMBINED_HEAT_AND_POWER_REGENERATIVE_ENERGY
  COMBINED_HEAT_AND_POWER_BIO_ENERGY
}

enum PARKING_TYPES {
  GARAGE
  OUTSIDE_PARKING_SPOT
  CARPORT
  DUPLEX
  PARKING_GARAGE
  UNDERGROUND_PARKING
  NO_INFORMATION
}

enum HEATING_TYPE {
  BLOCK_HEATING_STATION
  ELECTRIC_HEATING
  SELF_CONTAINED_CENTRAL_HEATING
  TELEHEATING
  FLOOR_HEATING
  GAS_HEATING
  WOOD_PELLET_HEATER
  NIGHT_STORAGE_HEATER
  STOVE_HEATING
  OIL_HEATING
  SOLAR_HEATING
  HEAT_PUMP
  CENTRAL_HEATING
}

enum QUALITY_OF_AMENITIES {
  LUXURIOUS
  UPSCALE
  NORMAL
  BASIC
}

Enum table maps

Field sub_type use the following table

UNIT_TYPE
Default
Possible Values

APARTMENT

NO_INFORMATION

NO_INFORMATION | APARTMENT | STUDIO | GROUND_FLOOR | TERRACE_APARTMENT | PENTHOUSE | MAISONETTE | LOFT | ROOM | HOUSE | ATTIC_FLOOR | SOUTERRAIN | MEZZANINE

HOUSE

NO_INFORMATION

SINGLE_FAMILY_HOUSE | MID_TERRACE_HOUSE | END_TERRANCE_HOUSE | MULTI_FAMILY_HOUSE | BUNGALOW | FARMHOUSE | SEMIDETACHED_HOUSE | MANSION | TOWN_HOUSE | SPECIAL_REAL_ESTATE | NO_INFORMATION

PARKING

NO_INFORMATION

GARAGE | OUTSIDE_PARKING_SPOT | CARPORT | DUPLEX | PARKING_GARAGE | UNDERGROUND_PARKING | NO_INFORMATION

OFFICE

OFFICE

LOFT | STUDIO | OFFICE | OFFICE_FLOOR | OFFICE_CENTER | OFFICE_STORAGE_BUILDING | SURGERY | SURGERY_FLOOR | SURGERY_BUILDING | COMMERCIAL_CENTER | LIVING_AND_COMMERICAL_BUILDING | OFFICE_AND_COMMERICAL_BUILDING

STORE

STORE

SHOWROOM_SPACE | SHOPPING_CENTER | FACTORY_OUTLET | DEPARTMENT_STORE | KIOSK | STORE | SELF_SERVICE_MARKET | SALES_AREA | SALES_HALL

GASTRONOMY

CAFE

BAR_LOUNGE | CAFE | CLUB_DISCO | GUESTHOUSE | TAVERN | HOTEL | HOTEL_RESIDENCE | HOTEL_GARNI | PENSION | RESTAURANT | BUNGALOW

INDUSTRY

HALL

SHOWROOM_SPACE | HALL | HIGH_LACK_STORAGE | INDUSTRY_HALL | COLD_STORAGE | MULTIDECK_CABINET_STORAGE | STORAGE_WITH_OPEN_AREA | STORAGE_AREA | STORAGE_HALL | SERVICE_AREA | SHIPPING_STORAGE | REPAIR_SHOP

SPECIAL PURPOSE

SPECIAL_ESTATE

RESIDENCE | FARM | HORSE_FARM | VINEYARD | REPAIR_SHOP | LEISURE_FACILITY | SPECIAL_ESTATE | COMMERCIAL_CENTER | INDUSTRIAL_AREA

Other enum fields

ENUM
Default
Possible Value

UNIT_TYPE

APARTMENT

APARTMENT | HOUSE | PARKING | OFFICE | STORE | GASTRONOMY | INDUSTRY | SPECIAL_PURPOSE | LAND

UNIT_CATEGORY

RESIDENTIAL

COMMERCIAL | RESIDENTIAL

ENERGY_PERFORMANCE_CERTIFICATE_AVAILABILITY

AVAILABLE_AT_VIEWING

AVAILABLE | AVAILABLE_AT_VIEWING | NOT_REQUIRED

ENERGY_CERTIFICATE_CREATION_DATE

BEFORE_01_MAY_2014 | FROM_01_MAY_2014

BUILDING_ENERGY_RATING_TYPE

ENERGY_REQUIRED | ENERGY_CONSUMPTION

ENERGY_EFFICIENCY_CLASS

NO_INFORMATION | A_PLUS | A | B | C | D | E | F | G | H

YES_NO_BYAPPOINTMENT

NO_INFORMATION

YES | NO | BY_APPOINTMENT | NO_INFORMATION

COMMERCIAL_UNIT_FLOORTYPE

NO_INFORMATION

CONCRETE | EPOXY_RESIN | TILES | PLANKS | LAMINATE | PARQUET | PVC | CARPET | ANTISTATIC_FLOOR | OFFICE_CARPET | STONE | CUSTOMIZABLE | WITHOUT | NO_INFORMATION

AMENITIES_CONDITION

WELL_KEPT

FIRST_TIME_USE | FIRST_TIME_USE_AFTER_REFURBISHMENT | AS_GOOD_AS_NEW | REFURBISHED | UPGRADED | FULLY_RENOVATED | WELL_KEPT | IN_NEED_OF_RENOVATION | NEGOTIABLE | DILAPIDATED

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


mutation {
  upsertUnit(
    unit: {
      meta: { source: "INTEGRATION_TYPE" }
      name: "Appartmert"
      externalUnitId: "910011000009"
      propertyId: "b7ecfa0c-6dfc-4236-abac-0a92d90ce032"
      externalOwnerId: "2255"
      category: RESIDENTIAL
      type: APARTMENT
      subtype: APARTMENT
      rooms: {
        bedrooms: 0
        rooms: 4
      }
      amenities:{
        condition: FULLY_RENOVATED
        lastRenovationYear: 2012
        qualityOfAmenities: LUXURIOUS,
        energyConsumptionContainsWarmWater: true
        energyEfficiencyClass: A_PLUS
        energyCertificateCreationDate: FROM_01_MAY_2014
        hasLanCables: YES
      }
      descriptions: {
        object: "Property Group 01: child-rich parts of the city.ss",
        amenities: "Property Group 01: Completely furnished with high-quality custom-made fittings",
        location: "Property Group 01: Langenhagen The city of Langenhagen connects directly to the settlement area of ​​Hanover in the north.",
        other: "Property Group 01: See more Infosys at www.myclimate.org and in Kundenportal."
      }
    }
  ) {
    id
  }
}

Last updated