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
}
}