Improve your Skyline experience
You're using a browser that skyline.benevity.org does not support. Try Chrome, Edge, Safari or Firefox for a better experience.

# Add a new Location

When you want to add new location to the location services, you need to specify description about the location such as name, reference id and the geo-encoding address. If no geocordinates are provided, then the services use the bing maps (opens new window). To create a new location, we'll be leveraging the POST /locations endpoint.

# Building your request

Ensure that you authenticate the request with the JWT you've previously obtained, by passing the JWT as an Authorization header.

Great, let's create a location! All that you have to do now, is to tell us to process the request. To do so, we will call the POST /locations endpoint to create a new location.

This endpoint requires some additional core information, such as:

Location attributes:

  • name - the name of the location.
  • referenceId - An unique Id for the location, this value is supplied by the client and can be used to reference existing Id used in the client's existing systems.
  • phoneNumber - Phone number of the Location.
  • address - Text description of the Location.
    • addressLine - Name and number of the street
    • country - Country ISO code of the Location
    • district - Province/District of the Location.
    • locality - City of the Location.
    • postalCode - Zip/Postal code of the Location.
    • geoCoordinate - Geo coordinate of the Location.
      • latitude - Latitude of the Location.
      • longitude - Longitude of the Location.

# Sample request:

In our example, we're going to be creating a location

# Sample response:

{
    {
  "data": {
    "type": "location",
    "attributes": {
      "id": "1009843199016960000",
      "name": "Benevity",
      "address": {
        "addressLine": "611 Meredith Rd",
        "country": "Canada",
        "district": "Alberta",
        "locality": "Calgary",
        "postalCode": "T2E 2W5",
        "geoCoordinate": {
          "latitude": 12,
          "longitude": 32
        }
      },
      "phoneNumber": "+14035555555",
      "referenceId": "810e95f6-de45-478a-bc8c-3d94379fe002",
      "tags": [],
      "contacts": []
    }
  }
}
}

# 🚀 ☀️ ⭐️ Congratulations! ⭐️ ☀️ 🚀

You have now created a location and received the response, to help your users drive further goodness in the world!