> ## Documentation Index
> Fetch the complete documentation index at: https://docs.withbenji.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get User Status Data

> Endpoint to retrieve user basic data, as well as their linked partners and merchants

> [!NOTE]
>
> The `x-api-key` header value to be used on this API is a **user-based access token**.

**id** `integer` *required*

The Benji Platform ID of the user

### Return values

**user** `object`

A user object property

**properties**

**id** `integer`

Benji Platform user identifier

**first\_name** `string`

The user's first name

**last\_name** `string`

The user's last name

**merchants** `array`

An array of merchants that the user is connected to

**items**

**properties**

**merchant\_id** `integer`

The ID of the merchant partner in the Benji Platform

**user\_id** `integer`

The ID of the user in the Benji Platform

**external\_id** `string`

The user's id on the specific merchant

**total\_rewards\_earned** `integer`

The total amount of merchant specific rewards earned on the Benji Platform

**total\_rewards\_redeemed** `integer`

The total amount of merchant specific rewards redeemed on the Benji Platform

**created\_date** `datetime`

The date this user was associated to the merchant partner on the Benji platform

**partner\_status\_tiers** `array`

An array of user partner status tier objects

**items**

**properties**

**partner\_id** `integer`

The ID of the partner in the Benji Platform

**partner\_status\_tier\_id** `integer`

The ID of the partner status tier in the Benji Platform

**user\_id** `integer`

The ID of the user in the Benji Platform

**external\_id** `string`

The user's loyalty program identifier

**total\_rewards** `integer`

The current rewards amount in the user's account, regardless of Benji originated transactions

**total\_rewards\_earned** `integer`

The total amount of partner specific rewards earned on the Benji Platform

**total\_rewards\_redeemed** `integer`

The total amount of partner specific rewards redeemed on the Benji Platform

**created\_date** `datetime`

The date this user was associated to the loyalty partner on the Benji platform

```json 200 theme={null}
{
    "code": "ok",
    "data": {
        "user": {
            "created_date": "2024-08-05T16:54:35.804289+00:00",
            "email": "test@test.com",
            "first_name": "Test",
            "last_name": "User",
            "id": 1,
            "merchants": [
                {
                    "created_date": "2024-08-23T19:46:01.684468+00:00",
                    "external_id": "7267281436852",
                    "id": 1,
                    "merchant_id": 1,
                    "total_rewards_earned": 266,
                    "total_rewards_redeemed": 0,
                    "user_id": 1
                }
            ],
            "partner_status_tiers": [
                {
                    "created_date": "2024-08-05T17:31:43.002778+00:00",
                    "external_id": "123456789",
                    "id": 1,
                    "partner_id": 1,
                    "partner_status_tier_id": 1,
                    "total_rewards": 19700,
                    "total_rewards_earned": 0,
                    "total_rewards_redeemed": 0,
                    "user_id": 1
                }
            ]
        }
    }
}
```

```json 400 theme={null}
{
  "error": "invalid_token",
  "message": "Invalid token"
}
```

```json 401 theme={null}
{
  "error": "unauthorized_request",
  "message": "Token is not authorized to make this request"
}
```

```json 404 theme={null}
{
  "error": "user_does_not_exist",
  "message": "The user does not exist"
}
```

> [!TIP]
>
> Note that you will only receive data that you as a loyalty partner or merchant partner are allowed to see based on the permissions in the access token you provide to the API.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.