Features
This endpoint can be used to either retrieve the available features for an advertisement and/or category at the specified portal or to add a feature to an advertisement at the specified portal.
Reference
GET /features/<portal>/<adId>
Retrieve the available features for the specified portal, category or advertisement.
POST /features/
Add a feature to the specified advertisement / portal
A positive result returned by this endpoint will indicate the creation of an item in the processing-queue.
It does not mean the item has been or will be successfully processed at the specified portal.
See the status-endpoint to receive additional information.
Fields
field | type | description/constraints | Req | W | U |
---|---|---|---|---|---|
adId | int | The adId | Yes | No | No |
portal | string | Available options: | Yes | No | No |
- marktplaats | |||||
- tweedehands | |||||
- website | |||||
feature | string | The feature to use. | Yes | No | No |
Available options: | |||||
marktplaats | |||||
- omhoogplaatsen | |||||
- dagtopper | |||||
- dagtopper3 | |||||
- dagtopper7 | |||||
- homepaginaAdvertentie | |||||
- url | |||||
tweedehands | |||||
- omhoogplaatsen | |||||
- dagtopper | |||||
- dagtopper3 | |||||
- dagtopper7 | |||||
- homepaginaAdvertentie | |||||
- url | |||||
website | |||||
no features available | |||||
displayName | string/boolean | The displayName (if available) | No | No | No |
available | boolean | Is the feature available at this moment or is it out of stock | Yes | No | No |
active | boolean | Is the feature already active for this advertisement | Yes | No | No |
price | int | The GoedGeplaatst price in whole cents | Yes | No | No |
priceAdditional | int | The Portal's price in whole cents | Yes | No | No |
Example retrieving available features
Request
GET /rest/v1/features/marktplaats/12747173 HTTP/2
or
GET /rest/v1/features/?portal=marktplaats&adId=12747173 HTTP/2
Response
{
"result": true,
"errors": [],
"data": [
{
"feature": "homepaginaAdvertentie",
"displayName": "Blikvanger",
"available": false,
"active": true,
"price": 0,
"priceAdditional": 599
},
{
"feature": "omhoogplaatsen",
"displayName": "Omhoogplaatsen",
"available": false,
"active": false,
"price": 0,
"priceAdditional": 39
},
{
"feature": "dagtopper",
"displayName": "Dagtopper",
"available": false,
"active": false,
"price": 0,
"priceAdditional": 69
},
{
"feature": "url",
"displayName": "Url",
"available": true,
"active": false,
"price": false,
"priceAdditional": 369
},
{
"feature": "dagtopper7",
"displayName": "Dagtopper 7 dagen",
"available": false,
"active": true,
"price": 0,
"priceAdditional": 239
}
]
}
Example adding a features
Request
POST /rest/v1/features/ HTTP/2
{
"adId": 659593,
"portal": "marktplaats",
"feature": "omhoogplaatsen"
}
Response
{
"result": true,
"errors": [],
"data": []
}
or
{
"result": false,
"errors": [
"portal: marktplaats - adId: 659593 - insufficient means"
]
}
or
{
"result": false,
"errors": [
"portal: marktplaats - adId: 659593 - this advertisement is not published"
]
}