Skip to content

Read a customer and their rewards

Request

Returns the customer together with every reward they hold. rewards is an array so a customer can hold multiple independent rewards in future; today it holds at most one, and a customer with no reward returns [] rather than an error. shop_reward_id is null when there is no discount to address the reward by. A 404 means the customer does not exist.

Security
api_key
Path
shopCustomerIdstringrequired

The customer's shop_customer_id.

Headers
Acceptstringrequired

Accept must be application/json

Example:application/json
curl -i -X GET \
  'https://app.useonward.com/api/v1/customers/{shopCustomerId}' \
  -H 'Accept: application/json' \
  -H 'X-API-Key: YOUR_API_KEY_HERE'

Responses

Successful operation

Bodyapplication/json
shop_customer_idstring, <= 255 charactersrequired

Your unique identifier for the Customer. For a Shopify shop, the numeric Shopify customer ID (6072418623), not the GID. Must be unique across your customers and stable over time — Onward uses it to look up and de-duplicate customers, so the same value must always refer to the same customer.

Example:"6072418623"
first_namestring or null, <= 255 characters
Example:"Sally"
last_namestring or null, <= 255 characters
Example:"Loo"
emailstring or null, (email), <= 255 characters
Example:"sally@example.com"
phone_numberstring or null, (phone), <= 255 characters
Example:"+13105551234"
rewardsArray of objects(Reward)required

Every reward this customer holds. Empty when they hold none.

Response
{ "shop_customer_id": "6072418623", "first_name": "Sally", "last_name": "Loo", "email": "sally@example.com", "phone_number": "+13105551234", "rewards": [ { … } ] }