APIAPI ProxyShardGeneral

General

Общие операции (профиль, заказы, справочники)

Создать и оплатить заказ

POSThttps://user-api.proxyshard.com/user/api/orders/purchase

Покупка по имени продукта, локации и циклу. Для Datacenter/ISP; location обязателен. Для Standart Residential Proxy; location не требуется.

Authorizations
bearerAuth
Authorizationstringrequired

Bearer authentication header of the form Bearer <token>.

Body
application/json
Responses
200Успешноapplication/json
successbooleanrequired
messagestringrequired
order_idintegerrequired
400Ошибка валидации/баланса/недостаток стокаapplication/json
successbooleanrequired
messagestringrequired
401Неавторизованapplication/json
successbooleanrequired
messagestringrequired
POST/user/api/orders/purchase
POST /user/api/orders/purchase HTTP/1.1
Host: user-api.proxyshard.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*

{
  "product": "Datacenter Proxy",
  "location": "text",
  "cycle": "text",
  "quantity": 1,
  "promo_code": "text",
  "auto_renewal": false,
  "addons": [
    {
      "addon_key": "p0f_slots",
      "qty": 1
    }
  ]
}
curl -X POST 'https://user-api.proxyshard.com/user/api/orders/purchase' \
  -H 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"product":"Datacenter Proxy","location":"text","cycle":"text","quantity":1,"promo_code":"text","auto_renewal":false,"addons":[{"addon_key":"p0f_slots","qty":1}]}'
import requests

# API token — see Authorizations above.
token = "YOUR_SECRET_TOKEN"

url = "https://user-api.proxyshard.com/user/api/orders/purchase"
headers = {
    "Authorization": f"Bearer {token}",
}
payload = {
    "product": "Datacenter Proxy",
    "location": "text",
    "cycle": "text",
    "quantity": 1,
    "promo_code": "text",
    "auto_renewal": False,
    "addons": [
        {
            "addon_key": "p0f_slots",
            "qty": 1,
        },
    ],
}

response = requests.post(url, headers=headers, json=payload, timeout=30)
response.raise_for_status()
print(response.status_code)
print(response.text)
// API token — see Authorizations above.
const token = "YOUR_SECRET_TOKEN";

const url = "https://user-api.proxyshard.com/user/api/orders/purchase";
const payload = {
  "product": "Datacenter Proxy",
  "location": "text",
  "cycle": "text",
  "quantity": 1,
  "promo_code": "text",
  "auto_renewal": false,
  "addons": [
    {
      "addon_key": "p0f_slots",
      "qty": 1
    }
  ]
};

const response = await fetch(url, {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${token}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify(payload),
});

console.log(response.status);
console.log(await response.text());
package main

import (
	"bytes"
	"fmt"
	"io"
	"log"
	"net/http"
)

func main() {
	// API token — see Authorizations above.
	token := "YOUR_SECRET_TOKEN"

	url := "https://user-api.proxyshard.com/user/api/orders/purchase"
	body := bytes.NewBufferString(`{
  "product": "Datacenter Proxy",
  "location": "text",
  "cycle": "text",
  "quantity": 1,
  "promo_code": "text",
  "auto_renewal": false,
  "addons": [
    {
      "addon_key": "p0f_slots",
      "qty": 1
    }
  ]
}`)

	req, err := http.NewRequest("POST", url, body)
	if err != nil {
		log.Fatal(err)
	}
	req.Header.Set("Authorization", "Bearer "+token)
	req.Header.Set("Content-Type", "application/json")

	resp, err := http.DefaultClient.Do(req)
	if err != nil {
		log.Fatal(err)
	}
	defer resp.Body.Close()

	out, err := io.ReadAll(resp.Body)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(resp.Status)
	fmt.Println(string(out))
}
// Cargo.toml: reqwest = { version = "0.12", features = ["json"] }, tokio = { version = "1", features = ["full"] }, serde_json = "1"

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    // API token — see Authorizations above.
    let token = "YOUR_SECRET_TOKEN";

    let client = reqwest::Client::new();
    let response = client
        .post("https://user-api.proxyshard.com/user/api/orders/purchase")
        .header("Authorization", format!("Bearer {token}"))
        .json(&serde_json::json!({
          "product": "Datacenter Proxy",
          "location": "text",
          "cycle": "text",
          "quantity": 1,
          "promo_code": "text",
          "auto_renewal": false,
          "addons": [
            {
              "addon_key": "p0f_slots",
              "qty": 1
            }
          ]
        }))
        .send()
        .await?;

    println!("{}", response.status());
    println!("{}", response.text().await?);
    Ok(())
}
using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;

class Program
{
    static async Task Main()
    {
        // API token — see Authorizations above.
        var token = "YOUR_SECRET_TOKEN";

        using var client = new HttpClient();
        client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);

        var request = new HttpRequestMessage(HttpMethod.Post, "https://user-api.proxyshard.com/user/api/orders/purchase");
        request.Content = new StringContent("""
            {
              "product": "Datacenter Proxy",
              "location": "text",
              "cycle": "text",
              "quantity": 1,
              "promo_code": "text",
              "auto_renewal": false,
              "addons": [
                {
                  "addon_key": "p0f_slots",
                  "qty": 1
                }
              ]
            }
            """, Encoding.UTF8, "application/json");

        var response = await client.SendAsync(request);
        Console.WriteLine((int)response.StatusCode);
        Console.WriteLine(await response.Content.ReadAsStringAsync());
    }
}
// build: c++ -std=c++17 main.cpp -lcurl
#include <curl/curl.h>

#include <iostream>
#include <string>

static size_t write_cb(char *ptr, size_t size, size_t nmemb, void *userdata) {
    static_cast<std::string *>(userdata)->append(ptr, size * nmemb);
    return size * nmemb;
}

int main() {
    // API token — see Authorizations above.
    const std::string token = "YOUR_SECRET_TOKEN";

    curl_global_init(CURL_GLOBAL_DEFAULT);
    CURL *curl = curl_easy_init();
    if (!curl) {
        std::cerr << "curl_easy_init failed\n";
        curl_global_cleanup();
        return 1;
    }

    struct curl_slist *headers = nullptr;
    headers = curl_slist_append(headers, ("Authorization: Bearer " + token).c_str());
    headers = curl_slist_append(headers, "Content-Type: application/json");

    const std::string body = R"json({
  "product": "Datacenter Proxy",
  "location": "text",
  "cycle": "text",
  "quantity": 1,
  "promo_code": "text",
  "auto_renewal": false,
  "addons": [
    {
      "addon_key": "p0f_slots",
      "qty": 1
    }
  ]
})json";

    std::string response;
    curl_easy_setopt(curl, CURLOPT_URL, "https://user-api.proxyshard.com/user/api/orders/purchase");
    curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
    curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
    curl_easy_setopt(curl, CURLOPT_POSTFIELDS, body.c_str());
    curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, static_cast<long>(body.size()));
    curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_cb);
    curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response);

    const CURLcode rc = curl_easy_perform(curl);
    if (rc != CURLE_OK) {
        std::cerr << curl_easy_strerror(rc) << "\n";
    } else {
        long status = 0;
        curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &status);
        std::cout << status << "\n" << response << "\n";
    }

    curl_slist_free_all(headers);
    curl_easy_cleanup(curl);
    curl_global_cleanup();
    return rc == CURLE_OK ? 0 : 1;
}
{
  "success": true,
  "message": "text",
  "order_id": 1
}
{
  "success": true,
  "message": "text"
}
{
  "success": true,
  "message": "text"
}

Рассчитать стоимость заказа

GEThttps://user-api.proxyshard.com/user/api/orders/calculate

Рассчитывает цену по названию продукта, названию цикла и количеству. Использует те же правила проверки, что и при покупке (разрешенные платежные циклы, правила промоакций).

Authorizations
bearerAuth
Authorizationstringrequired

Bearer authentication header of the form Bearer <token>.

Query parameters
productstringrequired
locationstring· nullableoptional
cyclestring· nullableoptional
quantityinteger· nullableoptional
promo_codestring· nullableoptional
addons_jsonstring· nullableoptional

Массив дополнений в URL-кодированном JSON, например [{"addon_key":"p0f_slots","qty":5}]

Responses
200Успехapplication/json
original_priceintegeroptional
final_priceintegeroptional
discount_percentintegeroptional
addons_priceintegeroptional

Общая стоимость дополнений в минимальных единицах

total_with_addonsintegeroptional

final_price + addons_price

400Ошибка проверкиapplication/json
successbooleanrequired
messagestringrequired
401Требуется авторизацияapplication/json
successbooleanrequired
messagestringrequired
GET/user/api/orders/calculate?product=text
GET /user/api/orders/calculate?product=text HTTP/1.1
Host: user-api.proxyshard.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
curl -X GET 'https://user-api.proxyshard.com/user/api/orders/calculate?product=text' \
  -H 'Authorization: Bearer YOUR_SECRET_TOKEN'
import requests

# API token — see Authorizations above.
token = "YOUR_SECRET_TOKEN"

url = "https://user-api.proxyshard.com/user/api/orders/calculate"
params = {
    "product": "text",
}
headers = {
    "Authorization": f"Bearer {token}",
}

response = requests.get(url, params=params, headers=headers, timeout=30)
response.raise_for_status()
print(response.status_code)
print(response.text)
// API token — see Authorizations above.
const token = "YOUR_SECRET_TOKEN";

const url = "https://user-api.proxyshard.com/user/api/orders/calculate?product=text";

const response = await fetch(url, {
  method: "GET",
  headers: {
    "Authorization": `Bearer ${token}`,
  },
});

console.log(response.status);
console.log(await response.text());
package main

import (
	"fmt"
	"io"
	"log"
	"net/http"
)

func main() {
	// API token — see Authorizations above.
	token := "YOUR_SECRET_TOKEN"

	url := "https://user-api.proxyshard.com/user/api/orders/calculate?product=text"

	req, err := http.NewRequest("GET", url, nil)
	if err != nil {
		log.Fatal(err)
	}
	req.Header.Set("Authorization", "Bearer "+token)

	resp, err := http.DefaultClient.Do(req)
	if err != nil {
		log.Fatal(err)
	}
	defer resp.Body.Close()

	out, err := io.ReadAll(resp.Body)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(resp.Status)
	fmt.Println(string(out))
}
// Cargo.toml: reqwest = { version = "0.12", features = ["json"] }, tokio = { version = "1", features = ["full"] }

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    // API token — see Authorizations above.
    let token = "YOUR_SECRET_TOKEN";

    let client = reqwest::Client::new();
    let response = client
        .get("https://user-api.proxyshard.com/user/api/orders/calculate?product=text")
        .header("Authorization", format!("Bearer {token}"))
        .send()
        .await?;

    println!("{}", response.status());
    println!("{}", response.text().await?);
    Ok(())
}
using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;

class Program
{
    static async Task Main()
    {
        // API token — see Authorizations above.
        var token = "YOUR_SECRET_TOKEN";

        using var client = new HttpClient();
        client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);

        var request = new HttpRequestMessage(HttpMethod.Get, "https://user-api.proxyshard.com/user/api/orders/calculate?product=text");

        var response = await client.SendAsync(request);
        Console.WriteLine((int)response.StatusCode);
        Console.WriteLine(await response.Content.ReadAsStringAsync());
    }
}
// build: c++ -std=c++17 main.cpp -lcurl
#include <curl/curl.h>

#include <iostream>
#include <string>

static size_t write_cb(char *ptr, size_t size, size_t nmemb, void *userdata) {
    static_cast<std::string *>(userdata)->append(ptr, size * nmemb);
    return size * nmemb;
}

int main() {
    // API token — see Authorizations above.
    const std::string token = "YOUR_SECRET_TOKEN";

    curl_global_init(CURL_GLOBAL_DEFAULT);
    CURL *curl = curl_easy_init();
    if (!curl) {
        std::cerr << "curl_easy_init failed\n";
        curl_global_cleanup();
        return 1;
    }

    struct curl_slist *headers = nullptr;
    headers = curl_slist_append(headers, ("Authorization: Bearer " + token).c_str());

    std::string response;
    curl_easy_setopt(curl, CURLOPT_URL, "https://user-api.proxyshard.com/user/api/orders/calculate?product=text");
    curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
    curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_cb);
    curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response);

    const CURLcode rc = curl_easy_perform(curl);
    if (rc != CURLE_OK) {
        std::cerr << curl_easy_strerror(rc) << "\n";
    } else {
        long status = 0;
        curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &status);
        std::cout << status << "\n" << response << "\n";
    }

    curl_slist_free_all(headers);
    curl_easy_cleanup(curl);
    curl_global_cleanup();
    return rc == CURLE_OK ? 0 : 1;
}
{
  "original_price": 1,
  "final_price": 1,
  "discount_percent": 1,
  "addons_price": 1,
  "total_with_addons": 1
}
{
  "success": true,
  "message": "text"
}
{
  "success": true,
  "message": "text"
}

Изменить биллинг-цикл заказа

POSThttps://user-api.proxyshard.com/user/api/orders/change-billing-cycle/{order_id}

Меняет цикл оплаты по названию цикла. Только для Datacenter & ISP прокси. Если промокод недоступен для выбранного цикла, он будет автоматически сброшен.

Authorizations
bearerAuth
Authorizationstringrequired

Bearer authentication header of the form Bearer <token>.

Path parameters
order_idintegerrequired
Body
application/json
cyclestringrequired
Responses
200Успешноapplication/json
successbooleanoptional
messagestringoptional
order_idintegeroptional
original_priceintegeroptional
final_priceintegeroptional
discount_percentintegeroptional
400Неверный продукт или циклapplication/json
successbooleanrequired
messagestringrequired
401Неавторизованapplication/json
successbooleanrequired
messagestringrequired
403Цикл недоступен для этого пользователяapplication/json
successbooleanrequired
messagestringrequired
POST/user/api/orders/change-billing-cycle/1
POST /user/api/orders/change-billing-cycle/1 HTTP/1.1
Host: user-api.proxyshard.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*

{
  "cycle": "text"
}
curl -X POST 'https://user-api.proxyshard.com/user/api/orders/change-billing-cycle/1' \
  -H 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"cycle":"text"}'
import requests

# API token — see Authorizations above.
token = "YOUR_SECRET_TOKEN"

url = "https://user-api.proxyshard.com/user/api/orders/change-billing-cycle/1"
headers = {
    "Authorization": f"Bearer {token}",
}
payload = {
    "cycle": "text",
}

response = requests.post(url, headers=headers, json=payload, timeout=30)
response.raise_for_status()
print(response.status_code)
print(response.text)
// API token — see Authorizations above.
const token = "YOUR_SECRET_TOKEN";

const url = "https://user-api.proxyshard.com/user/api/orders/change-billing-cycle/1";
const payload = {
  "cycle": "text"
};

const response = await fetch(url, {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${token}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify(payload),
});

console.log(response.status);
console.log(await response.text());
package main

import (
	"bytes"
	"fmt"
	"io"
	"log"
	"net/http"
)

func main() {
	// API token — see Authorizations above.
	token := "YOUR_SECRET_TOKEN"

	url := "https://user-api.proxyshard.com/user/api/orders/change-billing-cycle/1"
	body := bytes.NewBufferString(`{
  "cycle": "text"
}`)

	req, err := http.NewRequest("POST", url, body)
	if err != nil {
		log.Fatal(err)
	}
	req.Header.Set("Authorization", "Bearer "+token)
	req.Header.Set("Content-Type", "application/json")

	resp, err := http.DefaultClient.Do(req)
	if err != nil {
		log.Fatal(err)
	}
	defer resp.Body.Close()

	out, err := io.ReadAll(resp.Body)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(resp.Status)
	fmt.Println(string(out))
}
// Cargo.toml: reqwest = { version = "0.12", features = ["json"] }, tokio = { version = "1", features = ["full"] }, serde_json = "1"

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    // API token — see Authorizations above.
    let token = "YOUR_SECRET_TOKEN";

    let client = reqwest::Client::new();
    let response = client
        .post("https://user-api.proxyshard.com/user/api/orders/change-billing-cycle/1")
        .header("Authorization", format!("Bearer {token}"))
        .json(&serde_json::json!({
          "cycle": "text"
        }))
        .send()
        .await?;

    println!("{}", response.status());
    println!("{}", response.text().await?);
    Ok(())
}
using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;

class Program
{
    static async Task Main()
    {
        // API token — see Authorizations above.
        var token = "YOUR_SECRET_TOKEN";

        using var client = new HttpClient();
        client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);

        var request = new HttpRequestMessage(HttpMethod.Post, "https://user-api.proxyshard.com/user/api/orders/change-billing-cycle/1");
        request.Content = new StringContent("""
            {
              "cycle": "text"
            }
            """, Encoding.UTF8, "application/json");

        var response = await client.SendAsync(request);
        Console.WriteLine((int)response.StatusCode);
        Console.WriteLine(await response.Content.ReadAsStringAsync());
    }
}
// build: c++ -std=c++17 main.cpp -lcurl
#include <curl/curl.h>

#include <iostream>
#include <string>

static size_t write_cb(char *ptr, size_t size, size_t nmemb, void *userdata) {
    static_cast<std::string *>(userdata)->append(ptr, size * nmemb);
    return size * nmemb;
}

int main() {
    // API token — see Authorizations above.
    const std::string token = "YOUR_SECRET_TOKEN";

    curl_global_init(CURL_GLOBAL_DEFAULT);
    CURL *curl = curl_easy_init();
    if (!curl) {
        std::cerr << "curl_easy_init failed\n";
        curl_global_cleanup();
        return 1;
    }

    struct curl_slist *headers = nullptr;
    headers = curl_slist_append(headers, ("Authorization: Bearer " + token).c_str());
    headers = curl_slist_append(headers, "Content-Type: application/json");

    const std::string body = R"json({
  "cycle": "text"
})json";

    std::string response;
    curl_easy_setopt(curl, CURLOPT_URL, "https://user-api.proxyshard.com/user/api/orders/change-billing-cycle/1");
    curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
    curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
    curl_easy_setopt(curl, CURLOPT_POSTFIELDS, body.c_str());
    curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, static_cast<long>(body.size()));
    curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_cb);
    curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response);

    const CURLcode rc = curl_easy_perform(curl);
    if (rc != CURLE_OK) {
        std::cerr << curl_easy_strerror(rc) << "\n";
    } else {
        long status = 0;
        curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &status);
        std::cout << status << "\n" << response << "\n";
    }

    curl_slist_free_all(headers);
    curl_easy_cleanup(curl);
    curl_global_cleanup();
    return rc == CURLE_OK ? 0 : 1;
}
{
  "success": true,
  "message": "text",
  "order_id": 1,
  "original_price": 1,
  "final_price": 1,
  "discount_percent": 1
}
{
  "success": true,
  "message": "text"
}
{
  "success": true,
  "message": "text"
}
{
  "success": true,
  "message": "text"
}

Изменить авто-продление заказа

POSThttps://user-api.proxyshard.com/user/api/orders/edit-auto-renewal/{order_id}

Включить/выключить авто-продление. Только для Datacenter & ISP прокси.

Authorizations
bearerAuth
Authorizationstringrequired

Bearer authentication header of the form Bearer <token>.

Path parameters
order_idintegerrequired
Query parameters
auto_renewalbooleanrequired
Responses
200Успешноapplication/json
successbooleanoptional
messagestringoptional
400Неверный продукт для операцииapplication/json
successbooleanrequired
messagestringrequired
401Неавторизованapplication/json
successbooleanrequired
messagestringrequired
POST/user/api/orders/edit-auto-renewal/1?auto_renewal=true
POST /user/api/orders/edit-auto-renewal/1?auto_renewal=true HTTP/1.1
Host: user-api.proxyshard.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
curl -X POST 'https://user-api.proxyshard.com/user/api/orders/edit-auto-renewal/1?auto_renewal=true' \
  -H 'Authorization: Bearer YOUR_SECRET_TOKEN'
import requests

# API token — see Authorizations above.
token = "YOUR_SECRET_TOKEN"

url = "https://user-api.proxyshard.com/user/api/orders/edit-auto-renewal/1"
params = {
    "auto_renewal": "true",
}
headers = {
    "Authorization": f"Bearer {token}",
}

response = requests.post(url, params=params, headers=headers, timeout=30)
response.raise_for_status()
print(response.status_code)
print(response.text)
// API token — see Authorizations above.
const token = "YOUR_SECRET_TOKEN";

const url = "https://user-api.proxyshard.com/user/api/orders/edit-auto-renewal/1?auto_renewal=true";

const response = await fetch(url, {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${token}`,
  },
});

console.log(response.status);
console.log(await response.text());
package main

import (
	"fmt"
	"io"
	"log"
	"net/http"
)

func main() {
	// API token — see Authorizations above.
	token := "YOUR_SECRET_TOKEN"

	url := "https://user-api.proxyshard.com/user/api/orders/edit-auto-renewal/1?auto_renewal=true"

	req, err := http.NewRequest("POST", url, nil)
	if err != nil {
		log.Fatal(err)
	}
	req.Header.Set("Authorization", "Bearer "+token)

	resp, err := http.DefaultClient.Do(req)
	if err != nil {
		log.Fatal(err)
	}
	defer resp.Body.Close()

	out, err := io.ReadAll(resp.Body)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(resp.Status)
	fmt.Println(string(out))
}
// Cargo.toml: reqwest = { version = "0.12", features = ["json"] }, tokio = { version = "1", features = ["full"] }

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    // API token — see Authorizations above.
    let token = "YOUR_SECRET_TOKEN";

    let client = reqwest::Client::new();
    let response = client
        .post("https://user-api.proxyshard.com/user/api/orders/edit-auto-renewal/1?auto_renewal=true")
        .header("Authorization", format!("Bearer {token}"))
        .send()
        .await?;

    println!("{}", response.status());
    println!("{}", response.text().await?);
    Ok(())
}
using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;

class Program
{
    static async Task Main()
    {
        // API token — see Authorizations above.
        var token = "YOUR_SECRET_TOKEN";

        using var client = new HttpClient();
        client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);

        var request = new HttpRequestMessage(HttpMethod.Post, "https://user-api.proxyshard.com/user/api/orders/edit-auto-renewal/1?auto_renewal=true");

        var response = await client.SendAsync(request);
        Console.WriteLine((int)response.StatusCode);
        Console.WriteLine(await response.Content.ReadAsStringAsync());
    }
}
// build: c++ -std=c++17 main.cpp -lcurl
#include <curl/curl.h>

#include <iostream>
#include <string>

static size_t write_cb(char *ptr, size_t size, size_t nmemb, void *userdata) {
    static_cast<std::string *>(userdata)->append(ptr, size * nmemb);
    return size * nmemb;
}

int main() {
    // API token — see Authorizations above.
    const std::string token = "YOUR_SECRET_TOKEN";

    curl_global_init(CURL_GLOBAL_DEFAULT);
    CURL *curl = curl_easy_init();
    if (!curl) {
        std::cerr << "curl_easy_init failed\n";
        curl_global_cleanup();
        return 1;
    }

    struct curl_slist *headers = nullptr;
    headers = curl_slist_append(headers, ("Authorization: Bearer " + token).c_str());

    std::string response;
    curl_easy_setopt(curl, CURLOPT_URL, "https://user-api.proxyshard.com/user/api/orders/edit-auto-renewal/1?auto_renewal=true");
    curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
    curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
    curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_cb);
    curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response);

    const CURLcode rc = curl_easy_perform(curl);
    if (rc != CURLE_OK) {
        std::cerr << curl_easy_strerror(rc) << "\n";
    } else {
        long status = 0;
        curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &status);
        std::cout << status << "\n" << response << "\n";
    }

    curl_slist_free_all(headers);
    curl_easy_cleanup(curl);
    curl_global_cleanup();
    return rc == CURLE_OK ? 0 : 1;
}
{
  "success": true,
  "message": "text"
}
{
  "success": true,
  "message": "text"
}
{
  "success": true,
  "message": "text"
}

Получить продукты и их циклы

GEThttps://user-api.proxyshard.com/user/api/proxies/products

Возвращает продукты для API с названиями доступных циклов.

Authorizations
bearerAuth
Authorizationstringrequired

Bearer authentication header of the form Bearer <token>.

Responses
200Список продуктовapplication/json
successbooleanrequired
productsobject · ProductWithCycles[]required
Show propertiesHide properties
namestringrequired
descriptionstring· nullableoptional
locationstring· nullableoptional
cyclesstring[]required
GET/user/api/proxies/products
GET /user/api/proxies/products HTTP/1.1
Host: user-api.proxyshard.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
curl -X GET 'https://user-api.proxyshard.com/user/api/proxies/products' \
  -H 'Authorization: Bearer YOUR_SECRET_TOKEN'
import requests

# API token — see Authorizations above.
token = "YOUR_SECRET_TOKEN"

url = "https://user-api.proxyshard.com/user/api/proxies/products"
headers = {
    "Authorization": f"Bearer {token}",
}

response = requests.get(url, headers=headers, timeout=30)
response.raise_for_status()
print(response.status_code)
print(response.text)
// API token — see Authorizations above.
const token = "YOUR_SECRET_TOKEN";

const url = "https://user-api.proxyshard.com/user/api/proxies/products";

const response = await fetch(url, {
  method: "GET",
  headers: {
    "Authorization": `Bearer ${token}`,
  },
});

console.log(response.status);
console.log(await response.text());
package main

import (
	"fmt"
	"io"
	"log"
	"net/http"
)

func main() {
	// API token — see Authorizations above.
	token := "YOUR_SECRET_TOKEN"

	url := "https://user-api.proxyshard.com/user/api/proxies/products"

	req, err := http.NewRequest("GET", url, nil)
	if err != nil {
		log.Fatal(err)
	}
	req.Header.Set("Authorization", "Bearer "+token)

	resp, err := http.DefaultClient.Do(req)
	if err != nil {
		log.Fatal(err)
	}
	defer resp.Body.Close()

	out, err := io.ReadAll(resp.Body)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(resp.Status)
	fmt.Println(string(out))
}
// Cargo.toml: reqwest = { version = "0.12", features = ["json"] }, tokio = { version = "1", features = ["full"] }

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    // API token — see Authorizations above.
    let token = "YOUR_SECRET_TOKEN";

    let client = reqwest::Client::new();
    let response = client
        .get("https://user-api.proxyshard.com/user/api/proxies/products")
        .header("Authorization", format!("Bearer {token}"))
        .send()
        .await?;

    println!("{}", response.status());
    println!("{}", response.text().await?);
    Ok(())
}
using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;

class Program
{
    static async Task Main()
    {
        // API token — see Authorizations above.
        var token = "YOUR_SECRET_TOKEN";

        using var client = new HttpClient();
        client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);

        var request = new HttpRequestMessage(HttpMethod.Get, "https://user-api.proxyshard.com/user/api/proxies/products");

        var response = await client.SendAsync(request);
        Console.WriteLine((int)response.StatusCode);
        Console.WriteLine(await response.Content.ReadAsStringAsync());
    }
}
// build: c++ -std=c++17 main.cpp -lcurl
#include <curl/curl.h>

#include <iostream>
#include <string>

static size_t write_cb(char *ptr, size_t size, size_t nmemb, void *userdata) {
    static_cast<std::string *>(userdata)->append(ptr, size * nmemb);
    return size * nmemb;
}

int main() {
    // API token — see Authorizations above.
    const std::string token = "YOUR_SECRET_TOKEN";

    curl_global_init(CURL_GLOBAL_DEFAULT);
    CURL *curl = curl_easy_init();
    if (!curl) {
        std::cerr << "curl_easy_init failed\n";
        curl_global_cleanup();
        return 1;
    }

    struct curl_slist *headers = nullptr;
    headers = curl_slist_append(headers, ("Authorization: Bearer " + token).c_str());

    std::string response;
    curl_easy_setopt(curl, CURLOPT_URL, "https://user-api.proxyshard.com/user/api/proxies/products");
    curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
    curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_cb);
    curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response);

    const CURLcode rc = curl_easy_perform(curl);
    if (rc != CURLE_OK) {
        std::cerr << curl_easy_strerror(rc) << "\n";
    } else {
        long status = 0;
        curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &status);
        std::cout << status << "\n" << response << "\n";
    }

    curl_slist_free_all(headers);
    curl_easy_cleanup(curl);
    curl_global_cleanup();
    return rc == CURLE_OK ? 0 : 1;
}
200Список продуктов
{
  "success": true,
  "products": [
    {
      "name": "text",
      "description": "text",
      "location": "text",
      "cycles": [
        "text"
      ]
    }
  ]
}

Получить доступное количество прокси

GEThttps://user-api.proxyshard.com/user/api/proxies/available-count

Возвращает суммарное доступное количество для всех продуктов.

Authorizations
bearerAuth
Authorizationstringrequired

Bearer authentication header of the form Bearer <token>.

Responses
200Успешноapplication/json
countrystringrequired
productstringrequired
amountintegerrequired
GET/user/api/proxies/available-count
GET /user/api/proxies/available-count HTTP/1.1
Host: user-api.proxyshard.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
curl -X GET 'https://user-api.proxyshard.com/user/api/proxies/available-count' \
  -H 'Authorization: Bearer YOUR_SECRET_TOKEN'
import requests

# API token — see Authorizations above.
token = "YOUR_SECRET_TOKEN"

url = "https://user-api.proxyshard.com/user/api/proxies/available-count"
headers = {
    "Authorization": f"Bearer {token}",
}

response = requests.get(url, headers=headers, timeout=30)
response.raise_for_status()
print(response.status_code)
print(response.text)
// API token — see Authorizations above.
const token = "YOUR_SECRET_TOKEN";

const url = "https://user-api.proxyshard.com/user/api/proxies/available-count";

const response = await fetch(url, {
  method: "GET",
  headers: {
    "Authorization": `Bearer ${token}`,
  },
});

console.log(response.status);
console.log(await response.text());
package main

import (
	"fmt"
	"io"
	"log"
	"net/http"
)

func main() {
	// API token — see Authorizations above.
	token := "YOUR_SECRET_TOKEN"

	url := "https://user-api.proxyshard.com/user/api/proxies/available-count"

	req, err := http.NewRequest("GET", url, nil)
	if err != nil {
		log.Fatal(err)
	}
	req.Header.Set("Authorization", "Bearer "+token)

	resp, err := http.DefaultClient.Do(req)
	if err != nil {
		log.Fatal(err)
	}
	defer resp.Body.Close()

	out, err := io.ReadAll(resp.Body)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(resp.Status)
	fmt.Println(string(out))
}
// Cargo.toml: reqwest = { version = "0.12", features = ["json"] }, tokio = { version = "1", features = ["full"] }

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    // API token — see Authorizations above.
    let token = "YOUR_SECRET_TOKEN";

    let client = reqwest::Client::new();
    let response = client
        .get("https://user-api.proxyshard.com/user/api/proxies/available-count")
        .header("Authorization", format!("Bearer {token}"))
        .send()
        .await?;

    println!("{}", response.status());
    println!("{}", response.text().await?);
    Ok(())
}
using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;

class Program
{
    static async Task Main()
    {
        // API token — see Authorizations above.
        var token = "YOUR_SECRET_TOKEN";

        using var client = new HttpClient();
        client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);

        var request = new HttpRequestMessage(HttpMethod.Get, "https://user-api.proxyshard.com/user/api/proxies/available-count");

        var response = await client.SendAsync(request);
        Console.WriteLine((int)response.StatusCode);
        Console.WriteLine(await response.Content.ReadAsStringAsync());
    }
}
// build: c++ -std=c++17 main.cpp -lcurl
#include <curl/curl.h>

#include <iostream>
#include <string>

static size_t write_cb(char *ptr, size_t size, size_t nmemb, void *userdata) {
    static_cast<std::string *>(userdata)->append(ptr, size * nmemb);
    return size * nmemb;
}

int main() {
    // API token — see Authorizations above.
    const std::string token = "YOUR_SECRET_TOKEN";

    curl_global_init(CURL_GLOBAL_DEFAULT);
    CURL *curl = curl_easy_init();
    if (!curl) {
        std::cerr << "curl_easy_init failed\n";
        curl_global_cleanup();
        return 1;
    }

    struct curl_slist *headers = nullptr;
    headers = curl_slist_append(headers, ("Authorization: Bearer " + token).c_str());

    std::string response;
    curl_easy_setopt(curl, CURLOPT_URL, "https://user-api.proxyshard.com/user/api/proxies/available-count");
    curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
    curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_cb);
    curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response);

    const CURLcode rc = curl_easy_perform(curl);
    if (rc != CURLE_OK) {
        std::cerr << curl_easy_strerror(rc) << "\n";
    } else {
        long status = 0;
        curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &status);
        std::cout << status << "\n" << response << "\n";
    }

    curl_slist_free_all(headers);
    curl_easy_cleanup(curl);
    curl_global_cleanup();
    return rc == CURLE_OK ? 0 : 1;
}
200Успешно
[
  {
    "country": "text",
    "product": "text",
    "amount": 1
  }
]

Информация о пользователе

GEThttps://user-api.proxyshard.com/user/api/me
Authorizations
bearerAuth
Authorizationstringrequired

Bearer authentication header of the form Bearer <token>.

Responses
200Данные профиляapplication/json
emailstringrequired
active_ordersintegerrequired
wallet_balanceintegerrequired

в центах

GET/user/api/me
GET /user/api/me HTTP/1.1
Host: user-api.proxyshard.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
curl -X GET 'https://user-api.proxyshard.com/user/api/me' \
  -H 'Authorization: Bearer YOUR_SECRET_TOKEN'
import requests

# API token — see Authorizations above.
token = "YOUR_SECRET_TOKEN"

url = "https://user-api.proxyshard.com/user/api/me"
headers = {
    "Authorization": f"Bearer {token}",
}

response = requests.get(url, headers=headers, timeout=30)
response.raise_for_status()
print(response.status_code)
print(response.text)
// API token — see Authorizations above.
const token = "YOUR_SECRET_TOKEN";

const url = "https://user-api.proxyshard.com/user/api/me";

const response = await fetch(url, {
  method: "GET",
  headers: {
    "Authorization": `Bearer ${token}`,
  },
});

console.log(response.status);
console.log(await response.text());
package main

import (
	"fmt"
	"io"
	"log"
	"net/http"
)

func main() {
	// API token — see Authorizations above.
	token := "YOUR_SECRET_TOKEN"

	url := "https://user-api.proxyshard.com/user/api/me"

	req, err := http.NewRequest("GET", url, nil)
	if err != nil {
		log.Fatal(err)
	}
	req.Header.Set("Authorization", "Bearer "+token)

	resp, err := http.DefaultClient.Do(req)
	if err != nil {
		log.Fatal(err)
	}
	defer resp.Body.Close()

	out, err := io.ReadAll(resp.Body)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(resp.Status)
	fmt.Println(string(out))
}
// Cargo.toml: reqwest = { version = "0.12", features = ["json"] }, tokio = { version = "1", features = ["full"] }

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    // API token — see Authorizations above.
    let token = "YOUR_SECRET_TOKEN";

    let client = reqwest::Client::new();
    let response = client
        .get("https://user-api.proxyshard.com/user/api/me")
        .header("Authorization", format!("Bearer {token}"))
        .send()
        .await?;

    println!("{}", response.status());
    println!("{}", response.text().await?);
    Ok(())
}
using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;

class Program
{
    static async Task Main()
    {
        // API token — see Authorizations above.
        var token = "YOUR_SECRET_TOKEN";

        using var client = new HttpClient();
        client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);

        var request = new HttpRequestMessage(HttpMethod.Get, "https://user-api.proxyshard.com/user/api/me");

        var response = await client.SendAsync(request);
        Console.WriteLine((int)response.StatusCode);
        Console.WriteLine(await response.Content.ReadAsStringAsync());
    }
}
// build: c++ -std=c++17 main.cpp -lcurl
#include <curl/curl.h>

#include <iostream>
#include <string>

static size_t write_cb(char *ptr, size_t size, size_t nmemb, void *userdata) {
    static_cast<std::string *>(userdata)->append(ptr, size * nmemb);
    return size * nmemb;
}

int main() {
    // API token — see Authorizations above.
    const std::string token = "YOUR_SECRET_TOKEN";

    curl_global_init(CURL_GLOBAL_DEFAULT);
    CURL *curl = curl_easy_init();
    if (!curl) {
        std::cerr << "curl_easy_init failed\n";
        curl_global_cleanup();
        return 1;
    }

    struct curl_slist *headers = nullptr;
    headers = curl_slist_append(headers, ("Authorization: Bearer " + token).c_str());

    std::string response;
    curl_easy_setopt(curl, CURLOPT_URL, "https://user-api.proxyshard.com/user/api/me");
    curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
    curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_cb);
    curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response);

    const CURLcode rc = curl_easy_perform(curl);
    if (rc != CURLE_OK) {
        std::cerr << curl_easy_strerror(rc) << "\n";
    } else {
        long status = 0;
        curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &status);
        std::cout << status << "\n" << response << "\n";
    }

    curl_slist_free_all(headers);
    curl_easy_cleanup(curl);
    curl_global_cleanup();
    return rc == CURLE_OK ? 0 : 1;
}
200Данные профиля
{
  "email": "text",
  "active_orders": 1,
  "wallet_balance": 1
}

Список заказов

GEThttps://user-api.proxyshard.com/user/api/orders
Authorizations
bearerAuth
Authorizationstringrequired

Bearer authentication header of the form Bearer <token>.

Query parameters
statusstringrequired

активный | в ожидании | отменен | все

offsetinteger· min: 0optional

Смещение выборки (по умолчанию 0)

limitinteger· min: 1· max: 100optional

Размер страницы (1..100, по умолчанию 20)

Responses
200Список заказовapplication/json
successbooleanrequired
ordersobject[]required
Show propertiesHide properties
order_idintegerrequired
product_idintegerrequired
product_namestringrequired
cycle_idintegerrequired
cycle_namestringrequired
expires_atstring· nullableoptional

ISO8601 время истечения

auto_renewalboolean· nullableoptional
tagstring· nullableoptional
countintegeroptional

Количество заказов в текущей выборке

prevstring· nullableoptional

URI предыдущей страницы

nextstring· nullableoptional

URI следующей страницы

GET/user/api/orders?status=text
GET /user/api/orders?status=text HTTP/1.1
Host: user-api.proxyshard.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
curl -X GET 'https://user-api.proxyshard.com/user/api/orders?status=text' \
  -H 'Authorization: Bearer YOUR_SECRET_TOKEN'
import requests

# API token — see Authorizations above.
token = "YOUR_SECRET_TOKEN"

url = "https://user-api.proxyshard.com/user/api/orders"
params = {
    "status": "text",
}
headers = {
    "Authorization": f"Bearer {token}",
}

response = requests.get(url, params=params, headers=headers, timeout=30)
response.raise_for_status()
print(response.status_code)
print(response.text)
// API token — see Authorizations above.
const token = "YOUR_SECRET_TOKEN";

const url = "https://user-api.proxyshard.com/user/api/orders?status=text";

const response = await fetch(url, {
  method: "GET",
  headers: {
    "Authorization": `Bearer ${token}`,
  },
});

console.log(response.status);
console.log(await response.text());
package main

import (
	"fmt"
	"io"
	"log"
	"net/http"
)

func main() {
	// API token — see Authorizations above.
	token := "YOUR_SECRET_TOKEN"

	url := "https://user-api.proxyshard.com/user/api/orders?status=text"

	req, err := http.NewRequest("GET", url, nil)
	if err != nil {
		log.Fatal(err)
	}
	req.Header.Set("Authorization", "Bearer "+token)

	resp, err := http.DefaultClient.Do(req)
	if err != nil {
		log.Fatal(err)
	}
	defer resp.Body.Close()

	out, err := io.ReadAll(resp.Body)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(resp.Status)
	fmt.Println(string(out))
}
// Cargo.toml: reqwest = { version = "0.12", features = ["json"] }, tokio = { version = "1", features = ["full"] }

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    // API token — see Authorizations above.
    let token = "YOUR_SECRET_TOKEN";

    let client = reqwest::Client::new();
    let response = client
        .get("https://user-api.proxyshard.com/user/api/orders?status=text")
        .header("Authorization", format!("Bearer {token}"))
        .send()
        .await?;

    println!("{}", response.status());
    println!("{}", response.text().await?);
    Ok(())
}
using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;

class Program
{
    static async Task Main()
    {
        // API token — see Authorizations above.
        var token = "YOUR_SECRET_TOKEN";

        using var client = new HttpClient();
        client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);

        var request = new HttpRequestMessage(HttpMethod.Get, "https://user-api.proxyshard.com/user/api/orders?status=text");

        var response = await client.SendAsync(request);
        Console.WriteLine((int)response.StatusCode);
        Console.WriteLine(await response.Content.ReadAsStringAsync());
    }
}
// build: c++ -std=c++17 main.cpp -lcurl
#include <curl/curl.h>

#include <iostream>
#include <string>

static size_t write_cb(char *ptr, size_t size, size_t nmemb, void *userdata) {
    static_cast<std::string *>(userdata)->append(ptr, size * nmemb);
    return size * nmemb;
}

int main() {
    // API token — see Authorizations above.
    const std::string token = "YOUR_SECRET_TOKEN";

    curl_global_init(CURL_GLOBAL_DEFAULT);
    CURL *curl = curl_easy_init();
    if (!curl) {
        std::cerr << "curl_easy_init failed\n";
        curl_global_cleanup();
        return 1;
    }

    struct curl_slist *headers = nullptr;
    headers = curl_slist_append(headers, ("Authorization: Bearer " + token).c_str());

    std::string response;
    curl_easy_setopt(curl, CURLOPT_URL, "https://user-api.proxyshard.com/user/api/orders?status=text");
    curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
    curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_cb);
    curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response);

    const CURLcode rc = curl_easy_perform(curl);
    if (rc != CURLE_OK) {
        std::cerr << curl_easy_strerror(rc) << "\n";
    } else {
        long status = 0;
        curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &status);
        std::cout << status << "\n" << response << "\n";
    }

    curl_slist_free_all(headers);
    curl_easy_cleanup(curl);
    curl_global_cleanup();
    return rc == CURLE_OK ? 0 : 1;
}
200Список заказов
{
  "success": true,
  "orders": [
    {
      "order_id": 1,
      "product_id": 1,
      "product_name": "text",
      "cycle_id": 1,
      "cycle_name": "text",
      "expires_at": "text",
      "auto_renewal": true,
      "tag": "text"
    }
  ],
  "count": 1,
  "prev": "text",
  "next": "text"
}

Получить информацию о заказе

GEThttps://user-api.proxyshard.com/user/api/orders/{id}
Authorizations
bearerAuth
Authorizationstringrequired

Bearer authentication header of the form Bearer <token>.

Path parameters
idintegerrequired
Responses
200Информация о заказеapplication/json
successbooleanrequired
orderobjectrequired
Show propertiesHide properties
order_idintegeroptional
product_namestringoptional
cycle_namestringoptional
quantityintegeroptional
price_paidintegeroptional

Базовая цена подписки в центах

addons_price_paidintegeroptional

Общая дополнительная стоимость в центах

addonsobject · AddonLine[]optional

Дополнительные строки, прикрепленные к этому заказу

Show propertiesHide properties
addon_keystringoptional
catalog_idintegeroptional
qtyintegeroptional

Активные единицы за текущий период

price_per_unitintegeroptional

Цена за единицу в центах на момент покупки

pendingobject· nullableoptional

Изменение запланировано на следующее продление или null

Show propertiesHide properties
actionstring · enumoptional
Possible values:canceldowngrade
next_qtyintegeroptional

Целевое количество после понижения

p0f_slots_availableintegeroptional

Активные слоты для подписи p0f (из дополнений)

p0f_slots_usedintegeroptional

Слоты, в настоящее время занятые подписанными прокси

p0f_slots_nextintegeroptional

Слоты, которые будут активны после следующего продления

statusstringoptional
created_atstring· nullableoptional
expires_atstring· nullableoptional
promo_codestring· nullableoptional
auto_renewalboolean· nullableoptional
tagstring· nullableoptional
GET/user/api/orders/1
GET /user/api/orders/1 HTTP/1.1
Host: user-api.proxyshard.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
curl -X GET 'https://user-api.proxyshard.com/user/api/orders/1' \
  -H 'Authorization: Bearer YOUR_SECRET_TOKEN'
import requests

# API token — see Authorizations above.
token = "YOUR_SECRET_TOKEN"

url = "https://user-api.proxyshard.com/user/api/orders/1"
headers = {
    "Authorization": f"Bearer {token}",
}

response = requests.get(url, headers=headers, timeout=30)
response.raise_for_status()
print(response.status_code)
print(response.text)
// API token — see Authorizations above.
const token = "YOUR_SECRET_TOKEN";

const url = "https://user-api.proxyshard.com/user/api/orders/1";

const response = await fetch(url, {
  method: "GET",
  headers: {
    "Authorization": `Bearer ${token}`,
  },
});

console.log(response.status);
console.log(await response.text());
package main

import (
	"fmt"
	"io"
	"log"
	"net/http"
)

func main() {
	// API token — see Authorizations above.
	token := "YOUR_SECRET_TOKEN"

	url := "https://user-api.proxyshard.com/user/api/orders/1"

	req, err := http.NewRequest("GET", url, nil)
	if err != nil {
		log.Fatal(err)
	}
	req.Header.Set("Authorization", "Bearer "+token)

	resp, err := http.DefaultClient.Do(req)
	if err != nil {
		log.Fatal(err)
	}
	defer resp.Body.Close()

	out, err := io.ReadAll(resp.Body)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(resp.Status)
	fmt.Println(string(out))
}
// Cargo.toml: reqwest = { version = "0.12", features = ["json"] }, tokio = { version = "1", features = ["full"] }

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    // API token — see Authorizations above.
    let token = "YOUR_SECRET_TOKEN";

    let client = reqwest::Client::new();
    let response = client
        .get("https://user-api.proxyshard.com/user/api/orders/1")
        .header("Authorization", format!("Bearer {token}"))
        .send()
        .await?;

    println!("{}", response.status());
    println!("{}", response.text().await?);
    Ok(())
}
using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;

class Program
{
    static async Task Main()
    {
        // API token — see Authorizations above.
        var token = "YOUR_SECRET_TOKEN";

        using var client = new HttpClient();
        client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);

        var request = new HttpRequestMessage(HttpMethod.Get, "https://user-api.proxyshard.com/user/api/orders/1");

        var response = await client.SendAsync(request);
        Console.WriteLine((int)response.StatusCode);
        Console.WriteLine(await response.Content.ReadAsStringAsync());
    }
}
// build: c++ -std=c++17 main.cpp -lcurl
#include <curl/curl.h>

#include <iostream>
#include <string>

static size_t write_cb(char *ptr, size_t size, size_t nmemb, void *userdata) {
    static_cast<std::string *>(userdata)->append(ptr, size * nmemb);
    return size * nmemb;
}

int main() {
    // API token — see Authorizations above.
    const std::string token = "YOUR_SECRET_TOKEN";

    curl_global_init(CURL_GLOBAL_DEFAULT);
    CURL *curl = curl_easy_init();
    if (!curl) {
        std::cerr << "curl_easy_init failed\n";
        curl_global_cleanup();
        return 1;
    }

    struct curl_slist *headers = nullptr;
    headers = curl_slist_append(headers, ("Authorization: Bearer " + token).c_str());

    std::string response;
    curl_easy_setopt(curl, CURLOPT_URL, "https://user-api.proxyshard.com/user/api/orders/1");
    curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
    curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_cb);
    curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response);

    const CURLcode rc = curl_easy_perform(curl);
    if (rc != CURLE_OK) {
        std::cerr << curl_easy_strerror(rc) << "\n";
    } else {
        long status = 0;
        curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &status);
        std::cout << status << "\n" << response << "\n";
    }

    curl_slist_free_all(headers);
    curl_easy_cleanup(curl);
    curl_global_cleanup();
    return rc == CURLE_OK ? 0 : 1;
}
200Информация о заказе
{
  "success": true,
  "order": {
    "order_id": 1,
    "product_name": "text",
    "cycle_name": "text",
    "quantity": 1,
    "price_paid": 1,
    "addons_price_paid": 1,
    "addons": [
      {
        "addon_key": "text",
        "catalog_id": 1,
        "qty": 1,
        "price_per_unit": 1,
        "pending": {
          "action": "cancel",
          "next_qty": 1
        }
      }
    ],
    "p0f_slots_available": 1,
    "p0f_slots_used": 1,
    "p0f_slots_next": 1,
    "status": "text",
    "created_at": "text",
    "expires_at": "text",
    "promo_code": "text",
    "auto_renewal": true,
    "tag": "text"
  }
}

Продлить заказ

POSThttps://user-api.proxyshard.com/user/api/orders/{id}/renew

Продление доступно только при статусе заказа on-hold.

Authorizations
bearerAuth
Authorizationstringrequired

Bearer authentication header of the form Bearer <token>.

Path parameters
idintegerrequired
Responses
200Успешноapplication/json
successbooleanrequired
messagestringrequired
400Недостаточный баланс/валидацияapplication/json
successbooleanrequired
messagestringrequired
POST/user/api/orders/1/renew
POST /user/api/orders/1/renew HTTP/1.1
Host: user-api.proxyshard.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
curl -X POST 'https://user-api.proxyshard.com/user/api/orders/1/renew' \
  -H 'Authorization: Bearer YOUR_SECRET_TOKEN'
import requests

# API token — see Authorizations above.
token = "YOUR_SECRET_TOKEN"

url = "https://user-api.proxyshard.com/user/api/orders/1/renew"
headers = {
    "Authorization": f"Bearer {token}",
}

response = requests.post(url, headers=headers, timeout=30)
response.raise_for_status()
print(response.status_code)
print(response.text)
// API token — see Authorizations above.
const token = "YOUR_SECRET_TOKEN";

const url = "https://user-api.proxyshard.com/user/api/orders/1/renew";

const response = await fetch(url, {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${token}`,
  },
});

console.log(response.status);
console.log(await response.text());
package main

import (
	"fmt"
	"io"
	"log"
	"net/http"
)

func main() {
	// API token — see Authorizations above.
	token := "YOUR_SECRET_TOKEN"

	url := "https://user-api.proxyshard.com/user/api/orders/1/renew"

	req, err := http.NewRequest("POST", url, nil)
	if err != nil {
		log.Fatal(err)
	}
	req.Header.Set("Authorization", "Bearer "+token)

	resp, err := http.DefaultClient.Do(req)
	if err != nil {
		log.Fatal(err)
	}
	defer resp.Body.Close()

	out, err := io.ReadAll(resp.Body)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(resp.Status)
	fmt.Println(string(out))
}
// Cargo.toml: reqwest = { version = "0.12", features = ["json"] }, tokio = { version = "1", features = ["full"] }

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    // API token — see Authorizations above.
    let token = "YOUR_SECRET_TOKEN";

    let client = reqwest::Client::new();
    let response = client
        .post("https://user-api.proxyshard.com/user/api/orders/1/renew")
        .header("Authorization", format!("Bearer {token}"))
        .send()
        .await?;

    println!("{}", response.status());
    println!("{}", response.text().await?);
    Ok(())
}
using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;

class Program
{
    static async Task Main()
    {
        // API token — see Authorizations above.
        var token = "YOUR_SECRET_TOKEN";

        using var client = new HttpClient();
        client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);

        var request = new HttpRequestMessage(HttpMethod.Post, "https://user-api.proxyshard.com/user/api/orders/1/renew");

        var response = await client.SendAsync(request);
        Console.WriteLine((int)response.StatusCode);
        Console.WriteLine(await response.Content.ReadAsStringAsync());
    }
}
// build: c++ -std=c++17 main.cpp -lcurl
#include <curl/curl.h>

#include <iostream>
#include <string>

static size_t write_cb(char *ptr, size_t size, size_t nmemb, void *userdata) {
    static_cast<std::string *>(userdata)->append(ptr, size * nmemb);
    return size * nmemb;
}

int main() {
    // API token — see Authorizations above.
    const std::string token = "YOUR_SECRET_TOKEN";

    curl_global_init(CURL_GLOBAL_DEFAULT);
    CURL *curl = curl_easy_init();
    if (!curl) {
        std::cerr << "curl_easy_init failed\n";
        curl_global_cleanup();
        return 1;
    }

    struct curl_slist *headers = nullptr;
    headers = curl_slist_append(headers, ("Authorization: Bearer " + token).c_str());

    std::string response;
    curl_easy_setopt(curl, CURLOPT_URL, "https://user-api.proxyshard.com/user/api/orders/1/renew");
    curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
    curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
    curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_cb);
    curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response);

    const CURLcode rc = curl_easy_perform(curl);
    if (rc != CURLE_OK) {
        std::cerr << curl_easy_strerror(rc) << "\n";
    } else {
        long status = 0;
        curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &status);
        std::cout << status << "\n" << response << "\n";
    }

    curl_slist_free_all(headers);
    curl_easy_cleanup(curl);
    curl_global_cleanup();
    return rc == CURLE_OK ? 0 : 1;
}
{
  "success": true,
  "message": "Order renewed successfully"
}
{
  "success": true,
  "message": "text"
}

Изменить тег заказа

POSThttps://user-api.proxyshard.com/user/api/orders/{id}/tag
Authorizations
bearerAuth
Authorizationstringrequired

Bearer authentication header of the form Bearer <token>.

Path parameters
idintegerrequired
Body
application/json
tagstringrequired
Responses
200Успешноapplication/json
successbooleanrequired
messagestringrequired
POST/user/api/orders/1/tag
POST /user/api/orders/1/tag HTTP/1.1
Host: user-api.proxyshard.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*

{
  "tag": "text"
}
curl -X POST 'https://user-api.proxyshard.com/user/api/orders/1/tag' \
  -H 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"tag":"text"}'
import requests

# API token — see Authorizations above.
token = "YOUR_SECRET_TOKEN"

url = "https://user-api.proxyshard.com/user/api/orders/1/tag"
headers = {
    "Authorization": f"Bearer {token}",
}
payload = {
    "tag": "text",
}

response = requests.post(url, headers=headers, json=payload, timeout=30)
response.raise_for_status()
print(response.status_code)
print(response.text)
// API token — see Authorizations above.
const token = "YOUR_SECRET_TOKEN";

const url = "https://user-api.proxyshard.com/user/api/orders/1/tag";
const payload = {
  "tag": "text"
};

const response = await fetch(url, {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${token}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify(payload),
});

console.log(response.status);
console.log(await response.text());
package main

import (
	"bytes"
	"fmt"
	"io"
	"log"
	"net/http"
)

func main() {
	// API token — see Authorizations above.
	token := "YOUR_SECRET_TOKEN"

	url := "https://user-api.proxyshard.com/user/api/orders/1/tag"
	body := bytes.NewBufferString(`{
  "tag": "text"
}`)

	req, err := http.NewRequest("POST", url, body)
	if err != nil {
		log.Fatal(err)
	}
	req.Header.Set("Authorization", "Bearer "+token)
	req.Header.Set("Content-Type", "application/json")

	resp, err := http.DefaultClient.Do(req)
	if err != nil {
		log.Fatal(err)
	}
	defer resp.Body.Close()

	out, err := io.ReadAll(resp.Body)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(resp.Status)
	fmt.Println(string(out))
}
// Cargo.toml: reqwest = { version = "0.12", features = ["json"] }, tokio = { version = "1", features = ["full"] }, serde_json = "1"

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    // API token — see Authorizations above.
    let token = "YOUR_SECRET_TOKEN";

    let client = reqwest::Client::new();
    let response = client
        .post("https://user-api.proxyshard.com/user/api/orders/1/tag")
        .header("Authorization", format!("Bearer {token}"))
        .json(&serde_json::json!({
          "tag": "text"
        }))
        .send()
        .await?;

    println!("{}", response.status());
    println!("{}", response.text().await?);
    Ok(())
}
using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;

class Program
{
    static async Task Main()
    {
        // API token — see Authorizations above.
        var token = "YOUR_SECRET_TOKEN";

        using var client = new HttpClient();
        client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);

        var request = new HttpRequestMessage(HttpMethod.Post, "https://user-api.proxyshard.com/user/api/orders/1/tag");
        request.Content = new StringContent("""
            {
              "tag": "text"
            }
            """, Encoding.UTF8, "application/json");

        var response = await client.SendAsync(request);
        Console.WriteLine((int)response.StatusCode);
        Console.WriteLine(await response.Content.ReadAsStringAsync());
    }
}
// build: c++ -std=c++17 main.cpp -lcurl
#include <curl/curl.h>

#include <iostream>
#include <string>

static size_t write_cb(char *ptr, size_t size, size_t nmemb, void *userdata) {
    static_cast<std::string *>(userdata)->append(ptr, size * nmemb);
    return size * nmemb;
}

int main() {
    // API token — see Authorizations above.
    const std::string token = "YOUR_SECRET_TOKEN";

    curl_global_init(CURL_GLOBAL_DEFAULT);
    CURL *curl = curl_easy_init();
    if (!curl) {
        std::cerr << "curl_easy_init failed\n";
        curl_global_cleanup();
        return 1;
    }

    struct curl_slist *headers = nullptr;
    headers = curl_slist_append(headers, ("Authorization: Bearer " + token).c_str());
    headers = curl_slist_append(headers, "Content-Type: application/json");

    const std::string body = R"json({
  "tag": "text"
})json";

    std::string response;
    curl_easy_setopt(curl, CURLOPT_URL, "https://user-api.proxyshard.com/user/api/orders/1/tag");
    curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
    curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
    curl_easy_setopt(curl, CURLOPT_POSTFIELDS, body.c_str());
    curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, static_cast<long>(body.size()));
    curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_cb);
    curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response);

    const CURLcode rc = curl_easy_perform(curl);
    if (rc != CURLE_OK) {
        std::cerr << curl_easy_strerror(rc) << "\n";
    } else {
        long status = 0;
        curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &status);
        std::cout << status << "\n" << response << "\n";
    }

    curl_slist_free_all(headers);
    curl_easy_cleanup(curl);
    curl_global_cleanup();
    return rc == CURLE_OK ? 0 : 1;
}
200Успешно
{
  "success": true,
  "message": "Order tag updated"
}

Обновлено

На этой странице