Placewise API
Get startedExplore
Get startedExplore
Performance Cloud 🗗
Placewise 🗗
  1. Common Models
  • Introduction
  • Global Headers
  • Common HTTP Error Codes
  • API Permits
  • Rate Limiting
  • Authorization
    • Token Authorization
    • Member Authorization
    • User Authorization
  • API Contexts
    • Customer Context
    • LoyaltyClub Context
    • Global Context
  • Common Concepts
    • Localization
    • System URLs
    • Params Validation
    • Pagination
    • Sorting
  • Common Models
    • Common Data Formats
    • Member Model
    • API Entity Model
    • Opening Hours Model
  1. Common Models

Member Model

Standard member JSON model returned from many API endpoints.

Example#

{
  "id": 42,
  "properties": {
    "first_name": "Ola",
    "last_name": "Nordmann",
    "birthday": "1990-10-23",
    "interests": [
      "bikes_and_cars",
      "sportwear"
    ],
    "child_birth_years": [
      2010,
      2011,
      2011
    ],
    "language": "no"
  },
  "consents": {
    "consent1": { "status": true, "updated_at": "2018-12-14T21:57:20.063Z" },
    "consent2": { "status": false, "updated_at": "2018-10-25T21:57:43.738Z" }
  },
  "sms_status": "enabled",
  "email_status": "hard_bounced",
  "push_status": "disabled",
  "optin_channel": "webforms",
  "optin_subchannel": "campaign-10-2017",
  "created_at": "2017-01-19T10:07:08.336+01:00",
  "updated_at": "2017-04-03T09:35:19.313+02:00",
  "banned_until": "2137-04-03T09:35:19.313+02:00",
  "person_id": 99,
  "has_password": false,
  "subunit_ids": [1, 2],
  "has_push_token": false,
  "social_logins": [],
  "favorite_stores": [1, 2]
}
KeyDescriptionType
idMember IDinteger
propertiesObject with member's propertiesJSON Object
properties['language']Language used by userstring
consentsMember's consents JSON model (see below)JSON Object
sms_statusStatus of sms channelstring
email_statusStatus of email channelstring
push_statusStatus of push channelstring
optin_channelChannel (x-product-name header) which had been used to register memberstring
optin_subchannelSubchannel (X-Subproduct-Name header) which had been used to register memberstring
created_atTime when the user was firstly createdstring
updated_atTime when the user was last updatedstring
banned_untilTime since member was/is banned (not updatable through OAuth)string
person_idUnique Member's identifier (set internally)string
has_passwordHas this Member password set?boolean
subunit_idsSubunits the member belongs to. See Subunitsinteger[]
has_push_tokenHas this Member push token set?boolean
social_loginsMember social login typesstring[]
favorite_storesMember favorite stores. See Storesinteger[]

Member's consents JSON model#

JSON model for consents. Keys can be dynamically created based on customer's need.
It consists of: 'consent-slug': { "status": <boolean_value>, "updated_at": <time> }
If status is true - Member approved consent.
If status is false - Member disapproved consent.
If you can't find slug on Member: he/she haven't disapproved or approved consent.
updated_at is the time of last consent update. It can be also not provided or null.
Available consents for Loyalty Club are described in schema.

Validation on members#

All members' endpoints have properties validation. Properties are validated to conform loyalty club's schema.
If something is wrong, you will receive explanation of errors in response.

Schema validation errors#

Example response (with code 400):
{
  "email": [
    {
      "error": "invalid",
      "property": "email"
    }
  ],
  "properties": [
    {
      "error": {
        "language": [
          {
            "error": "value_not_match",
            "value": "een",
            "values": "en, no",
            "property": "language"
          }
        ],
        "optin_channel": [
          {
            "error": "not_contain_required_property",
            "property": "optin_channel"
          }
        ]
      }
    }
  ]
}
ErrorDescription
invalid_date_formatInvalid date format
invalid_time_formatInvalid time format
invalid_date_time_formatInvalid date with time format
must_be_valid_RFC3339_date_time_stringFormat beyond the RFC3339 standard
invalid_URIInvalid URI
additional_array_elementsAdditional elements in the array
additional_propertiesAdditional properties
property_not_match_all_ofThe property did not match all of the required schemas
property_not_match_any_ofThe property did not match any of the required schema
property_matched_more_than_oneThe property matched more than one of the required schemas
depends_on_a_missing_propertyThe validated property has a property that depends on the other missing property
value_not_matchThe property value did not match one of the given values.
schema_cannot_be_foundThe extended schema cannot be found
not_a_valid_schemaThe property was not a valid schema
minimum_string_lengthThe property was not of a minimum string length of minimum limit.
maximum_string_lengthThe property was not of a maximum string length of maximum limit.
less_item_than_minimumThe property did not contain a minimum number of minimum items limit
more_item_than_maximumThe property had more items than the allowed items limit
less_properties_than_minimumThe property did not contain a minimum number of properties
more_properties_than_maximumThe property had more properties than allowed
not_have_value_of_exclusivelyThe property did not have value of exclusively
not_have_value_of_inclusivelyThe property did not have value of inclusively
more_decimal_places_than_maximumThe property had more decimal places than the allowed maximum
matched_the_disallowed_schemaThe property matched the disallowed schema
the_regex_not_matchThe property did not match the regex
not_contain_required_propertyThe validated property did not contain a required property
contained_undefined_propertiesThe validated property contained undefined properties
referenced_schema_cannot_be_foundThe referenced schema cannot be found
invalid_schemaThe property was not a valid schema
matched_one_or_more_typesThe property matched one or more of the given types
one_or_more_types_not_matchThe property did not match one or more of the given types
type_not_matchThe property did not match the given type
contained_duplicated_array_valuesThe property contained duplicated array values
invalid_emailInvalid email format
invalid_mxInvalid (inaccessible) email domain
disposable_emailThe email was disposable
duplicated_emailThe email was duplicated in community
non_existing_stores_idsThere is no existing stores with given ids
Previous
Common Data Formats
Next
API Entity Model
Built with