Get user

To retrieve user data you will have to use the getUser method.

There are two methods to use getUser. Both methods will return one of the responses below.

Method one

Get
Response format: User object
https://developers.webshoplogin.com/api/v2.0/getUser?api_key=[api_key]&sig=[sig]&nonce=[nonce]&user_id=[user_id]&user_version=[user_version]

Method two

Get
Response format: User object
https://developers.webshoplogin.com/api/v2.0/getUser?api_key=[api_key]&sig=[sig]&nonce=[nonce]&accesstoken=[accesstoken]

Note: With the version number you can check if your currently stored information is up-to-date.

Success response

Response format: User object
Response status code: 200
Example of User object response below
{
    "user": {
      "id": "9TJB5F1bnA5N4rZCDBrIr8Xgt6cwNKhf1GKjcXqd",
      "version": 1,
      "username": "bob@example.com",
      "verified": true
    },
    "customer": {
      "version": 1,
      "prefix": "Mr",
      "firstname": "Bob",
      "lastname": "Abbes",
      "suffix": "Jr",
      "birthday": "1993-01-23",
      "gender": 1,
      "subscribed": false,
    },
    "addresses: [
        0 => {
         "address_id": 3,
         "version": 1,
         "prefix": "Mr",
         "firstname": "Bob",
         "lastname": "Abbes",
         "suffix": "Jr",
         "company": "WebshopLogin",
         "street": "De Ruijterkade",
         "number": 112,
         "additional": A,
         "city": "Amsterdam",
         "country": "NL",
         "province": "Noord-Holland",
         "postal": "1011AB",
         "telephone": "0202615278",
         "fax": null,
         "default_billing": true,
         "default_shipping": true,
       }
    ],
}

Error response

Response format: string
Response status code: 401
Api key not valid                        

Click here for description and full error list