<?php
$token = '12345678-abcd-efgh-ijkl-mnopqrstuvwx';
$year = 2023;
$url = "https://legalcalc.ru/api/public/ipc/{$year}?token=" . urlencode($token);
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
?>
<?php
$token = '12345678-abcd-efgh-ijkl-mnopqrstuvwx';
$amount = 100000;
$startDate = '2023-01-01';
$endDate = '2023-12-31';
$url = "https://legalcalc.ru/api/public/ipc/calculate?" . http_build_query([
'token' => $token,
'amount' => $amount,
'start_date' => $startDate,
'end_date' => $endDate
]);
$response = file_get_contents($url);
$result = json_decode($response, true);
print_r($result);
?>
const token = '12345678-abcd-efgh-ijkl-mnopqrstuvwx';
const url = `https://legalcalc.ru/api/public/ipc?token=${encodeURIComponent(token)}`;
fetch(url)
.then(response => response.json())
.then(data => {
console.log(data);
})
.catch(error => {
console.error('Ошибка:', error);
});
const token = '12345678-abcd-efgh-ijkl-mnopqrstuvwx';
const params = new URLSearchParams({
token: token,
amount: 100000,
start_date: '2023-01-01',
end_date: '2023-12-31'
});
const url = `https://legalcalc.ru/api/public/ipc/calculate?${params}`;
fetch(url)
.then(response => response.json())
.then(result => {
console.log(result);
})
.catch(error => {
console.error('Ошибка:', error);
});
import requests
token = '12345678-abcd-efgh-ijkl-mnopqrstuvwx'
year = 2023
url = f'https://legalcalc.ru/api/public/ipc/{year}'
params = {'token': token}
response = requests.get(url, params=params)
data = response.json()
print(data)
import requests
token = '12345678-abcd-efgh-ijkl-mnopqrstuvwx'
url = 'https://legalcalc.ru/api/public/ipc/calculate'
params = {
'token': token,
'amount': 100000,
'start_date': '2023-01-01',
'end_date': '2023-12-31'
}
response = requests.get(url, params=params)
result = response.json()
print(result)
Примечания: