Get sample file info
Overview
Get the S3 URL and metadata (name, size, mime type) for the sample file attached to a file-header configuration. The {id} path segment is the file-header id.
Prerequisites
- A bearer token in the
Authorizationheader. - The
fileHeaderIdof the record you are targeting.
Base URL
| Environment | URL |
|---|---|
| Production | https://production-api.shoutaboutus.com |
| Development | https://development-api.shoutaboutus.com |
Endpoint
GET /api/v1/campaign/automate/file-headers/{fileHeaderId}/sample-file
Authentication
-
Requires a bearer token in the
Authorization: Bearer <bearer-token>header. -
Account bearer. The owning campaign must belong to the caller's
person.company_idand be of typeautomation, else403.
Rate limit
- No rate limit.
Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
fileHeaderId | integer | Required | The file-header id (route constrained to [0-9]+). |
How it works
200withdata.data={ file_path (S3 URL), file_name, file_size (bytes), file_type (mime) }.403if the caller does not own the config's campaign or is not an automation campaign.404if the file-header row is missing, or itssample_file_pathno longer exists on S3.
Response
200 OK · 200
200{
"data": {
"status": "success",
"data": {
"file_path": "https://d2ny6zb7otrnhl.cloudfront.net/campaign_automation/sample_files/1718447400_sample.xlsx",
"file_name": "1718447400_sample.xlsx",
"file_size": 10240,
"file_type": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
}
}
}404 Sample file not found · 404
404{
"message": "Sample file not found",
"status": "error",
"errors": []
}Errors
| Status | Meaning |
|---|---|
401 | The bearer token is missing, expired or invalid |
403 | The token is valid but the record sits outside your account |
404 | Sample file not found |
500 | Unexpected server error |
Example request
curl --request GET \
--url "https://production-api.shoutaboutus.com/api/v1/campaign/automate/file-headers/123/sample-file" \
--header 'Authorization: Bearer <bearer-token>' \
--header 'Accept: application/json'Updated 18 days ago
Did this page help you?
