User

A Marktplaats user. Email, phoneNumber and postcode are only returned when the user resource you are retrieving represents the logged in user.

Fields

field

type

constraints

default

Req

W

U

userId

int

–

no

no

no

locale

string

for Marktplaats only nl-NL allowed, for 2dehands: nl-BE and fr-BE allowed

no

yes

yes

status

string

one of unconfirmed, confirmed

no

yes

no

email

string

valid email address unique within Marktplaats

yes

yes

yes

name

string

max. 30 chars

no

yes

yes

phoneNumber

string

–

no

yes

yes

postcode

string

max. 6 chars

no

yes

yes

confirmDate

ISO 8601 string

–

no

no

no

trackingProgram

string

–

no

no

no

dealerPackage

string

should be NONE, BASIC, PLUS or PREMIUM.

no

no

no

userLimits

object

–

no

no

no

billing

Billing

–

yes

no

no

userId

Uniquely identifies a user

locale

The locale used for the user. This is only relevant for users on the 2dehands platform.

status

Status of this user. This field may be used to create a user account without the email confirmation.

email

The email address for this account

name

The name of the user

phoneNumber

A phone number has to meet the following requirements:

  • Dutch phone numbers (mobile or land lines) have a maximum length of between 10 and 21 digits and should start with a 0.

  • International phone numbers numbers should start with a ‘+’, followed by a countrynumber and should be between 8 and 19 digits.

  • Phone numbers starting with 0909, 0906, 080x or 090x are not allowed.

Examples of valid phone number:

  • 0615420879 - Valid Dutch mobile phone number.

  • 0308767261 - Valid Dutch land line.

  • 0971492918 - Valid Dutch mobile phone number for tablets and similar devices.

  • +31615587981 - Valid Dutch phone number, with Dutch country code.

  • +49699511440 - Valid German phone number, with country code.

Examples of invalid phone numbers:

  • 0900998877 - Dutch information number.

  • 0906292818 - Dutch chat number.

  • 08001777 - Dutch information number.

  • 061122 - Too short for being a valid number.

  • 003233883399 - Invalid international number, it should start with + instead of 00.

postcode

Postcode of the location where the user lives

confirmDate

When the account was confirmed

trackingProgram

The name of user’s tracking program, e.g. cps

dealerPackage

The name of user’s dealer (Autos) package or NONE if not present. Possible values for this field are NONE, BASIC, PLUS or PREMIUM

userLimits

An object containing the upload limits for the user, broken down by category vertical.

field

type

constraints

default

Req

W

U

userLimits.automotive

object

–

no

no

no

userLimits.nonAutomotive

object

–

no

no

no

userLimits.automotive

Limits that apply to Automotive (Autos) categories.

field

type

constraints

default

Req

W

U

userLimits.automotive.maxPhotos

int

–

no

no

no

userLimits.automotive.maxPhotos

Maximum number of photos allowed per advertisement in Automotive categories.

userLimits.nonAutomotive

Limits that apply to non-Automotive categories (Boats, Bicycles & Mopeds, Business goods).

field

type

constraints

default

Req

W

U

userLimits.nonAutomotive.maxPhotos

int

–

no

no

no

userLimits.nonAutomotive.maxPhotos

Maximum number of photos allowed per advertisement in non-Automotive categories.

billing

The user’s billing status.

Relations

name

availability

embedded

cardinality

mp:user-features

always

no

1

mp:change-email

When you are the logged in user

no

1

mp:user-advertisements

always

no

1

mp:user-reviews

always

no

1

Reference

GET /v2/users/{userId}

Get a user.

Errors

http

error code

description

400

validation-failure

Validation of the user failed.
There should be more information in the field errors.

Field errors

field

error code

error value

description

email

email-in-use

The specified email is already in use

phoneNumber

input-invalid

The phonenumber is in an invalid format

postcode

input-invalid

The postcode is unknown or in an invalid format

Examples

Retrieving a user :

Request :

GET /v2/users/1 HTTP/1.1
Host: api.marktplaats.nl

Response :

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

{
  "_links": {
    "self": {
      "href": "/v2/users/1"
    },
    "curies": [
      {
        "href": "https://api.marktplaats.nl/docs/v2/rels/{rel}.html",
        "templated": true,
        "name": "mp"
      }
    ],
    "mp:change-email": {
      "href": "/v2/users/1/change-email"
    }
  },
  "userId": 1,
  "email": "1@marktplaats.nl",
  "name": "Robin",
  "postcode": "8302JM",
  "phoneNumber": "0651649077",
  "status": "confirmed",
  "dealerPackage": "NONE",
  "userLimits": {
    "automotive": {
      "maxPhotos": 24
    },
    "nonAutomotive": {
      "maxPhotos": 99
    }
  },
  "billing": {
      "profile": "Complete"
  }
}

Updating a User

Using PUT or PATCH a user’s info can be updated. See Fields for a complete overview of what user info can be updated.

N.B. When updating a user’s info we DO NOT overwrite existing user info in the advertisements of the user.

Field errors

field

error code

error value

description

name

input-invalid

The supplied name is empty or invalid

phoneNumber

input-invalid

The phonenumber has an invalid format

postcode

input-invalid

The postcode is unknown or has an invalid format

name

input-too-long

The supplied name is too long

Updating the name, phoneNumber and postcode of a user with id 123 using PUT:

Request :

PUT /v2/users/123 HTTP/1.1
Host: api.marktplaats.nl
Content-Type: application/json

{
  "name": "new seller name",
  "phoneNumber": "06-00000000",
  "postcode": 1097DN
}

Updating only the name of a user with id 678 using PATCH:

Request :

PATCH /v2/users/678 HTTP/1.1
Host: api.marktplaats.nl
Content-Type: application/json-patch+json

[
  { "op": "replace", "path": "/name", "value": "new seller name" }
]