Location recording

You can specify the location for the start and for the end of the mission in three different ways.

These location are mandatory and have to be specified at the begining and at the end of the mission.

Record a location with a manual address

mutation {
  activities {
    logLocation(missionId: 18,
                type: "mission_start_location",
                manualAddress: "10 avenue de la République 75011",
                kilometerReading: 5500) {
      id
      name
    }
  }
}

Record a location with a company known address

It is possible to save a location at the company level, when configuring the company in Mobilic, so you can only provide the location id when recording a location during a mission:

mutation {
  activities {
    logLocation(missionId: 18,
                type: "mission_start_location",
                companyKnownAddressId: 16,
                kilometerReading: 5500) {
      id
      name
    }
  }
}

Record an address using the GeoJSON format

You can record an address using the GeoJSON format, as it is retrieced from the api.adresse API for instance.

In that case, the address object has to be filled in the geoApiData field :

mutation {
  activities {
    logLocation(missionId: 18,
                type: "mission_start_location",
                geoApiData: {"type":"Feature","geometry":{"type":"Point","coordinates":[2.35273,48.847202]},"properties":{"label":"41 Rue du Cardinal Lemoine 75005 Paris","score":0.9999999844012717,"housenumber":"41","id":"75105_1545_00041","name":"41 Rue du Cardinal Lemoine","postcode":"75005","citycode":"75105","x":652499.34,"y":6860989.97,"city":"Paris","district":"Paris 5e Arrondissement","context":"75, Paris, Île-de-France","type":"housenumber","importance":0.71867,"street":"Rue du Cardinal Lemoine","distance":6}},
                kilometerReading: 5500) {
      id
      name
    }
  }
}

Last updated