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

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

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 [].action 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