Retrieve data about a consumer who has previously made a purchase with Catch.

Overview

The GET User Data endpoint returns data about a consumer that's associated with the merchant. This service may be used to display information such as the consumer's available Catch rewards balance in the merchant's application.

In order to retrieve user data, a unique identifier for the consumer in the merchant's own system must have been previously associated with a valid Catch user account. This association typically happens automatically based on the value of a Checkout's merchant_user_id field when a consumer completes a Catch checkout.

Catch recommends displaying the sum total when showing a consumer their available rewards balance. For applications that need to differentiate between reward types, Catch also provides the amounts of the one or more types of rewards that sum to all available rewards.

Path

GET https://<environment>.getcatch.com/v1/user_data/<merchant_user_id>

Variable nameDescriptionPossible values
<environment>The Catch environment in which you’re making the request.See Authentication.
<merchant_user_id>The ID of the consumer in the merchant's system whose data should be retrieved.merchant_user_id must match a value that was previously associated with the consumer when creating a Checkout using the POST Checkout endpoint. As such, the GET User Data is exclusively available for consumers who have already used Catch with the merchant.

Parameters

(none)

Success Response

Amounts object

Parameter nameFormatDescription
available_rewards_merchantinteger (in cents)The total amount of available rewards the consumer has that are exclusively available for the merchant.
available_rewards_flexinteger (in cents)The total amount of available rewards the consumer has that are available for any merchant that offers Catch payments.
available_rewards_totalinteger (in cents)The total amount of available rewards the consumer has that can be redeemed with the merchant. This figure includes both merchant-specific and flex rewards, and is therefore always the sum of available_rewards_merchant and available_rewards_flex.
currencystring (in ISO_4217 format)The currency in which the amounts are represented.
{
  "amounts": {
   "available_rewards_merchant": 200,
   "available_rewards_flex": 100,
   "available_rewards_total": 300,
   "currency": "USD"
  }
}

Error Responses

If Catch is unable to successfully fulfill a GET User Data request, a 4XX range response will be returned, along with standard error response body including error_type and message fields.

HTTP Status CodeError TypeExample MessageDescription
404NOT_FOUND"No valid user found."Returned if a valid user corresponding to the given merchant_user_id cannot be found. This may mean that the merchant_user_id has not been previously associated with a Catch user by the merchant, or that the associated user's Catch account has been deleted.
404 Not Found
{
  "error_type": "NOT_FOUND",
  "message": "No valid user found."
}