- Platform Overview
- Resources and Guides
-
POS Integration
-
Getting Started
-
Core Concepts
-
Integration SDK
-
Certification
-
- Order Ahead
-
Provider Enablement
-
Provider Enablement
-
Endpoints
-
Developer Endpoints
-
-
API Reference
-
Getting Started
-
v15
-
- Access Tokens
- Campaigns
- Credit Cards
- Users
- Credit
- Locations
- Payment Methods
- QR Codes
- Progress Adjustments
- Orders
- Rewards
- Gift Cards
-
-
v14
-
- Credit
- Access Tokens
- Campaigns
- Categories
- Credit Cards
- Interstitials
- Locations
- Loyalty
- Orders
- Payment Tokens
- Support Tickets
-
Users
- Create
- List Addresses
- Get Details
- Update
- Reset Password
- Custom Attributes
-
-
Users .: Custom Attributes
API Reference / v14
Create Custom User Attributes
Custom user attributes are a way to associate arbitrary key-value data with a specific user and OAuth client, the idea being that different LevelUp apps (white label, for example) will use different OAuth clients, and will therefore be able to read and write their own quarantined custom user attributes without access to other apps’ attributes.
Custom attributes are a one-level key-value dictionary. The database stores and returns all values
as strings, so you are responsible for any client-side marshaling and serialization. To read custom
user attributes, look at the custom_attributes
key when using the endpoint described in section
“Show a user”. To write custom user attributes, set the custom_attributes
key to a
dictionary of keys and values when using the endpoint described in “Update a user”.
Note that attribute updates are merged with client precedence. This means that keys sent by the client will overwrite existing keys of the same name stored on the server. This behavior is illustrated in the following example.
{
...,
"custom_attributes": {
"foo": "bar",
"baz": "qux"
},
...
}
{
...,
"custom_attributes": {
"foo": "buz",
"honk": "blat"
},
...
}
{
...,
"custom_attributes": {
"foo": "buz",
"baz": "qux",
"honk": "blat"
},
...
}