POST
/
users
/
external
/
link
{
  "partner": {
    "partner_id": "partner_123",
    "user_external_id": "user_456"
  },
  "merchant": {
    "merchant_id": "merchant_789",
    "user_external_id": "customer_101"
  }
}
{
  "code": "ok",
  "message": "User link created successfully",
  "data": {
    "link_id": "link_abc123",
    "partner_user_id": "benji_user_456",
    "merchant_user_id": "benji_merchant_user_101",
    "created_date": "2024-09-25T10:30:00.000Z"
  }
}
The Bearer token to be used on this API is your partner access token
This endpoint allows you to link a partner user with a merchant user in the Benji platform. This is essential for enabling reward transactions between the partner and merchant systems.

Request Body

partner
object
required
Partner user information
merchant
object
required
Merchant user information

Return values

code
string
Status code indicating the result of the operation
message
string
Human-readable message describing the result
data
object
Response data containing the link information
{
  "partner": {
    "partner_id": "partner_123",
    "user_external_id": "user_456"
  },
  "merchant": {
    "merchant_id": "merchant_789",
    "user_external_id": "customer_101"
  }
}
{
  "code": "ok",
  "message": "User link created successfully",
  "data": {
    "link_id": "link_abc123",
    "partner_user_id": "benji_user_456",
    "merchant_user_id": "benji_merchant_user_101",
    "created_date": "2024-09-25T10:30:00.000Z"
  }
}
Anonymous Users: When merchant.user_external_id is not provided, Benji treats this as an anonymous user. This is useful for scenarios where you want to track partner user activity without requiring merchant user identification.
This endpoint establishes the connection required for reward transactions to flow between partner and merchant systems. Make sure both the partner and merchant are properly configured in your Benji account before calling this endpoint.