Get All Banners
GET
/api/v1/banners
const url = 'https://example.com/api/v1/banners?only_active=false&platform=USER_PORTAL&limit=100&offset=0&order_by=created_at&order_by_direction=ASC';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://example.com/api/v1/banners?only_active=false&platform=USER_PORTAL&limit=100&offset=0&order_by=created_at&order_by_direction=ASC'Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters”only_active
Only Active
If True, returns only active banners. Default: False
boolean
If True, returns only active banners. Default: False
platform
BannerPlatform
If value, returns only banners assigned to the corresponding platform. Default: None
string
If value, returns only banners assigned to the corresponding platform. Default: None
limit
Limit
integer
offset
Offset
integer
order_by
Order By
string
order_by_direction
SortDirection
string
Responses
Section titled “ Responses ”Successful Response
Media typeapplication/json
HeaderPaginatedResponse[ProducedBannerResponse]
object
status
JSendStatus
string
message
Message
string
code
Code
string
data
required
Data
Array<object>
ProducedBannerResponseResponse to a request for banners to display on a page
object
id
required
Id
string format: uuid
banner_message
required
Banner Message
string
start_datetime
required
Start Datetime
string format: date-time
end_datetime
required
End Datetime
string format: date-time
level
required
BannerLevel
string
platform
required
BannerPlatform
string
pagination
required
JSendPagination
Pagination information
object
total
required
Total
integer
start
required
Start
integer
end
required
End
integer
Example
{ "status": "success", "message": "OK.", "code": "200", "data": [ { "level": "INFO", "platform": "USER_PORTAL" } ]}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ]}