Link Search Menu Expand Document

Retrieving a user

Returns an OK code and a JSON for the user. A sample is shown below:

{
    "result": {
        "code": 1,
        "status": "ok"
    },
    "results": {
        "user_info": {
            "address_housenumber": "46",
            "address_housenumber_extension": "B",
            "address_latitude": null,
            "address_line_2": "Apartment #416",
            "address_line_3": null,
            "address_longitude": null,
            "address_postalcode": "1015CB",
            "address_regionstate": "Any State",
            "address_streetname": "Any Street",
            "address_towncity": "Amsterdam",
            "authentication_point": null,
            "authentication_point_identifier": "99911166488945",
            "auxiliary_identifier": null,
            "average_basket_value": "0.00",
            "birthday": "1981-07-21",
            "business_group": null,
            "country_code": "NL",
            "created_date": "2024-01-31 15:15:43",
            "days_since_last_purchase": null,
            "entity_code": {
                "code": "3935159",
                "type": "regular"
            },
            "favorite_store": null,
            "first_name": "Josephine",
            "frequency": 1,
            "gender": "M",
            "id": 3935159,
            "is_employee": false,
            "is_influencer": false,
            "language": null,
            "last_modified_date": "2024-01-31 15:21:05",
            "last_name": "Bloggs",
            "loyalty_status": {
                "date_reached": null,
                "last_review_date": "2024-01-31T15:15:43+00:00",
                "loyalty_level_id": null,
                "monetary_balance_current": 0,
                "next_review_date": null,
                "points_balance_current": 5,
                "points_to_proceed_next_level": null,
                "points_to_remain_current_level": null
            },
            "mailing_list": {
                "mailing_list_sub_offered": false,
                "mailing_list_subscribed": true,
                "printed_mailing_list_subscribed": true
            },
            "member_number": "3935159",
            "monetary": 3,
            "number_of_purchases": 0,
            "obfuscated": false,
            "offline_shopper": false,
            "online_shopper": false,
            "opt_in_programme": {
                "join_date": "2024-01-31T15:15:43+00:00",
                "programme_opted_in": true
            },
            "opt_in_secondary": false,
            "overall": 3,
            "phone_number": "+31655222555",
            "points_wallet_total": 5,
            "push_notification_subscription": {
                "subscribed": false,
                "subscriptions": []
            },
            "recency": 5,
            "referral_channel": null,
            "referral_code": "gzo85d",
            "referred": true,
            "referring_user": {
                "authentication_point_identifier": null,
                "campaign_id": 2539,
                "id": 3930871,
                "referral_channel": null,
                "referral_code": "4t38p9"
            },
            "registered": true,
            "signup_channel": null,
            "signup_store": {
                "signup_store_id": 1383,
                "signup_store_name": "MOCO Museum store"
            },
            "stores": "",
            "total_cashback_balance": 0,
            "user_id": 3935159,
            "username": "somedude0.11073246009398896@spaaza.com"
        },
        "result_type": "get-user"
    }
}

Overview

  • Call name: get-user
  • Endpoint URL: https://api0.spaaza.com/internal/get-user
  • Request methods: GET
  • Response Content-Type: application/json
  • Auth required: yes
  • X-Spaaza-MyPrice-App-Hostname header requirement: mandatory when using privileged authentication or when using the username parameter to look up a user with admin authentication

This API call retrieves information about an existing user.

Version-specific information

The following version-specific changes apply to this endpoint. See the versioning page for more details.

Version Change details
>= 1.4.10 The gender parameter returned supports values male, female, nonbinary, transgender, agender, genderqueer, genderfluid, bigender, twospirit, androgynous, pangender, neutrois, demigender and other.

HTTP Parameters

The following HTTP parameters can be passed to the API:

Parameter Description
chain_id The chain id to which the user is connected. In the case of admin authentication, this parameter can be used in conjunction with the user_id parameter to look up the user (or the username parameter can be used on its own to look up the user). If this parameter is used with admin authentication, the user_id parameter must also be supplied.
user_id The ID of the user. In the case of admin authentication, this parameter can be used in conjunction with the chain_id parameter to look up the user or the username parameter (or the username parameter can be used on its own to look up the user). If this parameter is used with admin authentication, the chain_id parameter must also be supplied.
username The username of the user in email address form. This parameter can be used to look up the user with either admin or privileged authentication. In the case of admin authentication, if this parameter is supplied, and the parameters user_id and chain_id have already been supplied, this parameter will not be used to look up the user. If this parameter is used to look up the user then the X-Spaaza-MyPrice-App-Hostname header is required.
authentication_point_identifier The ID of the user in a third party identity system such as webstore. If the user_id parameter has been supplied, this parameter will not be used to look up the user information. If the username parameter has also been supplied and has been unsuccessful in looking up a user, the authentication_point_identifier parameter will be used.
affiliate_code The affiliate code of the user.
referral_code The referral_code of the user.
auxiliary_identifier The auxiliary_identifier refers to an additional user identifier used in a third-party system. By utilizing the access_token with the appropriate chain_dummy_email scope, it is possible to authenticate and retrieve user information based on this identifier. When using the auxiliary_identifier parameter to look up a user, it is necessary to include the X-Spaaza-MyPrice-App-Hostname header in the request.

Permissions

Admin authentication: the performing user needs to be logged in and have read access to the entity (business or chain) to which the user is connected.

Privileged authentication: the use of privileged authentication is permitted for this endpoint. This API endpoint allows delegated authentication.