Save testimonials

Overview

Set the business's testimonials.

Use this to add or edit them.

You'll need the testimonials.

They're saved. Each save replaces all of the account's testimonials, so send the full list (at least one).

Prerequisites

Base URL

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

Endpoint

POST /api/v1/account/faq/testimonials

Authentication

Partner or Account token

  • company_id must be inside your own account tree. A Partner token can use any account under the partner; an Account token only its own account.
  • An account outside your tree, or one that doesn't exist, is rejected with 422.

Rate limit

This endpoint has no rate limit.

Request parameters

None.

Request body

FieldTypeRequiredDescription
company_idintegerYesThe account. Must exist and be inside your account tree.
testimonialsarray of objectsYesThe full list of testimonials, at least one. Replaces the saved list.
testimonials[].contentstringYesThe testimonial, as HTML.

Request payload

{
  "company_id": 5994,
  "testimonials": [
    {
      "content": "<p>Great service, highly recommend!</p>"
    },
    {
      "content": "<p>The team was fantastic.</p>"
    }
  ]
}

Response body

The payload is inside data.

FieldTypeDescription
statusstringsuccess.
messagestringTestimonials saved successfully.

Response payload

{
  "data": {
    "status": "success",
    "message": "Testimonials saved successfully"
  }
}

Examples

Success payload

See Response payload.

Error payload

422 testimonials is missing or empty

{
  "message": "The testimonials field is required.",
  "errors": {
    "testimonials": [
      "The testimonials field is required."
    ]
  }
}

422 A testimonial has no content

{
  "message": "The testimonials.0.content field is required.",
  "errors": {
    "testimonials.0.content": [
      "The testimonials.0.content field is required."
    ]
  }
}

422 Account outside your tree

{
  "message": "The selected company id does not belong to your company hierarchy.",
  "errors": {
    "company_id": [
      "The selected company id does not belong to your company hierarchy."
    ]
  }
}
StatusMeaning
200The testimonials were saved.
401The token is missing, expired or invalid.
422testimonials is missing or empty, an entry has no content, or company_id is missing, doesn't exist or is outside your tree.
500Unexpected server error.

Example request

curl --request POST \
  --url "https://production-api.shoutaboutus.com/api/v1/account/faq/testimonials" \
  --header 'Authorization: Bearer <bearer-token>' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"company_id": 5994, "testimonials": [{"content": "<p>Great service, highly recommend!</p>"}, {"content": "<p>The team was fantastic.</p>"}]}'

Did this page help you?