# Advertisements
# Get Advertisements List
By using this API endpoint, it is possible to get the list of advertisement.
Please note that you cannot get more than 100 records per request. In case you need to get more than 100 records, then you should make more than one request.
# Endpoint
GET /advertisements
# Parameters
Name | Type | Description |
---|---|---|
title | string | Title of the advertisement. Performs text-search. |
type | int | Advertisement Type: 0: Text 1: Image |
url | string | Url of the advertisement. Performs text-search. |
status | int | Advertisement Status: 0: Draft 1: Published |
tag_id | string | Tag of the advertisement. Performs text-search with hashed tag id. |
start_date | date | Returns entries started after the entered starting date (format: yyyy-mm-dd) |
end_date | date | Returns entries ended before the entered ending date (format: yyyy-mm-dd) |
page | string | The number of page returned. Default is 1. |
per_page | int | The number of records returned. Default is 25, maximum is 100 |
# Response
TIP
HTTP/1.1 200 OK
{
"data": [
{
"id": "jkDvjePrZ7y",
"title": "test",
"type": 0,
"method": 1,
"condition_value": 2,
"impression_count": 0,
"click_count": 0,
"status": 1,
"start_date": "2021-01-24T21:00:00.000000Z",
"end_date": "2021-02-01T20:59:59.000000Z",
"tags": []
},
{
"id": "0mqryGZBb4N",
"title": "Test123",
"type": 1,
"method": 1,
"condition_value": 0,
"impression_count": 0,
"click_count": 0,
"status": 0,
"start_date": "2021-03-29T21:00:00.000000Z",
"end_date": "2021-04-06T20:59:59.000000Z",
"tags": [
{
"id": "WZgBAelB9wD",
"name": "advertisement",
"group_name": "a"
}
]
}
],
"links": {
"first": "https://api.iperawifi.com/api/v1/advertisements?page=1",
"last": null,
"prev": null,
"next": "https://api.iperawifi.com/api/v1/advertisements?page=2"
},
"meta": {
"current_page": 1,
"from": 1,
"path": "https://api.iperawifi.com/api/v1/advertisements",
"per_page": 25,
"to": 2
}
}
# Get Advertisement Count
By using this API endpoint, it is possible to get the count of the advertisement.
# Endpoint
GET /advertisements/count
# Parameters
Name | Type | Description |
---|---|---|
title | string | Title of the advertisement. Performs text-search. |
type | int | Advertisement Type: 0: Text 1: Image |
url | string | Url of the advertisement. Performs text-search. |
status | int | Advertisement Status: 0: Draft 1: Published |
tag_id | string | Tag of the advertisement. Performs text-search with hashed tag id. |
start_date | date | Returns entries started after the entered starting date (format: yyyy-mm-dd) |
end_date | date | Returns entries ended before the entered ending date (format: yyyy-mm-dd) |
page | string | The number of page returned. Default is 1. |
per_page | int | The number of records returned. Default is 25, maximum is 100 |
# Response
TIP
HTTP/1.1 200 OK
{
"count": 1000
}