Fetching User Information

Customer Card

A call to endpoint

GET /api/2/card/user?locale=locale 

requires user_access_token

{
    "cards": [
        {
            "id": "<CARD_ID>",
            "user_id": [
                "<USER_ID>"
            ],
            "user_id_featured": {
                "<USER_ID>": true
            },
            "user_id_deletable": {
                "<USER_ID>": false
            },
            "identifier": "<CARD_IDENTIFIER>",
            "identifier_actual": "<CARD_IDENTIFIER>",
            "display_number": null,
            "expiration": null,
            "state": "active",
            "state_text": "active",
            "card_definition": {
                "name": "Luckey",
                "representation": {
                    "name": "qr-code",
                    "card_layout": "neodefault-a",
                    "data": []
                },
                "card_presentation": {
                    "show_avatar": true,
                    "avatar": {
                        "type": "image",
                        "data": {
                            "src": "<AVATAR_URL>",
                            "alt": "avatar"
                        }
                    },
                    "show_data": true,
                    "data_fields": [
                        "firstName"
                    ],
                    "show_currency": true,
                    "currency": {
                        "stack_id": "<CURRENCY_ID>",
                        "block_id": null,
                        "image": {
                            "src": "",
                            "alt": ""
                        },
                        "prefix": "",
                        "suffix": ""
                    },
                    "show_buttons": false,
                    "buttons": []
                }
            },
            "card_tier": {
                "card_tier_id": "<CARD_TIER_ID>",
                "name": "My card ",
                "image": {
                    "src": "<TIER_IMAGE_URL>",
                    "alt": ""
                },
                "background": {
                    "src": "<TIER_BACKGROUND_URL>",
                    "alt": ""
                },
                "card_count": null,
                "color_modes": {
                    "card_tier_name_color": {
                        "mode": "primary",
                        "tint": "default"
                    },
                    "card_number_color": {
                        "mode": "primary",
                        "tint": "default"
                    },
                    "card_state_color": {
                        "mode": "primary",
                        "tint": "default"
                    },
                    "date_and_time_color": {
                        "mode": "primary",
                        "tint": "default"
                    }
                }
            },
            "tier_start_date": "2025-03-12T00:00:00+00:00",
            "updated": "2025-03-12T00:00:00+00:00",
            "created": "2025-03-12T00:00:00+00:00"
        }
    ]
}

The first item on the response is the featured card for user. The element cards.index.card_definition.representation contains how the <CARD_IDENTIFIER> is to be displayed

User Person

A call to endpoint

GET /api/1/user/person/me?locale=locale

requires user_access_token

Response

{
    "user_id": "<USER_ID>",
    "email": "<EMAIL>",
    "gender": "<GENDER>",
    "firstName": "<FIRST_NAME>",
    "infix": "<INFIX>",
    "lastName": "<LAST_NAME>"
}

Additional response would include dateOfBirth, postalCode, nickname

If instead, using the client_access_token, call this endpoint

GET /api/1/user/person/details/<USER_ID>

User Optin

A call to the endpoint

GET /api/1/user/optins?locale={{locale}}

requires user_access_token

Response

[
    {
        "id": "<OPTIN_ID>",
        "name": "Privacy and Cookie Policy",
        "description": "<DESCRIPTION>",
        "purpose": {
            "name": "privacy-and-cookie-policy",
            "can_be_updated": true,
            "required": true
        },
        "updates": [],
        "opted_in": false
    },
    {
        "id": "<OPTIN_ID>",
        "name": "Terms and Conditions",
        "description": "<DESCRIPTION>",
        "purpose": {
            "name": "terms-and-conditions",
            "can_be_updated": true,
            "required": true
        },
        "updates": [],
        "opted_in": false
    }
]

This endpoint returns the opt-ins the user has opted-in.