Skip to main content

Search Custom Adv

This endpoint performs search of a 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.

HTTP Request

GET /api/v2/custom_adv/search/

Parameters

NameInTypeRequiredDescription
limitqueryintegerfalseNumber of results to return per adv
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/search/',
{
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"
}
]
}