Users
Users represent data about a specific customer. Carts, orders, attributes, addresses are associated with users.
In a B2C environment a user is the actual customer ordering products, in a B2B environment a user is often part of a usergroup
representing the organisation he/she is working for. Orders in a B2B environment are still placed by a specific user but connected to the organisation by a single debtorId
which is associated with the user.
User Lookup keys
Key | Type | Description |
---|---|---|
id | integer | Propeller user id |
sourceId | string | External system unique id. sourceId should be combined with source |
Fields
Name | Description | Type |
---|---|---|
debtorId | A unique id representing this user. A debtorId can be automatically generated by Propellor | integer string |
firstName | User first name | string |
middleName | User middle name | string |
lastName | User last name | string |
fullName | User full name | string |
title | User title | string |
dateOfBirth | User date of birth | date |
gender | User gender | enum m=Male f=Female u=Undefined |
login | Login name used to login to the webshop | string |
phone | User phone number | integer |
email | A valid email address | string |
company | Organization the user is working for | string |
parent | Parent usergroup | JSON object that identifies the parent. id or sourceId in combination with source |
pricelistAmount | A pricesheet code in case of special pricing agreements | string |
pricelistPercentage | A pricesheet code in case of special pricing agreements | string |
taxNumber | The VAT number of the financial entity this user is part of | string |
cocNumber | The chamber of commerce number of the financial entity this user is part of | string |
primaryLanguage | User primary language | string ISO 639-1 |
sourceId | External system unique id | string |
source | External system | string |
User Errors
This section describes error codes specific for the User
resource.
Code | Error Type | Status Code | Message | Reason |
---|---|---|---|---|
70004 | UserExists | 400 | User already exists | User with such lookup key already exists |
70005 | UserMultipleFound | 400 | Multuple users found. Please provide additional filters | Multiple users with such lookup key exist |
70006 | UserNotFound | 404 | User does not exist | User with such lookup key not found |
70007 | ParentUserNotFound | 404 | Parent user not found | Parent user with such lookup key not found. This error is typical when working with user sub-resources (e.g. attributes, addresses) |
90006 | AddressNotFound | 404 | Address does not exist | User address does not exist |
📄️ Get User Addresses by type
Use this endpoint to retrieve a list of all user addresses. Addresses can be filtered by type.
📄️ Create User Address
Use this endpoint to create an address for a user. If the address is successfully created, the response will include the address `id`.
📄️ Bulk User Addresses
Use this endpoint to create multiple user addresses with a single API request. If an address with the code provided is found, it will be updated, otherwise a new address will be created. If the code is not provided, a new address will be created. When a new address is successfully created, the response will include the address `id`.
📄️ Get User Address by Id
Use this endpoint to retrieve details for a user address. The address is identified by `id`.
📄️ Delete User Address
Use this endpoint to delete a user's address. The address is identified by `id`.
📄️ Update User Address
Use this endpoint to update a user address. The address is identified by `id`.
📄️ Create User Pricing
Use this endpoint to define [pricing](/rest-sonar/pricesheets) for an existing user. The user can be identified by it's lookup key. It is required to provide either `categories` or `products` or both in the payload.
📄️ Delete User Pricing
Use this endpoint to delete pricing for an existing user. The user can be identified by it's lookup key.
📄️ Create User
Use this endpoint to create a single user. If a user is successfully created, the response will include the user `id`.
📄️ Get User by lookup key
Use this endpoint to retrieve user details by lookup key. If multiple users with the same lookup key exist, use additional filtering depending on the lookup key to uniquely identify the user (e.g. `source` and `language` for lookup key `source`).
📄️ Delete User by lookup key
Delete a `user` by a specific lookupKey / lookupId combination. A deleted `user` will be moved to the Propeller Recycle bin. This means the deleted user can be restored, however, only via the Propeller backoffice.
📄️ Update User by lookup key
Use this endpoint to update user by lookup key. If multiple users with the same lookup key exist, use additional filtering depending on the lookup key to uniquely identify the user (e.g. `source` and `language` for lookup key `source`).
📄️ Bulk Users by source id
The bulk endpoints offer an efficient way of importing/updating large amounts of user with just a single API call. When using the bulk `sourceId` endpoint, the users are identified by `sourceId`, `source` and `language`. If a user doesn't already exist, it will be created. If it does exist, the user found will be updated.
📄️ Bulk Users by Id
The bulk endpoints offer an efficient way of importing/updating large amounts of user with just a single API call. When using the bulk `id` endpoint, the products are identified by `id`. If a user doesn't already exist, it will be created. If it does exist, the user found will be updated.