Перейти к основному содержанию
GET
/
v1
/
categories
Эндпоинт категорий VAT
curl --request GET \
  --url https://vat.cleariflow.com/v1/categories/
[
    {
        "category": "some agricultural inputs",
        "country_code": "DE",
        "description": "Reduced VAT rate (some agricultural inputs)",
        "rate": "0.070"
    },
    {
        "category": "taxation of some gold coins and jewellery",
        "country_code": "DE",
        "description": "Reduced VAT rate (taxation of some gold coins and jewellery)",
        "rate": "0.070"
    },
    {
        "category": "cut flowers and plants for decorative use and food production",
        "country_code": "DE",
        "description": "Reduced VAT rate (cut flowers and plants for decorative use and food production)",
        "rate": "0.070"
    },
    {
        "category": "e-books",
        "country_code": "DE",
        "description": "Reduced VAT rate (e-books)",
        "rate": "0.070"
    },

    ..................

    {
        "category": "standard",
        "country_code": "DE",
        "description": "Standard VAT rate",
        "rate": "0.190"
    },
    {
        "category": "newspapers and periodicals (except those containing content harmful to minors and/or more than 50% advertising)",
        "country_code": "DE",
        "description": "Reduced VAT rate (newspapers and periodicals (except those containing content harmful to minors and/or more than 50% advertising))",
        "rate": "0.070"
    },
    {
        "category": "some timber for industrial use",
        "country_code": "DE",
        "description": "Reduced VAT rate (some timber for industrial use)",
        "rate": "0.070"
    }
]

Начало работы

Базовый URL

https://vat.cleariflow.com/v1/categories/

Эндпоинт категорий

Эндпоинт categories требует ваш уникальный API-ключ и страну для запроса:
https://vat.cleariflow.com/v1/categories/
? api_key = YOUR_UNIQUE_API_KEY
& country_code = DE
Успешный запрос возвращает полную информацию о ставках VAT, включая стандартные и пониженные ставки с соответствующими категориями:
[
    {
        "category": "some agricultural inputs",
        "country_code": "DE",
        "description": "Reduced VAT rate (some agricultural inputs)",
        "rate": "0.070"
    },
    {
        "category": "taxation of some gold coins and jewellery",
        "country_code": "DE",
        "description": "Reduced VAT rate (taxation of some gold coins and jewellery)",
        "rate": "0.070"
    },
    {
        "category": "cut flowers and plants for decorative use and food production",
        "country_code": "DE",
        "description": "Reduced VAT rate (cut flowers and plants for decorative use and food production)",
        "rate": "0.070"
    },
    {
        "category": "e-books",
        "country_code": "DE",
        "description": "Reduced VAT rate (e-books)",
        "rate": "0.070"
    },

    ..................

    {
        "category": "standard",
        "country_code": "DE",
        "description": "Standard VAT rate",
        "rate": "0.190"
    },
    {
        "category": "newspapers and periodicals (except those containing content harmful to minors and/or more than 50% advertising)",
        "country_code": "DE",
        "description": "Reduced VAT rate (newspapers and periodicals (except those containing content harmful to minors and/or more than 50% advertising))",
        "rate": "0.070"
    },
    {
        "category": "some timber for industrial use",
        "country_code": "DE",
        "description": "Reduced VAT rate (some timber for industrial use)",
        "rate": "0.070"
    }
]

Параметры запроса

api_key
String
обязательно
Ваш уникальный API-ключ. У каждого пользователя уникальные ключи для каждого API Cleariflow, поэтому ключ API проверки VAT не будет работать, например, с API геолокации IP.
country_code
String
обязательно
Двухбуквенный ISO 3166-1 alpha-2 код страны, для которой нужно получить категории VAT.

Параметры ответа

Ответ API возвращается в универсальном лёгком формате JSON. Ответ — массив объектов категорий, каждый из которых содержит:
country_code
String
Двухбуквенный ISO 3166-1 alpha-2 код страны, для которой возвращены категории.
rate
String
Ставка VAT для данной категории в виде десятичной строки (например, «0.190» для 19%).
category
String
Название категории (например, «standard», «e-books», «audiobooks»).
description
String
Описание категории и области её применения.