GET
/v1/adverts/audio
List audio adverts with durations
Overview
Returns a paginated list of audio advertising content. Use these for announcements, jingles, and background audio on digital signage displays.
Request
Endpoint
HTTP Request
GET https://api.pixelsuite.com.au/v1/adverts/audio
Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
page | integer | No | 1 | Page number |
limit | integer | No | 50 | Results per page (max: 100) |
search | string | No | - | Search by title |
Example Request
cURL
curl -X GET "https://api.pixelsuite.com.au/v1/adverts/audio" \
-H "Authorization: Bearer YOUR_API_KEY"
Response
JSON
{
"success": true,
"data": {
"audioAdverts": [
{
"ID": 42,
"title": "Store Opening Jingle",
"description": "Welcome audio for store opening",
"length": 15.5,
"revision": 2,
"dateCreated": "2025-11-20 14:30:00",
"file": {
"ID": 789,
"key": "audio/store-jingle.mp3",
"displayName": "Store Opening Jingle",
"mimeType": "audio/mpeg",
"fileSize": 245760,
"dateCreated": "2025-11-20 14:30:00"
}
}
],
"pagination": {
"page": 1,
"limit": 50,
"total": 8,
"totalPages": 1,
"hasMore": false
}
}
}
Response Fields
| Field | Type | Description |
|---|---|---|
ID | integer | Audio advert ID |
title | string | Audio title |
length | float | Duration in seconds |
file | object | Audio file S3 information |
Code Examples
PHP
<?php
$apiKey = 'YOUR_API_KEY';
$url = 'https://api.pixelsuite.com.au/v1/adverts/audio';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ["Authorization: Bearer {$apiKey}"]);
$response = curl_exec($ch);
$data = json_decode($response, true);
if ($data['success']) {
foreach ($data['data']['audioAdverts'] as $audio) {
echo "{$audio['title']} - {$audio['length']}s\n";
}
}
curl_close($ch);
JavaScript
const apiKey = 'YOUR_API_KEY';
fetch('https://api.pixelsuite.com.au/v1/adverts/audio', {
headers: { 'Authorization': `Bearer ${apiKey}` }
})
.then(res => res.json())
.then(data => {
if (data.success) {
data.data.audioAdverts.forEach(audio => {
console.log(`${audio.title} - ${audio.length}s`);
});
}
});
Python
import requests
api_key = 'YOUR_API_KEY'
headers = {'Authorization': f'Bearer {api_key}'}
response = requests.get(
'https://api.pixelsuite.com.au/v1/adverts/audio',
headers=headers
)
data = response.json()
if data['success']:
for audio in data['data']['audioAdverts']:
print(f"{audio['title']} - {audio['length']}s")