Sale percentage

A list of all publicly available methods for interacting with the API.

GET

Get cart sale percentage Sale percentage ### Sale percentage #### What is the sale percentage? Sale percentage is a discount that is applied to the price of the order. The sale percentage is calculated based on the user's activity on the site, or referrals. The more active the user is, the higher the discount. #### Referral program It uses __sp-referral__ header as a referral code, more you can find on [wiki welcome page](/apidocs). #### How to apply the sale percentage? This is already calculated in the price of the orders, you don't need to do anything, just purchase the order. Cart -/cart/sale-percentage

Query method

GEThttp://apilocal.stableproxy.com/v2/cart/sale-percentage

Code examples

1async function getCartSalePercentage() {
2   const baseUrl = 'http://apilocal.stableproxy.com/v2';
3   const req = await fetch(baseUrl + '/cart/sale-percentage', {
4         method: 'GET',
5         headers: {
6            'Content-Type': 'application/json'
7         }
8      }
9   );
10   
11   const res = await req.json();
12}

Examples of answers