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
- A Partner or Account token. See Authentication.
- The account's id (
brandId). Get one account gives you the current values to start from.
Base URL
| Environment | URL |
|---|---|
| Production | https://production-api.shoutaboutus.com |
| Development | https://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
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
brandId | path | integer | Yes | The account's id. |
Request body
Every field is written on each call. An optional field you leave out is set to empty.
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | The account (business) name. Max 100 characters, no < or >. |
website | string | No | The business website. Must be a valid URL. |
billing_id | string | No | Your billing reference for the account. Max 100 characters, no < or >. |
client_account_id | string | No | Your own id for the account. Max 100 characters, no < or >. |
phone | string | No | The business phone. 9 to 15 characters. |
address | string | Yes | Street address. Max 255 characters, no < or >. |
city_id | integer | Conditional | The 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. |
city | string | Conditional | The 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. |
state | string | Conditional | The 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. |
country | string | Conditional | The 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. |
companyindustry_id | integer | Yes | The industry. Must be an existing, active industry id. |
postal_code | string | Yes | Postal code. 3 to 12 characters, no < or >. |
first_name | string | Yes | The owner's first name. Max 100 characters. |
last_name | string | No | The owner's last name. Max 100 characters. |
owner_email | string | Yes | The owner's email address. Must not belong to another user. The domain must accept mail (it's checked with a DNS lookup). |
owner_phone | string | No | The owner's phone. 9 to 15 characters. |
override_locations | array of strings | No | Accepted 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. |
Don't have a
city_id? Send the city, state and country names instead ofcity_id, for example"city": "Austin", "state": "TX", "country": "US". The response'sgeoobject returns thecity_idthat was used, so you can store it for next time.
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.
| Field | Type | Description |
|---|---|---|
status | string | success. |
message | string | Account has been updated successfully! |
accountId | object | The account. |
accountId.label | string | The account's name, plus - <client_account_id> when it has one. |
accountId.value | integer | The account's id. |
stores_updated | integer | With override_locations, the number of the account's locations counted; otherwise 0. |
overrides_applied | array of strings | The override_locations values you sent, or []. |
geo | object | The city saved on the record. |
geo.city_id | integer | The city's id. When you sent city text, this is the city it matched or added. |
geo.state_id | integer | The city's state id. |
geo.country_id | integer | The city's country id. |
geo.city_created | boolean | true when the city was added from your city / state / country text; otherwise false. |
Response payload
{
"data": {
"status": "success",
"message": "Account has been updated successfully!",
"accountId": {
"label": "Acme Brand - ACC-001",
"value": 6021
},
"stores_updated": 0,
"overrides_applied": [],
"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 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 9 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."],
"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."]
}
}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."]
}
}| Status | Meaning |
|---|---|
200 | The account is updated. |
401 | The token is missing, expired or invalid. |
403 | The account belongs to another partner. |
404 | Account not found.: the id is unknown, not an account, or outside your account tree. |
422 | The request failed validation. The response names the fields. |
500 | Unexpected 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"}'Updated about 10 hours ago
