Download a sample file
Overview
Get the sample file saved with a file format.
Use this to build your export to match.
You'll need the mapping id.
Returns the file's URL, name, size and type; download the file from file_path.
Prerequisites
- A bearer token. See Authentication.
- The file format's id (
fileHeaderId), from Define a file format or Get a campaign's file format.
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
Account token
- The file format's campaign must be an
automationcampaign in your own account; otherwise403.
Rate limit
This endpoint has no rate limit.
Request parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
fileHeaderId | path | integer | Yes | The file format id (data.id from Define a file format). Digits only. |
Request body
None.
Request payload
None.
Response body
The payload is inside data.
| Field | Type | Description |
|---|---|---|
status | string | success. |
data | object | The sample file. |
data.file_path | string | URL to download the file from. |
data.file_name | string | The file's name. |
data.file_size | integer | Size in bytes. |
data.file_type | string | The file's MIME type. |
Response payload
{
"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"
}
}
}Examples
Success payload
See Response payload.
Error payload
403 Not your file format
{
"message": "Not authorized to access this sample file",
"status": "error",
"errors": []
}404 File format not found
{
"message": "File header configuration not found",
"status": "error",
"errors": []
}404 Sample file not found
{
"message": "Sample file not found",
"status": "error",
"errors": []
}| Status | Meaning |
|---|---|
200 | The sample file's details. |
401 | The token is missing, expired or invalid. |
403 | The file format's campaign isn't an automation campaign in your account. |
404 | No file format has that id, or its sample file no longer exists. |
500 | Unexpected server error. |
Example request
curl --request GET \
--url "https://production-api.shoutaboutus.com/api/v1/campaign/automate/file-headers/4/sample-file" \
--header 'Authorization: Bearer <bearer-token>' \
--header 'Accept: application/json'Updated 17 days ago
Did this page help you?
