Edit an account

Overview

Change an account's business details or owner information.

Use this when a business renames, moves, or changes its primary contact. The plan isn't changed here; use Assign or change an account's plan.

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

Returns the account's id and label.

Prerequisites

Base URL

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

Endpoint

POST /api/v1/partner/account/{brandId}/update

Authentication

Partner or Account token

  • An Account token reaches only its own account.
  • The account must be inside your account tree. An id that doesn't exist, isn't an account, or is outside your tree returns 404.
  • An account that belongs to another partner returns 403.

Rate limit

This endpoint has no rate limit.

Request parameters

ParameterInTypeRequiredDescription
brandIdpathintegerYesThe account's id.

Request body

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

FieldTypeRequiredDescription
namestringYesThe account (business) name. Max 100 characters, no < or >.
websitestringNoThe business website. Must be a valid URL.
billing_idstringNoYour billing reference for the account. Max 100 characters, no < or >.
client_account_idstringNoYour own id for the account. Max 100 characters, no < or >.
phonestringNoThe business phone. 9 to 15 characters.
addressstringYesStreet address. Max 255 characters, no < or >.
city_idintegerYesThe city. Must be an existing city id.
companyindustry_idintegerYesThe industry. Must be an existing, active industry id.
postal_codestringYesPostal code. 3 to 12 characters, no < or >.
first_namestringYesThe owner's first name. Max 100 characters.
last_namestringNoThe owner's last name. Max 100 characters.
owner_emailstringYesThe owner's email address. Must not belong to another user. The domain must accept mail (it's checked with a DNS lookup).
owner_phonestringNoThe owner's phone. 9 to 15 characters.
override_locationsarray of stringsNoAccepted for compatibility. The only allowed value is plan_id, and it doesn't change any location; it's counted in stores_updated and echoed in overrides_applied.

Request payload

{
  "name": "Acme Brand",
  "website": "https://acmebrand.com",
  "billing_id": "BILL-001",
  "client_account_id": "ACC-001",
  "phone": "1234567890",
  "address": "1 George St",
  "city_id": 3243,
  "companyindustry_id": 37,
  "postal_code": "2000",
  "first_name": "Jane",
  "last_name": "Smith",
  "owner_email": "<owner-email>",
  "owner_phone": "9876543210"
}

Response body

The payload is inside data.

FieldTypeDescription
statusstringsuccess.
messagestringAccount has been updated successfully!
accountIdobjectThe account.
accountId.labelstringThe account's name, plus - <client_account_id> when it has one.
accountId.valueintegerThe account's id.
stores_updatedintegerWith override_locations, the number of the account's locations counted; otherwise 0.
overrides_appliedarray of stringsThe override_locations values you sent, or [].

Response payload

{
  "data": {
    "status": "success",
    "message": "Account has been updated successfully!",
    "accountId": {
      "label": "Acme Brand - ACC-001",
      "value": 6021
    },
    "stores_updated": 0,
    "overrides_applied": []
  }
}

Examples

Success payload

See Response payload.

Error payload

403 Another partner's account

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

404 Account not found

{
  "message": "Not Found",
  "status": "error",
  "errors": "Account 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": ["The city id field is required."],
    "companyindustry_id": ["Please select an industry for the account."],
    "postal_code": ["The postal code field is required."],
    "first_name": ["The first name field is required."],
    "owner_email": ["The owner email field is required."]
  }
}
StatusMeaning
200The account is updated.
401The token is missing, expired or invalid.
403The account belongs to another partner.
404Account not found.: the id is unknown, not an account, or outside your account tree.
422The request failed validation. The response names the fields.
500Unexpected server error.

Example request

curl --request POST \
  --url "https://production-api.shoutaboutus.com/api/v1/partner/account/6021/update" \
  --header 'Authorization: Bearer <bearer-token>' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"name": "Acme Brand", "website": "https://acmebrand.com", "billing_id": "BILL-001", "client_account_id": "ACC-001", "phone": "1234567890", "address": "1 George St", "city_id": 3243, "companyindustry_id": 37, "postal_code": "2000", "first_name": "Jane", "last_name": "Smith", "owner_email": "<owner-email>", "owner_phone": "9876543210"}'

Did this page help you?