Edit a location

Overview

Change a location's name, label, your client_location_id, address, website, or phone numbers.

Use this when a location moves, renames, or its contact details change.

You'll need the store_id and the full set of location fields (this replaces the record, so send everything, not just what changed). An optional field you leave out is cleared.

Returns the location's id. A location with the same name, address, postal code and city as another location is rejected.

Prerequisites

Base URL

EnvironmentURL
Productionhttps://production-api.shoutaboutus.com
Developmenthttps://development-api.shoutaboutus.com

Endpoint

POST /api/v1/partner/store/{storeId}/update

Authentication

Partner token

  • The location must be inside your account tree; otherwise 404.
  • A location that belongs to another partner returns 403.

Rate limit

This endpoint has no rate limit.

Request parameters

ParameterInTypeRequiredDescription
storeIdpathintegerYesThe location's id.

Request body

Every field is written on each call. An optional field you leave out is set to empty.

FieldTypeRequiredDescription
namestringYesThe location's name. Max 255 characters, no < or >.
storeidstringNoA display label for the location (for example NYC01), not the numeric id. Max 100 characters, no < or >.
client_location_idstringNoYour own id for the location. Max 100 characters, no < or >. Saved as "" when left out.
addressstringYesStreet address. Max 255 characters, no < or >.
city_idintegerConditionalThe city's id. Required unless you send city, state and country. Must be an existing city id. When you send both, city_id is used and the text is ignored.
citystringConditionalThe city name, e.g. Austin. Required, with state and country, when you don't send city_id. Max 100 characters, no < or >. Matched within the state, ignoring case, accents and extra spaces. A city we don't have yet is added.
statestringConditionalThe state code or name, e.g. TX or Texas. Required when you don't send city_id. Must be a state we have for that country; otherwise 422.
countrystringConditionalThe two-letter ISO country code or the country name, e.g. US or United States. Required when you don't send city_id. Must be a country we have; otherwise 422.
postal_codestringYesPostal code. 3 to 12 characters, no < or >.
site_urlstringNoThe location's website. Must be a valid URL.
phonestringNoA secondary phone line. 9 to 15 characters.
company_phonestringNoThe primary business phone. 9 to 15 characters.
📍

Don't have a city_id? Send the city, state and country names instead of city_id, for example "city": "Austin", "state": "TX", "country": "US". The response's geo object returns the city_id that was used, so you can store it for next time.

Request payload

{
  "name": "Acme Plumbing - North",
  "storeid": "NORTH-01",
  "client_location_id": "loc-001",
  "address": "14 King Street",
  "city_id": 3243,
  "postal_code": "2000",
  "site_url": "https://acmebrand.com",
  "company_phone": "0291234567"
}

Response body

The payload is inside data.

FieldTypeDescription
statusstringsuccess.
messagestringLocation has been updated successfully!
storeIdintegerThe location's id.
review_sites_backfilledintegerReview site connection slots that were missing for the location's plan and were added by this call. Usually 0.
geoobjectThe city saved on the record.
geo.city_idintegerThe city's id. When you sent city text, this is the city it matched or added.
geo.state_idintegerThe city's state id.
geo.country_idintegerThe city's country id.
geo.city_createdbooleantrue when the city was added from your city / state / country text; otherwise false.

Response payload

{
  "data": {
    "status": "success",
    "message": "Location has been updated successfully!",
    "storeId": 3076,
    "review_sites_backfilled": 0,
    "geo": {
      "city_id": 3243,
      "state_id": 3909,
      "country_id": 14,
      "city_created": false
    }
  }
}

Examples

Success payload

See Response payload. When you send city, state and country instead of city_id, the shape is the same; geo holds the city that was matched, and geo.city_created is true if it was added.

Error payload

403 Another partner's location

{
  "message": "Forbidden",
  "status": "error",
  "errors": "You do not have access to this store."
}

404 Store not found

{
  "message": "Not Found",
  "status": "error",
  "errors": "Store not found."
}

422 Required fields missing

{
  "message": "The name field is required. (and 6 more errors)",
  "errors": {
    "name": ["The name field is required."],
    "address": ["The address field is required."],
    "city_id": ["Provide city_id, or city, state and country."],
    "city": ["The city field is required when city id is not present."],
    "state": ["The state field is required when city id is not present."],
    "country": ["The country field is required when city id is not present."],
    "postal_code": ["The postal code field is required."]
  }
}

422 Unknown state or country

Sent when you use city text and the state or country doesn't match one we have. Nothing is created.

{
  "message": "Unknown state 'TXX' for United States. Use the state code (e.g. OH) or its full name.",
  "errors": {
    "state": ["Unknown state 'TXX' for United States. Use the state code (e.g. OH) or its full name."]
  }
}

500 Duplicate location

Another location already has the same name, address, postal code and city.

{
  "message": "This location is already registered!",
  "status": "error",
  "errors": []
}
StatusMeaning
200The location is updated.
401The token is missing, expired or invalid.
403The location belongs to another partner.
404The location doesn't exist or is outside your account tree, or its data is incomplete.
422The request failed validation. The response names the fields.
500Duplicate location, or unexpected server error.

Example request

curl --request POST \
  --url "https://production-api.shoutaboutus.com/api/v1/partner/store/3076/update" \
  --header 'Authorization: Bearer <bearer-token>' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"name": "Acme Plumbing - North", "storeid": "NORTH-01", "client_location_id": "loc-001", "address": "14 King Street", "city_id": 3243, "postal_code": "2000", "site_url": "https://acmebrand.com", "company_phone": "0291234567"}'

Did this page help you?