Skip to main content

Potential Discount

Clients can set up Memberships in Spektrix to power specific discount opportunities for Members.

We have created a new endpoint to find out the potential discount of a basket if you were to sign up to a clients membership scheme. This is built on top of the current basket endpoint, allowing you to pass the id of an available Membership.

GET Call​

To query the API for this information, you can use the following;

https://domain/clientname/api/v3/basket/potentialdiscount?membershipId={{id}}

{{id}} being replaced by a valid Membership ID.

To find the ID's of available memberships, you can use;

https://domain/clientname/api/v3/memberships

Response​

The response will give you the new Basket Total (including cost of membership), the Total Discount, and the Transaction Commission Waived Status

Response Example​

{
"basketTotal": 16.25,
"totalDiscount": 5.00,
"transactionCommission": {
"waived": true,
"amount": 2.25
}
}

Troubleshooting​

If the totalDiscount appears as 0 when you'd expect a discount to be applied, check that the client has implemented the following:

  • the offer eligibility is using the membership, and not other criteria, such as a tag, which may require a logged in customer, or the membership to be already purchased.
  • when setting up the offer limits, the client has checked the checkbox 'Override this, so that the offer will apply (and be visible online and in the API) before a customer is in the basket [...]'

More information on offers can be found on our Support Centre.