User Settings
This endpoint can be used to create / update the user-settings.
Reference
GET /user/settings/[<userId>]
Retrieve the current settings
POST /user/settings/
Create / Replace the current settings
PATCH /user/settings/
Update specific fields only
Fields
field | type | constraints | Req | W | U | P |
---|---|---|---|---|---|---|
userId | int | The userId | Yes | No | No | No |
mainUserId | int | The primary userId when this account is part of a set of users managed by one main account. | No | Yes | Yes | No |
Only writable/updateable for clients with internal features enabled | ||||||
walletUserId | int | Use this users wallet when making payments | No | Yes | Yes | No |
Only writable/updateable for clients with internal features enabled | ||||||
maxContacts | int | The maximum number of contacts the user is allowed to createOnly writable/updateable for internal clients. | No | Yes | Yes | No |
status | string | The Account-status | No | Yes | Yes | No |
Available options: | ||||||
- active | ||||||
- locked | ||||||
type | string | The default advertisement-type when creating an advertisement. | Yes | Yes | Yes | No |
Available options | ||||||
- supply (default) | ||||||
- demand | ||||||
allowbids | boolean | Whether or not to allow bids by default Default: true |
No | Yes | No | No |
showcontact | boolean | Whether or not to show contact-info by default Default: true |
No | Yes | Yes | Yes |
itemsPerPage | int | The number of inventory-items to show per page when using the GoedGeplaatst web interface Default: 25 Minimum: 1 Maximum: 100 |
No | Yes | Yes | No |
groupId | int | The preferred groupId to use when creating a new advertisement | No | Yes | Yes | No |
categoryId | int | The preferred categoryId to use when creating a new advertisement | No | Yes | Yes | No |
attributes | array | List of default key/value-pairs for an attribute to auto-fill when applicable. List of available attribute-key/values to include: |
No | Yes | Yes | Yes |
condition | ||||||
- beschreven | ||||||
- gebruikt | ||||||
- gedragen | ||||||
- gelezen | ||||||
- gereviseerd | ||||||
- gestempeld | ||||||
- nieuw | ||||||
- nieuw in verpakking | ||||||
- onbeschreven | ||||||
- postfris | ||||||
- zo goed als nieuw | ||||||
delivery | ||||||
- ophalen | ||||||
- ophalen of verzenden | ||||||
- verzenden | ||||||
budgetNotifyLimit | int | The minimum amount of available budget (in whole cents) before sending a notification e-mail to the users email address | No | Yes | Yes | Yes |
Available options: | ||||||
- 0 | ||||||
- 500 | ||||||
- 1000 | ||||||
- 2500 | ||||||
- 5000 | ||||||
- 10000 | ||||||
- 15000 | ||||||
- 20000 | ||||||
Default: 0 (no notification) |
Example retrieving user settings
Request
GET /rest/v1/usersettings/12311/
Response
{
"result": true,
"errors": [],
"data": {
"userId": 12311,
"type": "supply",
"allowbids": false,
"showcontact": true,
"itemsPerPage": 20,
"groupId": 1,
"categoryId": 1,
"attributes": [
{
"key": "condition",
"value": "Beschreven"
},
{
"key": "delivery",
"value": "Ophalen"
}
],
"budgetNotifyLimit": 10000
}
}
Example modifying user settings
Request
POST /rest/v1/usersettings/ HTTP/2
{
"userId": 12311,
"type": "supply",
"allowbids": false,
"showcontact": true,
"itemsPerPage": 20,
"groupId": 40,
"categoryId": 1538,
"attributes": [
{
"key": "condition",
"value": "nieuw"
},
{
"key": "delivery",
"value": "ophalen"
}
],
"budgetNotifyLimit": 10000
}
Response
{
"result": true,
"errors": [],
"data": {
"userId": 12311,
"type": "supply",
"allowbids": true,
"showcontact": true,
"itemsPerPage": 25,
"groupId": 40,
"categoryId": 1538,
"attributes": [
{
"key": "condition",
"value": "nieuw"
},
{
"key": "delivery",
"value": "ophalen of verzenden"
}
],
"budgetNotifyLimit": 10000
}
}
Example patching user settings
Request
PATCH /rest/v1/usersettings/ HTTP/2
{
"userId": 15371,
"attributes": [
{
"key": "condition",
"value": "nieuw"
},
{
"key": "delivery",
"value": "ophalen of verzenden"
}
],
"budgetNotifyLimit": 2500
}
Response
{
"result": true,
"errors": [],
"data": {
"userId": 15371,
"mainUserId": 0,
"walletUserId": 0,
"maxContacts": 4,
"status": "active",
"type": "supply",
"allowbids": true,
"showcontact": true,
"itemsPerPage": 25,
"groupId": 0,
"categoryId": 0,
"attributes": [
{
"key": "condition",
"value": "nieuw"
},
{
"key": "delivery",
"value": "ophalen of verzenden"
}
],
"budgetNotifyLimit": 2500
}
}