# Update a Location
Once the location is created using the location services, then the user may be able to update the location properties using the PATCH /locations/{locationId}
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 update an existing location! All that you have to do now, is to tell us to process the request. To do so, we will call the PATCH /locations/{locationId}
endpoint.
This endpoint requires some additional core donation payment 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 streetcountry
- Country ISO code of the Locationdistrict
- 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 updating location with a new phonenumber.
# 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 updated an existing location and received the response, to help your users drive further goodness in the world!