Get cart sale percentage

Список всех доступных методов для взаимодействия с API.

GET

Get cart sale percentage

/cart/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.

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.

Способ запроса

GEThttps://api.stableproxy.com/v2/cart/sale-percentage

Примеры кода

1const baseUrl = "https://api.stableproxy.com/v2";
2const response = await fetch(baseUrl + "/cart/sale-percentage", {
3 method: "GET",
4 headers: {
5 "Content-Type": "application/json"
6 }
7});
8const data = await response.json();

Примеры ответов

Success response200application/json
{
  "data": {
    "sale_percentage": 0,
    "sale_percentage_multiplier": 1
  },
  "good": true,
  "timestamp": 1731315460,
  "cause": {
    "type": "anonymous",
    "user_id": -1
  }
}