Status
This endpoint can be used to retrieve the current publishing- and/or feature-status for one or more advertisements.
Reference
GET /status/<userId>/<adId>
Retrieve the status of one advertisement from the specified user.
GET /status/totals/<userId>/
Retrieve total number of advertisements per advertisement-status (active, archive)
POST /status/
Retrieve the status of one or more advertisements from the specified user.
Search parameters
| field | type | description/constraints | Req | W | U |
|---|---|---|---|---|---|
| userId | int | The userId | Yes | No | No |
| adId | int/array | The adId | Yes | No | No |
| force | boolean | Force update of the advertisement-status by checking with the portal real-time. | No | No | No |
| Default: false | |||||
Setting this parameter to true might increase the response-time of this function |
|||||
| page | int | Show page x from resultset (default: 1) | No | No | No |
| itemsPerPage | int | Number of items per page (max: 1000) | No | No | No |
Fields result
| field | type | description/constraints | Req | W | U |
|---|---|---|---|---|---|
| adId | int | The adId | Yes | No | No |
| portals | array | List of status-objects per portal | Yes | No | No |
Fields status-object
| field | type | description/constraints | Req | W | U |
|---|---|---|---|---|---|
| portal | string | Available options: | Yes | No | No |
| - marktplaats | |||||
| - tweedehands | |||||
| - website | |||||
| publish | object | See: publishstatus-object | Yes | No | No |
| features | array | List of featurestatus-objects | Yes | No | No |
Fields publishstatus-object
| field | type | description/constraints | Req | W | U |
|---|---|---|---|---|---|
| pending | boolean | Yes | No | No | |
| pendingDate | datetime | Yes | No | No | |
| processing | boolean | Yes | No | No | |
| processingDate | datetime | Yes | No | No | |
| error | boolean | Has processing failed in any way? | Yes | No | No |
| active | boolean | Item was published succesfully. See also field online to check if the advertisement is online |
Yes | No | No |
| online | boolean | Is the advertisement online or has it been deactivated by the portal? | Yes | No | No |
| An advertisement can be published succesfully but deactivated by the portal afterwards for miscellaneous reasons | |||||
| startDate | datetime | Yes | No | No | |
| closeDate | datetime | Yes | No | No | |
| remoteAdId | int | Yes | No | No |
Fields featurestatus-object
| field | type | description/constraints | Req | W | U |
|---|---|---|---|---|---|
| feature | string | Available options: | Yes | No | No |
| marktplaats | |||||
| - omhoogplaatsen | |||||
| - dagtopper | |||||
| - dagtopper3 | |||||
| - dagtopper7 | |||||
| - homepaginaAdvertentie | |||||
| - url | |||||
| website | |||||
| no features available | |||||
| pending | boolean | Yes | No | No | |
| pendingDate | datetime | Yes | No | No | |
| error | boolean | Has processing failed in any way? | Yes | No | No |
| active | boolean | Yes | No | No | |
| startDate | datetime | Yes | No | No |
Example
Request
GET /rest/v1/status/12311/659593 HTTP/2
or
POST /rest/v1/status/ HTTP/2
{
"userId": 12311,
"adId": [
659593
]
}
Response
{
"result": true,
"errors": [],
"fromCache": false,
"totalItems": 1,
"totalInSet": 1,
"page": 1,
"itemsPerPage": 1000,
"speed": 0.38878583908081055,
"errors": [],
"data": [
{
"adId": 659593,
"portals": [
{
"portal": "marktplaats",
"publish": {
"pending": false,
"pendingDate": "0000-00-00 00:00:00",
"processing": false,
"processingDate": "0000-00-00 00:00:00",
"error": false,
"active": false,
"online": false,
"startDate": "0000-00-00 00:00:00",
"closeDate": "0000-00-00 00:00:00",
"remoteAdId": 0
},
"features": [
{
"feature": "omhoogplaatsen",
"pending": true,
"pendingDate": "2021-06-24 11:45:57",
"processing": false,
"processingDate": "0000-00-00 00:00:00",
"error": false,
"active": false,
"startDate": "0000-00-00 00:00:00"
}
]
},
{
"portal": "website",
"publish": {
"pending": false,
"pendingDate": "0000-00-00 00:00:00",
"processing": false,
"processingDate": "0000-00-00 00:00:00",
"error": false,
"active": false,
"online": false,
"startDate": "0000-00-00 00:00:00",
"remoteAdId": 0
},
"features": false
}
]
}
]
}