User AdSettings
This endpoint can be used to create/update global ad-settings for all advertisements associated with the specified user.
Reference
GET /user/adsettings/<userId>/[<portal>]
Retrieve the current global-adsettings per portal
POST /user/adsettings/
Created/replace the current global-adsettings per portal
Fields
field | type | constraints | Req | W | U |
---|---|---|---|---|---|
userId | int | Yes | Yes | No | |
settings | array | A list of UserAdSettings-objects | Yes | Yes | Yes |
Fields User AdSettings
field | type | constraints | Req | W | U |
---|---|---|---|---|---|
portal | string | Available options: | Yes | Yes | Yes |
- marktplaats | |||||
- tweedehands | |||||
- website | |||||
header | text | text to show before the ad description | Yes | Yes | Yes |
max 16.384 characters | |||||
Available HTML tags | |||||
<p> </p> |
|||||
<b> </b> |
|||||
<strong> </strong> |
|||||
<u> </u> |
|||||
<ul> </ul> |
|||||
<li> </li> |
|||||
<br /> <br/> |
|||||
footer | text | text to show after the ad description | Yes | Yes | Yes |
max 16.384 characters | |||||
Available HTML tags | |||||
<p> </p> |
|||||
<b> </b> |
|||||
<strong> </strong> |
|||||
<u> </u> |
|||||
<ul> </ul> |
|||||
<li> </li> |
|||||
<br /> <br/> |
|||||
allowContactByEmail | boolean | Allow portal visitors to contact advertiser by email | No | Yes | Yes |
default: true |
Example retrieving User AdSettings
Request
GET /user/adsettings/12311/
Response
{
"result": true,
"errors": [],
"data": {
"userId": 12311,
"settings": [
{
"portal": "marktplaats",
"header": "TWEEDEKERSTDAG GEOPEND VAN 11:00 tot 17:00!",
"footer": "Openingstijden:<br/><br/>Maandag t/m vrijdag van 09:00 tot 17:00<br/>Zaterdag van 09:00 tot 15:00<br/>Zondag: gesloten!<br/><br/>",
"allowContactByEmail": true
},
{
"portal": "tweedehands",
"header": "TWEEDEKERSTDAG GEOPEND VAN 11:00 tot 17:00!",
"footer": "Openingstijden:<br/><br/>Maandag t/m vrijdag van 09:00 tot 17:00<br/>Zaterdag van 09:00 tot 15:00<br/>Zondag: gesloten!<br/><br/>",
"allowContactByEmail": true
},
{
"portal": "website",
"header": "TWEEDEKERSTDAG GEOPEND VAN 11:00 tot 17:00!",
"footer": "Openingstijden:<br/><br/>Maandag t/m vrijdag van 09:00 tot 17:00<br/>Zaterdag van 09:00 tot 15:00<br/>Zondag: gesloten!<br/><br/>",
"allowContactByEmail": false
}
]
}
}
Example updating User AdSettings
Request
POST /user/adsettings/
{
"userId": 12311,
"settings": [
{
"portal": "marktplaats",
"header": "TWEEDEKERSTDAG GEOPEND VAN 11:00 tot 17:00!",
"footer": "Openingstijden:<br/><br/>Maandag t/m vrijdag van 09:00 tot 17:00<br/>Zaterdag van 09:00 tot 15:00<br/>Zondag: gesloten!<br/><br/>",
"allowContactByEmail": true
},
{
"portal": "tweedehands",
"header": "TWEEDEKERSTDAG GEOPEND VAN 11:00 tot 17:00!",
"footer": "Openingstijden:<br/><br/>Maandag t/m vrijdag van 09:00 tot 17:00<br/>Zaterdag van 09:00 tot 15:00<br/>Zondag: gesloten!<br/><br/>",
"allowContactByEmail": true
},
{
"portal": "website",
"header": "TWEEDEKERSTDAG GEOPEND VAN 11:00 tot 17:00!",
"footer": "Openingstijden:<br/><br/>Maandag t/m vrijdag van 09:00 tot 17:00<br/>Zaterdag van 09:00 tot 15:00<br/>Zondag: gesloten!<br/><br/>",
"allowContactByEmail": true
}
]
}
Response
{
"result": true,
"errors": [],
"data": {
"userId": 12311,
"settings": [
{
"portal": "marktplaats",
"header": "TWEEDEKERSTDAG GEOPEND VAN 11:00 tot 17:00!",
"footer": "Openingstijden:<br/><br/>Maandag t/m vrijdag van 09:00 tot 17:00<br/>Zaterdag van 09:00 tot 15:00<br/>Zondag: gesloten!<br/><br/>",
"allowContactByEmail": true
},
{
"portal": "tweedehands",
"header": "TWEEDEKERSTDAG GEOPEND VAN 11:00 tot 17:00!",
"footer": "Openingstijden:<br/><br/>Maandag t/m vrijdag van 09:00 tot 17:00<br/>Zaterdag van 09:00 tot 15:00<br/>Zondag: gesloten!<br/><br/>",
"allowContactByEmail": true
},
{
"portal": "website",
"header": "TWEEDEKERSTDAG GEOPEND VAN 11:00 tot 17:00!",
"footer": "Openingstijden:<br/><br/>Maandag t/m vrijdag van 09:00 tot 17:00<br/>Zaterdag van 09:00 tot 15:00<br/>Zondag: gesloten!<br/><br/>",
"allowContactByEmail": true
}
]
}
}