Category attributes

The Marktplaats API supports attributes for both categories and advertisements to specify additional properties of a product like size and color.

Category attributes are recommended attribute names and values for a given category. They help constructing automatic user interfaces in which sellers can select one or more values from a pre-defined list of attributes.

They serve as a basis for the attributes the seller can supply in addition to his own user-defined attributes. You cannot post/put category attributes.

There is a separate url available to get a category attributes.

field type constraints default Req W U
key string yes no no
label string yes no no
labels object yes no no
type Attribute type yes no no
values array(string) no no no
options array(ValueOption type) no no no
minValue number applicable to attribute with type NUMBER only no no no
maxValue number applicable to attribute with type NUMBER only no no no
minAllowedLength number applicable to attribute with type STRING only no no no
maxAllowedLength number applicable to attribute with type STRING only no no no
unit string applicable to attribute with type NUMBER only no no no
units object yes no no
mandatory boolean yes no no
searchable boolean yes no no
writable boolean yes no no
updateable boolean yes no no

key

Unique name of an attribute.

label

The label of the attribute. Deprecated: Use labels instead.

labels

The localized descriptive names of the attribute, keyed by locale.

type

The label of the attribute

values

A list of all allowed values for the attribute. Deprecated: Use options instead.

options

A list of all allowed values for the attribute.

minValue

Minimum allowed value.

maxValue

Maximum allowed value.

minAllowedLength

Minimum allowed length of user-defined string value.

maxAllowedLength

Maximum allowed length of user-defined string value.

unit

Indicates the unit of a NUMBER attribute. Deprecated: Use units instead.

units

The localized descriptive units of the attribute, keyed by locale.

mandatory

Indicates if attribute is mandatory or can be omitted.

searchable

Indicates if you can filter listing results based on this field.

writable

Indicates if you can set this attribute when creating an advertisement for this category

updateable

Indicates if you can update this attribute for advertisements created in this category

Allowed attribute types

type description
STRING User can select a single value from values. Or provide any string if values are not given, between length minAllowedLength and maxAllowedLength.
LIST User can select one or more values from values.
NUMBER User can provide an integer number between minValue and maxValue.
DOUBLE User can provide a floating point number

Possible value options

A list of all allowed values for the attribute.

field type constraints default Req W U
key string yes no no
labels object yes no no

key

Unique key of a value option.

labels

The localized descriptive labels of the value option, keyed by locale.

Reference

GET /v1/categories/{l1CategoryId}/{l2CategoryId}/attributes

This urls returns attributes for the specified leaf category.

Example

Retrieving category attributes :

Request :

GET /v1/categories/1/2/attributes HTTP/1.1
Host: api.marktplaats.nl

Response :

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

{
 "_links":{
   "self":{
     "href":"/v1/categories/1/2/attributes"
   },
   "describedby":{
     "href":"https://api.marktplaats.nl/docs/v1/categories.html#attributes"
   }
 },
 "fields": [
      {
          "key": "delivery",
          "label": "Levering",
          "labels": {
              "nl-NL": "Levering"
          },
          "type": "STRING",
          "values": [
              "Ophalen",
              "Verzenden",
              "Ophalen of Verzenden"
          ],
          "options": [
              {
                  "key": "Ophalen",
                  "labels": {
                      "nl-NL": "Ophalen"
                  }
              },
              {
                  "key": "Verzenden",
                  "labels": {
                      "nl-NL": "Verzenden"
                  }
              },
              {
                  "key": "Ophalen of Verzenden",
                  "labels": {
                      "nl-NL": "Ophalen of Verzenden"
                  }
              }
          ],
          "mandatory": false,
          "searchable": true,
          "writable": true,
          "updateable": true
      },
      {
          "key": "properties",
          "label": "Eigenschappen",
          "labels": {
              "nl-NL": "Eigenschappen"
          },
          "type": "LIST",
          "values": [
              "Vering",
              "Opvouwbaar"
          ],
          "options": [
              {
                  "key": "Vering",
                  "labels": {
                      "nl-NL": "Vering"
                  }
              },
              {
                  "key": "Opvouwbaar",
                  "labels": {
                      "nl-NL": "Opvouwbaar"
                  }
              }
          ],
          "mandatory": false,
          "searchable": true,
          "writable": true,
          "updateable": true
      },
      {
          "key": "engineDisplacement",
          "label": "Motorinhoud",
          "labels": {
              "nl-NL": "Motorinhoud"
          },
          "type": "NUMBER",
          "minValue": 1,
          "maxValue": 8500,
          "unit": "cc",
          "units": {
              "nl-NL": "cc"
          },
          "mandatory": false,
          "searchable": true,
          "writable": true,
          "updateable": true
      },
      {
          "key": "manufacturerEmail",
          "label": "E-mailadres fabrikant",
          "labels": {
              "nl-NL": "E-mailadres fabrikant"
          },
          "type": "STRING",
          "minAllowedLength": 0,
          "maxAllowedLength": 64,
          "mandatory": true,
          "searchable": false,
          "writable": true,
          "updateable": true
      }]
  }