Customer API

Get customer store credit balances; make adjustments based on their actions with the Shopwaive Customer API

GET customer endpoint

Fetch customer account details, including account balance, a ledger of account transactions, and customer orders.

Response Body

Customer orders array is only included in the response body if you append ?orders=true as a query parameter on the request route url

The referralurl is only returned if your Referral program is enabled. Learn more about Shopwaive's powerful Referral program for customers and affiliates. If new customers sign up using the referral link, you can choose to reward one or both the referrer and new customer

offers {} object

Customer offers object is only included in the response body if you append ?offers=true as a query parameter on the request route url

offers.items [] object

partial_amount and remaining can be equivalent in value. The edge case when partial_amount is less than remaining is when a previous order partially reduces the original offer available redemption amount at the same time that a customers available balance is less than remaining because of a manual adjustment made to balance for example. This means even though a remaining amount is still attached to that offer, the customers balance is not enough to cover the full remaining offer amount

The offers object conveniently filters the actions array and only returns eligible offers. A comprehensive list of all offers including expired and redeemed can be found with other actions in the activity array

activity[] object

Customer activity array is only included in the response body if you append ?activity=true as a query parameter on the request route url

The expirationdate field is only applicable if the expires field is equal to true. If multiple expiry dates are enabled in Settings, the expirationdate may apply to the action object defined in the activity array if a corresponding amount field is defined. See Action API for more details

POST customer endpoint

Set a customer balance equal to value defined by balance

Header

Request Body

Response Body

Good to know: This API method sets customer balance to a predefined decimal value (i.e. independent of locale or currency). Currency is chosen within the store platform.

PUT customer endpoint

Increment a customer's existing balance by value defined by amount debits are created by negative amount values and deposits by positive values.

Header

Request Body

Request Response

Tip: amount is defined as the total amount to add or subtract to the existing customer balance. Customers that do not yet have a Shopify account are automatically created. To set customer balance to a predefined amount, instead use Customer API POST

Last updated