Apply one site login to many locations

Overview

Save a username and password for a review site and apply it to every location in an account at once.

Use this when a business uses one login for all its locations on a site. It saves setting credentials location by location.

You'll need the review_site_id, the credentials, and the account.

The credentials are saved on every active or pending location in the account that already has that review site set up, and review collection is switched on for them. Locations without that review site are skipped.

Prerequisites

Base URL

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

Endpoint

POST /api/v1/store-review-site/bulk-update

Authentication

Partner or Account token

  • account_id must be an account inside your own account tree. A Partner token can target any account under the partner; an Account token only its own account.
  • An account outside your tree is rejected with 422.

Rate limit

This endpoint has no rate limit.

Request parameters

None.

Request body

FieldTypeRequiredDescription
review_site_idintegerYesThe review site. Must exist.
usernamestringYesThe site's username. 2–1000 characters; no < or >. Accepted and saved, but not used yet: posting responses with a site login isn't supported, so this doesn't connect posting. It will be supported for review sites whose auth_type is default in a future release.
passwordstringYesThe site's password. 5–1000 characters; no < or >. Stored as sent. Accepted and saved, but not used yet: posting responses with a site login isn't supported, so this doesn't connect posting. It will be supported for review sites whose auth_type is default in a future release.
account_idintegerYesThe account. Must be an active account inside your account tree.
apply_to_future_storesstringNoY or N. Y also saves the login once on the account, so locations added later inherit it. N or left out: only the existing locations are updated.
📘

What apply_to_future_stores does, and doesn't. Either way, the credentials are written to every matching location and review collection is switched on for them. The flag controls only the extra account-level copy. N doesn't delete an account-level copy saved earlier with Y, so Get an account's saved site logins can still return that older login; remove it with DELETE /api/v1/store-review-site/company/credentials, called with the account's own token (a Partner token gets 422). If no copy was ever saved, the lookup returns nothing, which is expected. That lookup returns data as a single object for the requested review_site_id, or [] when nothing is saved, not an array of sites.

Request payload

{
  "review_site_id": 1,
  "username": "[email protected]",
  "password": "<your-password>",
  "account_id": 5994,
  "apply_to_future_stores": "Y"
}

Response body

The payload is inside data.

FieldTypeDescription
statusstringsuccess.
messagestringThe username and password has been updated successfully!

Response payload

{
  "data": {
    "status": "success",
    "message": "The username and password has been updated successfully!"
  }
}

Examples

Success payload

See Response payload.

Error payload

400 Account has no active or pending locations

{
  "message": "Bad Request",
  "status": "error",
  "errors": "Store not found!"
}

422 Missing fields

{
  "message": "The review site id field is required. (and 3 more errors)",
  "errors": {
    "review_site_id": [
      "The review site id field is required."
    ],
    "username": [
      "The username field is required."
    ],
    "password": [
      "The password field is required."
    ],
    "account_id": [
      "The account id field is required."
    ]
  }
}

422 Invalid values

{
  "message": "Username field cannot contain < or >, or invalid characters (and 2 more errors)",
  "errors": {
    "username": [
      "Username field cannot contain < or >, or invalid characters"
    ],
    "password": [
      "The password field must be at least 5 characters."
    ],
    "apply_to_future_stores": [
      "The selected apply to future stores is invalid."
    ]
  }
}

422 Account doesn't exist or is outside your tree

{
  "message": "The selected account id is invalid. (and 1 more error)",
  "errors": {
    "account_id": [
      "The selected account id is invalid.",
      "The selected account id does not belong to your company hierarchy."
    ]
  }
}
StatusMeaning
200The login was saved on the account's locations.
400Store not found!: the account has no active or pending locations.
401The token is missing, expired or invalid.
422A required field is missing or invalid, review_site_id doesn't exist, or the account doesn't exist or is outside your tree.
500Unexpected server error.

Example request

curl --request POST \
  --url "https://production-api.shoutaboutus.com/api/v1/store-review-site/bulk-update" \
  --header 'Authorization: Bearer <bearer-token>' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"review_site_id": 1, "username": "[email protected]", "password": "<your-password>", "account_id": 5994, "apply_to_future_stores": "Y"}'

Did this page help you?