cURL
curl --request GET \
--url https://api.example.com/v1/account/shop/products/{productID}import requests
url = "https://api.example.com/v1/account/shop/products/{productID}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/v1/account/shop/products/{productID}', 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.example.com/v1/account/shop/products/{productID}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/v1/account/shop/products/{productID}"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/v1/account/shop/products/{productID}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/account/shop/products/{productID}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"code": "<string>",
"kind": "telegram_premium",
"name": "<string>",
"currency": "<string>",
"available": true,
"priceKnown": true,
"quantity": 123,
"quote": {
"priceMinor": 123,
"currency": "<string>",
"expiresAt": "2023-11-07T05:31:56Z"
},
"description": "<string>",
"priceMinor": 123,
"durationMonths": 123,
"starQuantity": 123,
"promo": {
"code": "<string>",
"discountMinor": 123,
"rejection": "<string>"
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"request_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"request_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"request_id": "<string>"
}account
Get v1accountshopproducts 1
One product with a live quote. The quote and its expiry are one object, so a client cannot read the price without also being handed the moment it stops applying.
GET
/
v1
/
account
/
shop
/
products
/
{productID}
cURL
curl --request GET \
--url https://api.example.com/v1/account/shop/products/{productID}import requests
url = "https://api.example.com/v1/account/shop/products/{productID}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/v1/account/shop/products/{productID}', 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.example.com/v1/account/shop/products/{productID}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/v1/account/shop/products/{productID}"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/v1/account/shop/products/{productID}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/account/shop/products/{productID}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"code": "<string>",
"kind": "telegram_premium",
"name": "<string>",
"currency": "<string>",
"available": true,
"priceKnown": true,
"quantity": 123,
"quote": {
"priceMinor": 123,
"currency": "<string>",
"expiresAt": "2023-11-07T05:31:56Z"
},
"description": "<string>",
"priceMinor": 123,
"durationMonths": 123,
"starQuantity": 123,
"promo": {
"code": "<string>",
"discountMinor": 123,
"rejection": "<string>"
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"request_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"request_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"request_id": "<string>"
}Path Parameters
Query Parameters
Available options:
ru, en Required range:
1 <= x <= 10Response
Product and quote
Available options:
telegram_premium, telegram_stars Whether priceMinor is a published number. False means the product is priced when it is opened, so a screen never has to read a missing price as zero.
A price and the moment it stops applying. The two travel together so a client cannot hold one without the other.
Show child attributes
Show child attributes
Telegram Premium only.
Telegram Stars only.
Show child attributes
Show child attributes