Получить заказ по ID
curl --request GET \
--url https://api.every.ru/b2b/esim/order/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.every.ru/b2b/esim/order/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.every.ru/b2b/esim/order/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.every.ru/b2b/esim/order/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.every.ru/b2b/esim/order/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.every.ru/b2b/esim/order/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.every.ru/b2b/esim/order/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"order": {
"id": 1234567890,
"country": "RU",
"packet": 1234567890,
"count": 1,
"created_at": "2023-12-01T10:30:00Z",
"expired_at": "2023-12-08T10:30:00Z",
"status": "inited"
},
"esim": {
"iccid": "89882470000012345678",
"name": "US.1",
"smdp": "https://smdp.example.com",
"activation": "LPA:1$smdp.example.com$1234567890",
"provisioned_at": "2023-12-01T10:35:00Z"
}
}{
"code": -32602,
"message": "Заказ не найден",
"data": {
"code": 1
}
}Заказы
Информация о заказе
GET
/
order
/
{id}
Получить заказ по ID
curl --request GET \
--url https://api.every.ru/b2b/esim/order/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.every.ru/b2b/esim/order/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.every.ru/b2b/esim/order/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.every.ru/b2b/esim/order/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.every.ru/b2b/esim/order/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.every.ru/b2b/esim/order/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.every.ru/b2b/esim/order/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"order": {
"id": 1234567890,
"country": "RU",
"packet": 1234567890,
"count": 1,
"created_at": "2023-12-01T10:30:00Z",
"expired_at": "2023-12-08T10:30:00Z",
"status": "inited"
},
"esim": {
"iccid": "89882470000012345678",
"name": "US.1",
"smdp": "https://smdp.example.com",
"activation": "LPA:1$smdp.example.com$1234567890",
"provisioned_at": "2023-12-01T10:35:00Z"
}
}{
"code": -32602,
"message": "Заказ не найден",
"data": {
"code": 1
}
}Авторизации
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Параметры пути
ID заказа
⌘I