GET /ad/{id}

GET /ad/{id} v5 | GET /ad/{id} v3 | GET /ad/{id} v2

Warning

GET /ad/{id} v3 is now officially deprecated and scheduled for removal on May, 1st 2023. Please move to use GET /ad/{id} v5.

GET /ad/{id} v2 is now officially deprecated and scheduled for removal on May, 1st 2023. Please move to use GET /ad/{id} v5.

GET /ad/{id} v5

Scope

api_ro or console_ro

Accept

application/sellside.ad-v5+json, application/json

Note

Ads fetched with GET Ad V5 have a slightly different structure than GET /ad/{id} v3. It is correct that V4 is skipped.

The fields related to price are consolidated into one price object.

The field campaignId is added.

The daily and total budgets are now consolidated in one budgets object.

CPC is no longer, it has changed into bidMicros.

bidMicros, budgets.daily.limitMicros, budgets.daily.spentMicros, budgets.total.limitMicros and budgets.total.spentMicros are now all in micro currencies.

several other fields are removed. See Fields for details.

Example

GET /ad/42
Accept: application/sellside.ad-v5+json, application/json

200 OK
Content-Type: application/sellside.ad-v5+json; charset=utf-8

{
    "id": 42,
    "title": "Brother Fax voor 99,99",
    "description": "<b>NU extra voordelig op ourshop.com.</b> Fax nu voor slechts <b>99,99!</b>",
    "categoryId": 826,
    "status": "ACTIVE",
    "price": {
        "priceType": "FIXED_PRICE",
        "priceUnit": "per_sqm",
        "amountCents": 5600,
        "originalAmountCents": 6500
    },
    "bidMicros": "10000",
    "budgets": {
        "daily": {
            "limitMicros": "UNLIMITED",
            "spentMicros": "1255000"
        },
        "total": {
            "limitMicros": "350000000",
            "spentMicros": "24370000"
        }
    },
    "campaignId": 54212,
    "salutation": "COMPANY",
    "sellerName": "My Shop",
    "postcode": "1097DN",
    "regionId": 1700195,
    "phoneNumber": "0207894561",
    "allowContactByEmail": true,
    "dateCreated": "2012-08-31T16:12:53Z",
    "dateLastUpdated": "2012-09-05T04:03:42Z",
    "vendorId": "OURSHOP-1423453-34",
    "links": {
        "self": "/ad/42",
        "category": "/category/826",
        "displayUrl": "www.ourshop.com/Faxes",
        "url": "http://www.ourshop.com/index.php?param1=value1&amp;param2=value2&amp;param3=value3"
    },
    "images": [
        {
            "src": "http://www.ourshop.com/img/brother_fax_big.jpg",
            "status": "OK",
            "dateLastUpdated": "2012-09-10T13:11:05Z",
            "links": {
                "50x70": "//i.marktplaats.nl/image23434_abc.jpg",
                "120x180": "//i.marktplaats.nl/image23434_def.jpg"
            }
        },
        {
            "src": "http://www.ourshop.com/img/brother_fax_side.jpg",
            "status": "OK",
            "dateLastUpdated": "2012-09-10T13:11:05Z",
            "links": {
                "50x70": "//i.marktplaats.nl/image397493_abc.jpg",
                "120x180": "//i.marktplaats.nl/image397493_def.jpg"
            }
        }
    ],
    "attributes": [
        {
            "key": "color",
            "label": "Kleur",
            "locale": "nl",
            "type": "STRING",
            "value": "Zwart",
            "recognized": true
        },
        {
            "key": "size",
            "label": "Maat",
            "locale": "nl",
            "type": "NUMBER",
            "value": 6,
            "recognized": true
        },
        {
            "key": "software",
            "label": "Software",
            "locale": "nl",
            "type": "LIST",
            "value": [
                "Apple OSX",
                "Microsoft Windows 7"
            ],
            "recognized": false
        }
    ],
    "shippingOptions": [
        {
            "type": "SHIP",
            "costCents": 495,
            "time": "2d-5d"
        },
        {
            "type": "PICKUP",
            "pickupLocation": "1097DN"
        }
    ]
}

GET /ad/{id} v3

Scope

api_ro or console_ro

Accept

application/sellside.ad-v3+json, application/json

Version 3 works just like GET /ad/{id} v2, except the response body contains an additional field statusReasons. This field is currently used to indicate the reason why a certain ad might be set to a certain status by our system. This could be due to, for example, an action (like new website domain approval) pending from the user, which is a mechanism used to prevent account takeovers from setting the website URL to a malicious one.

Example

GET /ad/42
Accept: application/sellside.ad-v3+json, application/json

200 OK
Content-Type: application/sellside.ad-v3+json; charset=utf-8

{
    "id": 42,
    "title": "Brother Fax voor 99,99",
    "description": "<b>NU extra voordelig op ourshop.com.</b> Fax nu voor slechts <b>99,99!</b>",
    "categoryId": 826,
    "externalId": "OURSHOP-1423453-34",
    "status": "PAUSED",
    "currency": "EUR",
    "priceType": "FIXED_PRICE",
    "priceUnit": "per_sqm",
    "price": 9999,
    "cpc": 10,
    "totalBudget": 5000,
    "dailyBudget": 2000,
    "spentBudget": 2534,
    "salutation": "COMPANY",
    "sellerName": "My Shop",
    "postcode": "1097DN",
    "regionId": 1700195,
    "pageNumber": 27,
    "suggestedCpcForPageOne": 74,
    "phoneNumber": "0207894561",
    "allowContactByEmail": true,
    "allowPaypal": true,
    "dateCreated": "2012-08-31T16:12:53Z",
    "dateLastUpdated": "2012-09-05T04:03:42Z",
    "vendorId": "OURSHOP-1423453-34",
    "links": {
        "self": "/ad/42",
        "category": "/category/826",
        "displayUrl": "www.ourshop.com/Faxes",
        "url": "http://www.ourshop.com/index.php?param1=value1&amp;param2=value2&amp;param3=value3"
    },
    "images": [
        {
            "src": "http://www.ourshop.com/img/brother_fax_big.jpg",
            "status": "OK",
            "dateLastUpdated": "2012-09-10T13:11:05Z",
            "links": {
                "50x70": "//i.marktplaats.nl/image23434_abc.jpg",
                "120x180": "//i.marktplaats.nl/image23434_def.jpg"
            }
        },
        {
            "src": "http://www.ourshop.com/img/brother_fax_side.jpg",
            "status": "OK",
            "dateLastUpdated": "2012-09-10T13:11:05Z",
            "links": {
                "50x70": "//i.marktplaats.nl/image397493_abc.jpg",
                "120x180": "//i.marktplaats.nl/image397493_def.jpg"
            }
        }
    ],
    "attributes": [
        {
            "key": "color",
            "label": "Kleur",
            "locale": "nl",
            "type": "STRING",
            "value": "Zwart",
            "recognized": true
        },
        {
            "key": "size",
            "label": "Maat",
            "locale": "nl",
            "type": "NUMBER",
            "value": 6,
            "recognized": true
        },
        {
            "key": "software",
            "label": "Software",
            "locale": "nl",
            "type": "LIST",
            "value": [
                "Apple OSX",
                "Microsoft Windows 7"
            ],
            "recognized": false
        }
    ],
    "shippingOptions": [
        {
            "type": "SHIP",
            "cost": 0,
            "time": "2d-5d"
        },
        {
            "type": "PICKUP",
            "pickupLocation": "1097DN"
        }
    ],
    "statusReasons": [
        "DOMAIN_PENDING"
    ]
}

GET /ad/{id} v2

Scope

api_ro or console_ro

Accept

application/sellside.ad-v2+json, application/json

This URL returns a single ad with the given id.

If the ad does not exist or does not belong to the user the server returns 404 Not Found. If the id is invalid, i.e. not a positive integer the server returns 400 Bad Request.

Note

The fields pageNumber and suggestedCpcForPageOne are currently expensive to compute. If you do not need their values consider excluding them to speed up the response. To exclude the fields add the following parameter to the request URL.

?_exclude=pageNumber,suggestedCpcForPageOne

Parameters

Name

Type

Description

_include

string

Comma-separated-list of fields to include. Optional, default is all fields.

_exclude

string

Comma-separated-list of fields to omit. Optional, default empty.

Errors

Field

Code

Error message

Description

id

2001

invalid argument

not a valid number

id

1006

type mismatch

the provided value for the field was not of the correct type

Example

GET /ad/42
Accept: application/sellside.ad-v2+json, application/json

200 OK
Content-Type: application/sellside.ad-v2+json; charset=utf-8

{
    "id": 42,
    "title": "Brother Fax voor 99,99",
    "description": "<b>NU extra voordelig op ourshop.com.</b> Fax nu voor slechts <b>99,99!</b>",
    "categoryId": 826,
    "externalId": "OURSHOP-1423453-34",
    "status": "ACTIVE",
    "currency": "EUR",
    "priceType": "FIXED_PRICE",
    "priceUnit": "per_sqm",
    "price": 9999,
    "cpc": 10,
    "totalBudget": 5000,
    "dailyBudget": 2000,
    "spentBudget": 2534,
    "salutation": "COMPANY",
    "sellerName": "My Shop",
    "postcode": "1097DN",
    "regionId": 1700195,
    "pageNumber": 27,
    "suggestedCpcForPageOne": 74,
    "phoneNumber": "0207894561",
    "allowContactByEmail": true,
    "allowPaypal": true,
    "dateCreated": "2012-08-31T16:12:53Z",
    "dateLastUpdated": "2012-09-05T04:03:42Z",
    "vendorId": "OURSHOP-1423453-34",
    "microTip": "high quality",
    "links": {
        "self": "/ad/42",
        "category": "/category/826",
        "displayUrl": "www.ourshop.com/Faxes",
        "url": "http://www.ourshop.com/index.php?param1=value1&amp;param2=value2&amp;param3=value3"
    },
    "images": [
        {
            "src": "http://www.ourshop.com/img/brother_fax_big.jpg",
            "status": "OK",
            "dateLastUpdated": "2012-09-10T13:11:05Z",
            "links": {
                "50x70": "//i.marktplaats.nl/image23434_abc.jpg",
                "120x180": "//i.marktplaats.nl/image23434_def.jpg"
            }
        },
        {
            "src": "http://www.ourshop.com/img/brother_fax_side.jpg",
            "status": "OK",
            "dateLastUpdated": "2012-09-10T13:11:05Z",
            "links": {
                "50x70": "//i.marktplaats.nl/image397493_abc.jpg",
                "120x180": "//i.marktplaats.nl/image397493_def.jpg"
            }
        }
    ],
    "attributes": [
        {
            "key": "color",
            "label": "Kleur",
            "locale": "nl",
            "type": "STRING",
            "value": "Zwart",
            "recognized": true
        },
        {
            "key": "size",
            "label": "Maat",
            "locale": "nl",
            "type": "NUMBER",
            "value": 6,
            "recognized": true
        },
        {
            "key": "software",
            "label": "Software",
            "locale": "nl",
            "type": "LIST",
            "value": [
                "Apple OSX",
                "Microsoft Windows 7"
            ],
            "recognized": false
        }
    ],
    "shippingOptions": [
        {
            "type": "SHIP",
            "cost": 0,
            "time": "2d-5d"
        },
        {
            "type": "PICKUP",
            "pickupLocation": "1097DN"
        }
    ]
}