Skip to main content

Get All Custom adv

This endpoint retrieves all custom adv.

info

This operation requires authentication only if content_availability community option is false.

This operation requires custom_adv_enabled community option set to true.

If custom_adv_only_for_anonymous_users_enabled community option is set to true the results will be returned only for anonymous users.

If the user is administrator or editor all adv (active or not) are returned, while only the active ones are returned if the user is normal

HTTP Request

GET /api/v2/custom_adv/

Parameters

NameInTypeRequiredDescription
limitqueryintegerfalseNumber of results to return per page.
offsetqueryintegerfalseThe initial index from which to return the results.
positionquerystringfalseFilter using field position.
categoryquerystringfalseFilter using field category.
activequerystringfalseFilter using field active (only if user is administrator or editor)
searchquerystringfalseA search term.

Example Request


const headers = {
'Accept':'application/json',
'Authorization': 'Bearer {access_token}'
};

fetch('/api/v2/custom_adv/',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});

Responses

StatusMeaningDescriptionSchema
200OKResponse status codeInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» countintegerfalsenoneTotal results count
» nextstring(uri)¦nullfalsenoneNext page url
» previousstring(uri)¦nullfalsenonePrevious page url
» resultslist(Custom Adv)falsenoneList of results

Example responses

{
"count": "integer",
"next": "string(uri)",
"previous": "string(uri)",
"results": [
{
"id": "integer",
"position": "string",
"title": "string",
"link": "string(uri)",
"image": "string",
"embed_code": "string",
"active": "boolean",
"created_at": "string",
"lastmod_datetime": "string",
"category": "integer",
"created_by": "integer"
}
]
}