Upload gallery images
Overview
Add images to the business's gallery.
Use this to build a photo gallery.
You'll need the image files.
Returns the uploaded images. Send the request as multipart/form-data, with one images[] part per file.
Prerequisites
- A bearer token. See Authentication.
- The account's id (
company_id). - JPEG or PNG files, up to 2048 KB each.
Base URL
| Environment | URL |
|---|---|
| Production | https://production-api.shoutaboutus.com |
| Development | https://development-api.shoutaboutus.com |
Endpoint
POST /api/v1/account/images/save
Authentication
Partner or Account token
company_idmust 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
Sent as multipart/form-data.
| Field | Type | Required | Description |
|---|---|---|---|
company_id | integer | Yes | The account. Must exist and be inside your account tree. |
type | string | Yes | Which gallery: partners or campaign. |
images[] | file (one or more) | Yes | One or more image files. Each must be a JPEG or PNG, at most 2048 KB. |
status | string | No | active (default) or inactive. Only active images are listed by Get gallery images. |
Request payload
Form fields:
company_id=5994
type=partners
images[]=@images/partner_logo.pngResponse body
The payload is inside data.
| Field | Type | Description |
|---|---|---|
status | string | success. |
message | string | Logos saved successfully!. |
data | array of objects | One entry per uploaded image. |
data[].id | integer | The image's id. Use it as image_id in Delete a gallery image. |
data[].name | string or null | The uploaded file's name (characters other than letters, digits, _, . and - become _). |
data[].type | string | partners or campaign. |
data[].status | string | active, or the status you sent. |
data[].path | string or null | The image's URL. |
Response payload
{
"data": {
"status": "success",
"message": "Logos saved successfully!",
"data": [
{
"id": 12,
"name": "partner_logo.png",
"type": "partners",
"status": "active",
"path": "https://d2ny6zb7otrnhl.cloudfront.net/account/images/partners/FJFBuzyn5khSrvAaJPN9IgKUsWfGQjXC9fw6SBhV.png"
}
]
}
}Examples
Success payload
See Response payload.
Error payload
422 type or images missing
{
"message": "The type field is required. (and 1 more error)",
"errors": {
"type": [
"The type field is required."
],
"images": [
"The images 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."
]
}
}| Status | Meaning |
|---|---|
200 | The images were uploaded. |
401 | The token is missing, expired or invalid. |
422 | A required field is missing, a file isn't a JPEG or PNG or is over 2048 KB, or company_id doesn't exist or is outside your tree. |
500 | Unexpected server error, or a file couldn't be stored. |
Example request
curl --request POST \
--url "https://production-api.shoutaboutus.com/api/v1/account/images/save" \
--header 'Authorization: Bearer <bearer-token>' \
--header 'Accept: application/json' \
--form 'company_id=5994' \
--form 'type=partners' \
--form 'images[]=@images/partner_logo.png'Updated 17 days ago
Did this page help you?
