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

PUT bulk customer endpoint

Create bulk offers, vouchers, promotions, or increment a customer's existing balance by value defined by amount debits are created by negative amount values and deposits by positive values. Use field scheduled to schedule a transaction. If you desire to process the transaction imminently, do not include optional field scheduled or assign it a string date in the past.

transactions is an array of objects that define actions, offers, debits, or credits. Max transactions length per request is limited to 1,000. ref_id is a convenient optional reference field id for tracking of the offer transaction as needed by other 3rd party CRM, CDP, backend servers, or other integrations. If used in conjunction with Offers, ref_id will be attached to the order attributes associated with redemption, viewable in the Shopify admin or via Shopify Orders API requests.

To use the bulk endpoint, you must first contact support@shopwaive.com to notify us of your interest and we can enable bulk operations on your store

The response body includes scheduled, which is the number of transactions scheduled imminently or in the future as defined by the request body. Response body field id is the bulk import id to reference status of a pending offer scheduled.

Last updated