Marktplaats API
2.0
  • Overview
  • Authentication
  • Webhooks
  • Root
  • Categories
  • Category attributes
  • Advertisements
  • Advertisement
  • Advertisement images
    • Reference
    • Examples
  • Advertisement features
  • Advertisement feature
  • Advertisement purchased feature
  • Advertisement renewal
  • Advertisement statistics
  • Advertisement transaction
  • Advertisement transactions
  • Buy advertisement feature
  • Upcall confirmations
  • Bids
  • Bid
  • Ask Bidder Question
  • Me
  • Users
  • User
  • Change email
  • User advertisements
  • User brands
  • User legal status
  • User reviews
  • User statistics
  • Image
  • Image blob
  • Image meta information
  • Order
  • Order products
  • Order product
  • Location
  • Search
  • LMS Services
  • Error codes
  • Endpoints
  • Indices and tables
  • Changelog
Marktplaats API
  • Docs »
  • Advertisement images
  • View page source

Advertisement images¶

Collection of image representations.

Currently the only way to attach an image to an advertisement is by issuing a POST against the images resource with a post body that contains a list of urls. A placeholder image will be created for each of the uploaded images. The real images are downloaded in the background and the placeholder images will be updated when downloading completes. An image will have its status attribute set to downloading until downloading completes. Clients interested in knowing when the image download has completed should poll the image resource and wait until the status attribute changes. The images will be attached to the advertisement in the order they are provided.

Each ad can contain up to 24 images. This limit is different for car dealers.

For Basic dealers the ad can contain up to 24 images, Plus dealer ads can contain up to 35 images and Premium dealer ads have a maximum of 99 images.

An image is valid if it is in JPG, PNG or BMP format and is smaller than 8MB in size. GIF images are not supported. Images will automatically be resized. It is not recommended to upload images with a size which doesn’t fit in 1024x1024 pixels box.

Please include as many accurate product details (logos, labels, warnings, safety information or QR codes) when you create your ad, to improve its quality and increase your chance of success.

Note: Each url will only be downloaded once for each advertisement. Therefore if the image changes but the url stays the same then the image will not be re-downloaded. In this case you need to give the changed image a new url.

Reference¶

GET /v2/advertisements/{itemId}/images

Get all images for an advertisement

POST /v2/advertisements/{itemId}/images

Add or replace images for an advertisement

Examples¶

Getting all images for an advertisement :

Request :

GET /v2/advertisements/m1/images HTTP/1.1
Host: api.marktplaats.nl

Response :

  HTTP/1.1 200 OK
  Content-Type: application/json

{
     "_links":{
        "self":{
           "href":"/v2/advertisements/m1/images"
        },
        "curies":[
           {
              "name":"mp",
              "href":"https://api.marktplaats.nl/docs/v2/{rel}.html",
              "templated":true
           }
        ]
     },
     "_embedded":{
        "mp:advertisement-image":[
           {
              "_links":{
                 "self":{
                    "href":"/v2/images/96743860-6548-4c0b-b154-1b6e9dff8684"
                 },
                 "mp:image-meta":{
                    "href":"/v2/images/96743860-6548-4c0b-b154-1b6e9dff8684/{size}/meta",
                    "templated":true
                 },
                 "mp:image-blob":{
                    "href":"/v2/images/96743860-6548-4c0b-b154-1b6e9dff8684/{size}/blob",
                    "templated":true
                 }
              },
              "small":{
                 "href":"http://i.marktplaats.com/00/s/NTQwWDgwMA==/z/QZEREAOSwDuJWv5QR/$_14.JPG"
              },
              "medium":{
                 "href":"http://i.marktplaats.com/00/s/NTQwWDgwMA==/z/QZEREAOSwDuJWv5QR/$_83.JPG"
              },
              "large":{
                 "href":"http://i.marktplaats.com/00/s/NTQwWDgwMA==/z/QZEREAOSwDuJWv5QR/$_84.JPG"
              },
              "xlarge":{
                 "href":"http://i.marktplaats.com/00/s/NTQwWDgwMA==/z/QZEREAOSwDuJWv5QR/$_85.JPG"
              },
              "imageId":100,
              "mediaId":"96743860-6548-4c0b-b154-1b6e9dff8684"
           },
           {
              "_links":{
                 "self":{
                    "href":"/v2/images/b51fdebd-f201-4562-b336-7e67d45593fb"
                 },
                 "mp:image-meta":{
                    "href":"/v2/images/b51fdebd-f201-4562-b336-7e67d45593fb/{size}/meta",
                    "templated":true
                 },
                 "mp:image-blob":{
                    "href":"/v2/images/b51fdebd-f201-4562-b336-7e67d45593fb/{size}/blob",
                    "templated":true
                 }
              },
              "small":{
                 "href":"http://i.marktplaats.com/00/s/ODAwWDQ1MA==/z/kRIAGEOSwPc9Wwb6e/$_14.JPG"
              },
              "medium":{
                 "href":"http://i.marktplaats.com/00/s/ODAwWDQ1MA==/z/kRIAGEOSwPc9Wwb6e/$_83.JPG"
              },
              "large":{
                 "href":"http://i.marktplaats.com/00/s/ODAwWDQ1MA==/z/kRIAGEOSwPc9Wwb6e/$_84.JPG"
              },
              "xlarge":{
                 "href":"http://i.marktplaats.com/00/s/ODAwWDQ1MA==/z/kRIAGEOSwPc9Wwb6e/$_85.JPG"
              },
              "imageId":92,
              "mediaId":"b51fdebd-f201-4562-b336-7e67d45593fb"
           }
        ]
     }
  }

Adding an image to an advertisement :

Request :

POST /v2/advertisements/m1/images HTTP/1.1
Host: api.marktplaats.nl
Content-Type: application/json

{
  "urls": [ "http://remote.host/images/image1.jpg", "http://remote.host/images/image2.jpg" ],
  "replaceAll": true
}

Response :

HTTP/1.1 202 Accepted
Content-Type: application/json

{
   "_links":{
      "self":{
         "href":"/v2/advertisements/m1/images"
      },
      "curies":[
         {
            "name":"mp",
            "href":"https://api.marktplaats.nl/docs/v2/{rel}.html",
            "templated":true
         }
      ]
   },
   "_embedded":{
      "mp:advertisement-image":[
         {
            "_links":{
               "self":{
                  "href":"/v2/images/c74f04c0-ad01-4dc6-a955-3c0c5a853cee"
               },
               "mp:image-meta":{
                  "href":"/v2/images/c74f04c0-ad01-4dc6-a955-3c0c5a853cee/{size}/meta",
                  "templated":true
               },
               "mp:image-blob":{
                  "href":"/v2/images/c74f04c0-ad01-4dc6-a955-3c0c5a853cee/{size}/blob",
                  "templated":true
               }
            },
            "small":{
               "href":"http://i.marktplaats.com/00/s/NTQwWDgwMA==/z/FGOPDKGlfwEgDhv4MT/$_14.JPG"
            },
            "medium":{
               "href":"http://i.marktplaats.com/00/s/NTQwWDgwMA==/z/FGOPDKGlfwEgDhv4MT/$_83.JPG"
            },
            "large":{
               "href":"http://i.marktplaats.com/00/s/NTQwWDgwMA==/z/FGOPDKGlfwEgDhv4MT/$_84.JPG"
            },
            "xlarge":{
               "href":"http://i.marktplaats.com/00/s/NTQwWDgwMA==/z/FGOPDKGlfwEgDhv4MT/$_85.JPG"
            },
            "imageId":1,
            "mediaId":"c74f04c0-ad01-4dc6-a955-3c0c5a853cee",
            "status": "downloading"
         },
         {
            "_links":{
               "self":{
                  "href":"/v2/images/00e2777e-1e72-49a2-9b3b-af2fbcc25244"
               },
               "mp:image-meta":{
                  "href":"/v2/images/00e2777e-1e72-49a2-9b3b-af2fbcc25244/{size}/meta",
                  "templated":true
               },
               "mp:image-blob":{
                  "href":"/v2/images/00e2777e-1e72-49a2-9b3b-af2fbcc25244/{size}/blob",
                  "templated":true
               }
            },
            "small":{
               "href":"http://i.marktplaats.com/00/s/ODAwWDQ1MA==/z/kRIAGEOSwPc9Wwb6e/$_14.JPG"
            },
            "medium":{
               "href":"http://i.marktplaats.com/00/s/ODAwWDQ1MA==/z/kRIAGEOSwPc9Wwb6e/$_83.JPG"
            },
            "large":{
               "href":"http://i.marktplaats.com/00/s/ODAwWDQ1MA==/z/kRIAGEOSwPc9Wwb6e/$_84.JPG"
            },
            "xlarge":{
               "href":"http://i.marktplaats.com/00/s/ODAwWDQ1MA==/z/kRIAGEOSwPc9Wwb6e/$_85.JPG"
            },
            "imageId":92,
            "mediaId":"00e2777e-1e72-49a2-9b3b-af2fbcc25244",
            "status":"downloading"
         }
      ]
   }
}
Next Previous

© Copyright 2023 Marktplaats B.V. Alle rechten voorbehouden.

Built with Sphinx using a theme provided by Read the Docs.