Folders

This endpoint can be used to get, create, update and remove folders to store advertisements

Reference

GET /folders/<userId>[/<folderId>]

Retrieve one or more folders associated with this user

POST /folders/

Create a new folder

PUT /folders/

Update an existing folder

DELETE /folders/

Remove a folder

General search parameters

field type description/constraints Req W U
useCache boolean Use API caching module No No No
page int Show page x from resultset (default: 1) No No No
itemsPerPage int Number of items per page
Minimum: 1 item
Maximum 100 items
(default: 25)
No No No


Fields

field type constraints Req W U
userId int Yes Yes No
folderId int Yes Yes No
description string max 255 characters Yes Yes Yes


Example retrieving Folders

Request

GET /rest/v1/folders/12311/ HTTP/2

Response

{
 "result": true,
 "errors": [],
 "data": [
   {
     "folderId": 2276,
     "userId": 12311,
     "description": "test1"
   },
   {
     "folderId": 2277,
     "userId": 12311,
     "description": "test2"
   }
 ]
}


Example creating Folders

Request

POST /rest/v1/folders/ HTTP/2
{
 "userId": 12311,
 "description": "Nieuwe folder 3"
}

Response

{
 "result": true,
 "errors": [],
 "data": [
   {
     "folderId": 2282,
     "userId": 12311,
     "description": "Nieuwe folder 3"
   }
 ]
}


Example removing Folders

Request

DELETE /rest/v1/folders/ HTTP/2
{
 "userId": 12311,
 "folderId": 2282
}

Response

{
 "result": true,
 "errors": [],
 "data": [
   {
     "folderId": 2276,
     "userId": 12311,
     "description": "test1"
   },
   {
     "folderId": 2277,
     "userId": 12311,
     "description": "test2"
   },
   {
     "folderId": 2280,
     "userId": 12311,
     "description": "Nieuwe folder"
   },
   {
     "folderId": 2281,
     "userId": 12311,
     "description": "Nieuwe folder 2"
   }
 ]
}