Updating a Location

Required Permission

can-update-locations

See Auth* (scopes).

Properties

See Creating a New Location

Request

PUT /locations/<id>
Content-Type: application/json

Structured Address Format

{
   "storeId":"001MKC",
   "storeName":"Milton Keynes",
   "structuredAddress": {
     "street": "Elder Gate",
     "buildingName": "DODO Estate",
     "houseNumber": "202",
     "city": "Milton Keynes",
     "district": "Greater London",
     "province": "Hogwarts",
     "postCode": "MK9 1GW",
     "countryCode": "GBR"
   },
   "latitude":52.035538,
   "longitude":-0.774214,
   "telephoneNumber":"+441908237494",
   "email":"mkstore@askjeeves.com",
   "logoUrl":"http://logo.metapack.com/testlogo.gif",
   "photoUrls":[
      "http://logo.metapack.com/testlogo.gif",
      "http://logo.metapack.com/testlogo.gif"
   ],
   "hasDisabledAccess":true,
   "description":null,
   "tags":[
       "a",
       "b",
       "c"
   ],
   "locationProvider":{
      "id":"2a2b72ca-980b-4c24-8e33-a26b2820a3db"
   }
}

Legacy Address Format

{
   "storeId":"002MKC",
   "storeName":"Milton Keynes",
   "city":"Milton Keynes",
   "postCode":"MK9 1GW",
   "countryCode":"GBR",
   "address":"Elder Gate",
   "latitude":52.035538,
   "longitude":-0.774214,
   "telephoneNumber":"+441908237494",
   "email":"mkstore@askjeeves.com",
   "logoUrl":"http://logo.metapack.com/testlogo.gif",
   "photoUrls":[
      "http://logo.metapack.com/testlogo.gif",
      "http://logo.metapack.com/testlogo.gif"
   ],
   "hasDisabledAccess":true,
   "description":null,
   "tags":[
       "a",
       "b",
       "c"
   ],
   "locationProvider":{
      "id":"2a2b72ca-980b-4c24-8e33-a26b2820a3db"
   }
}

Response

HTTP/1.1 200 OK
{
   "rel":"self",
   "href":"/locations/c06c2305-1b33-43d2-8695-72a88a9cda61"
}

Failure

Request error; e.g. invalid JSON object:

HTTP/1.1 400 BAD REQUEST

User doesn't have the required permission:

HTTP/1.1 403 FORBIDDEN
HTTP/1.1 404 NOT FOUND

Other errors:

HTTP/1.1 500 INTERNAL SERVER ERROR

results matching ""

    No results matching ""