Advertisement
List Advertisements
List all advertisements with pagination and filtering options.
Authorization
default AuthorizationBearer <token>
You can retrieve your token by logging in.
In: header
Query Parameters
page?|
Page number for pagination. Must be at least 1.
per_page?|
Number of items per page. Must be at least 1.
search?|
Search term for filtering advertisements.
sort?|
Sort column (e.g. created_at, type).
key_by?|
Key response by column.
includes*array<>
filter?object
filter.market_id?|
Filter by market ID. The id of an existing record in the markets table.
filter.types*array<>
filter.statuses*array<>
filter.start_at?|
Filter by start timestamp. Must be 13 digits.
filter.close_at?|
Filter by close timestamp. Must be 13 digits.
Header Parameters
X-API-Version*string
API contract version to target. See the Changelog for what changed in each version.
Default
"2.0.0"Value in
"2.3.0" | "2.2.0" | "2.1.0" | "2.0.0"Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "http://localhost:8000/api/v2/advertisements?page=1&per_page=20&search=promotion&sort=created_at&key_by=id&includes=quibusdam&filter.market_id=uuid&filter.types=BANNER&filter.statuses=REJECTED&filter.start_at=1704067200000&filter.close_at=1704153600000" \ -H "X-API-Version: 2.3.0"{
"meta": {
"code": 200,
"status": "success",
"message": "Data Loaded Successfully"
},
"data": {
"current_page": 1,
"data": [
{
"id": "aa773a97-2705-4840-9145-988d81011dde",
"market_id": "07928d80-350c-46eb-8786-91a40ca509a0",
"type": "BANNER",
"status": "PROCESS",
"content": "https://via.placeholder.com/640x480.png/003388?text=et",
"notes": "Temporibus eum iure maiores qui est fugit illo.",
"approved_by": "7fc83b52-de47-41c1-8d81-061ea24e1bb4",
"start_at": 1782824826048,
"close_at": 1782911226048,
"created_at": 1782824824133,
"updated_at": 1782824824133
},
{
"id": "6181eae3-424a-46f8-9948-79c7500826c7",
"market_id": "07928d80-350c-46eb-8786-91a40ca509a0",
"type": "BANNER",
"status": "PROCESS",
"content": "https://via.placeholder.com/640x480.png/006677?text=iste",
"notes": "Veritatis sit eius id repudiandae voluptatem pariatur molestiae.",
"approved_by": "cdaafd5e-ba6e-4435-8c50-6725d194e18d",
"start_at": 1782824826048,
"close_at": 1782911226048,
"created_at": 1782824824133,
"updated_at": 1782824824133
},
{
"id": "23caf46c-57ab-445d-b9f6-3869b9d38df3",
"market_id": "07928d80-350c-46eb-8786-91a40ca509a0",
"type": "BANNER",
"status": "ACCEPTED",
"content": "https://via.placeholder.com/640x480.png/003344?text=rerum",
"notes": "Consequatur consequatur id dolorem et et voluptate et.",
"approved_by": "03d40636-acfd-422a-a855-1f79ea044da0",
"start_at": 1782824826048,
"close_at": 1782911226048,
"created_at": 1782824824133,
"updated_at": 1782824824133
}
],
"first_page_url": "http://localhost:8000/api/v2/advertisements?page=1",
"from": 1,
"last_page": 1,
"last_page_url": "http://localhost:8000/api/v2/advertisements?page=1",
"links": [
{
"url": null,
"label": "« Previous",
"page": null,
"active": false
},
{
"url": "http://localhost:8000/api/v2/advertisements?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Next »",
"page": null,
"active": false
}
],
"next_page_url": null,
"path": "http://localhost:8000/api/v2/advertisements",
"per_page": 20,
"prev_page_url": null,
"to": 3,
"total": 3
}
}{
"meta": {
"code": 401,
"status": "error",
"message": "Unauthenticated."
},
"data": null
}{
"meta": {
"code": 403,
"status": "error",
"message": "Unauthorized."
},
"data": null
}{
"meta": {
"code": 404,
"status": "error",
"message": "Resource not found."
},
"data": null
}{
"meta": {
"code": 500,
"status": "error",
"message": "Internal server error."
},
"data": null
}