### Zamówienie przed zakupem Przekształć swoje zamówienie w prośbę o zakup, a następnie wyślij __order_id__,__total_price__ do [v2/cart/purchaser](/apidocs/cart/purchase).

Lista wszystkich publicznie dostępnych metod interakcji z API.

POST

Zamów pakiet -/cart/order

Metoda zapytania

POSThttp://apilocal.stableproxy.com/v2/cart/order

Parametry zapytania

IdentyfikatorRegulaminPrzykład
traffic-unitNie koniecznienullablestringin:gb"gb"
period-unitNie koniecznienullablestringin:weeks, weeks, months, years"weeks"
traffic-amountrequiredintegerin:25, 100, 400, 800, 5000"25"
period-amountrequiredintegerin"1"
countNie koniecznienullableinteger30
countriesNie koniecznienullablearray{"UA": 10, "PL": 20}
typerequiredstringin:shared, private, mobile_rotating_gb, residential_gb, datacenter_gb, residential_city_gb, residential_static_gb, mobile_gb, mobile_static, mobile_static_gb"shared"
currencyNie koniecznienullablestringcurrency_code"USD"
has-unlimited-auth-ipsNie koniecznienullableex-booleanfalse
serviceNie koniecznienullablestringilluminate\_validation\_rules\_in97
ip-scoreNie koniecznienullablenumeric29

Przykłady kodu

async function postCartOrder() {
   const baseUrl = 'http://apilocal.stableproxy.com/v2';
   const req = await fetch(baseUrl + '/cart/order', {
         method: 'POST',
         headers: {
            'Content-Type': 'application/json'
         },
         body: JSON.stringify({
            "traffic-unit": "gb",
            "period-unit": "weeks",
            "traffic-amount": "25",
            "period-amount": "1",
            "count": 30,
            "countries": {"UA": 10, "PL": 20},
            "type": "shared",
            "currency": "USD",
            "has-unlimited-auth-ips": false,
            "service": 97,
            "ip-score": 29
         }),
      }
   );
   
   const res = await req.json();
}

Przykłady odpowiedzi