[NEWS] Udostępniliśmy nową wersję zasobu /sale/tax-settings / We have released a new version of the /sale/tax-settings resource
- 主要言語
- 言語のデータがありません
- スター
- 244
- フォーク
- 40
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Od dziś możesz skorzystać z wersji **beta.v1** zasobu [/sale/tax-settings](https://developer.allegro.pl/documentation#operation/getTaxSettingsForCategory), dzięki czemu łatwiej uzyskasz informacje potrzebne do zdefiniowania stawki VAT w ofercie.
**Jakie zmiany wdrożyliśmy w wersji beta.v1?**
W wersji **beta.v1** wdrożyliśmy nową strukturę, w której zwrócimy listę następujących obiektów:
- **“subjects”** - tablica zawierająca listę przedmiotów opodatkowania,
- **“rates”** - lista stawek VAT (**“rates[].rate”**) dla poszczególnych krajów (**“rates[].countryCode”**) Pola **“subjects”** i **“exemptions”** są wspólne dla wszystkich krajów, które znajdują się na liście w **“rates”**,
- **“exemptions”** - lista podstaw wyłączenia z VAT.
Aby dostosować się do zmian, wystarczy, że zmienisz wartość w nagłówku **Accept** z “application/vnd.allegro.public.v1+json” na **“application/vnd.allegro.beta.v1+json”**.
**Przykładowy request:**
```
curl -X GET \
'https://api.allegro.pl/sale/tax-settings?category.id=315261&countryCode=CZ’ \
-H 'Authorization: Bearer {token}' \
-H 'Accept: application/vnd.allegro.beta.v1+json' \
Przykładowy response:
{
"subjects": [ - lista przedmiotów opodatkowania
{
"label": "Towar",
"value": "GOODS"
},
{
"label": "Wybierz",
"value": null
}
],
"rates": [ - lista stawek VAT
{
"countryCode": "PL",
"values": [
{
"label": "23%",
"value": "23.00",
"exemptionRequired": false
},
{
"label": "Poza VAT / NP",
"value": "OUT_OF_SCOPE_OF_VAT",
"exemptionRequired": true
},
{
"label": "Wybierz",
"value": null,
"exemptionRequired": false
}
]
},
{
"countryCode": "CZ",
"values": [...]
}
],
"exemptions": [ - podstawy wyłączenia z VAT
{
"label": "Wyroby akcyzowe",
"value": "EXCISE_GOODS"
},
{
"label": "Procedura marży",
"value": "MARGIN_SCHEME"
},
{
"label": "Wybierz",
"value": null
}
]
}
```
**Dlaczego wprowadzamy tę zmianę?**
Zasób [/sale/tax-settings](https://developer.allegro.pl/documentation#operation/getTaxSettingsForCategory) funkcjonuje obecnie w wersji **public.v1**, jednak struktura odpowiedzi nie jest dostosowana do obiektu **“taxSettings”**, który wdrożyliśmy [12 kwietnia 2023 roku](https://developer.allegro.pl/news/wprowadzamy-zmiany-w-deklarowaniu-stawki-vat-w-ofercie-D7lnKDXDOCE) na zasobach:
- [GET /sale/product-offers/{offerID}](https://developer.allegro.pl/documentation#operation/getProductOffer),
- [PATCH /sale/product-offers/{offerID}](https://developer.allegro.pl/documentation#operation/editProductOffers),
- [POST /sale/product-offers](https://developer.allegro.pl/documentation#operation/createProductOffers),
- [GET /sale/offers/{offerID}](https://developer.allegro.pl/documentation#operation/getOfferUsingGET),
- [PUT /sale/offers/{offerID}](https://developer.allegro.pl/documentation#operation/updateOfferUsingPUT),
- [POST /sale/offers](https://developer.allegro.pl/documentation#operation/createOfferUsingPOST),
gdzie zastąpiliśmy jednocześnie pole **“tax”,** które oznaczyliśmy jako **Deprecated**.
**Jakie są kolejne kroki?**
W przyszłości planujemy przenieść strukturę zasobu w wersji **beta.v1** na wersję **public.v1**, poinformujemy o tym z odpowiednim wyprzedzeniem.
---------
From now on, you can use the **beta.v1** version of the [/sale/tax-settings](https://developer.allegro.pl/documentation#operation/getTaxSettingsForCategory) resource, which will make it easier for you to obtain the information needed to define the VAT rate in your offer.
**What changes have we implemented in beta.v1?**
In **beta.v1** we have implemented a new structure in which we will return a list of the following objects:
- **“subjects”** - an array containing a list of taxable items,
- **“rates”** - list of VAT rates (**“rates[].rate”**) for individual countries (**“rates[].countryCode”**) The **“subjects”** and **“exemptions”** fields are common to all countries that are on the list in **“rates"**,
- **“exemptions”** - list of grounds for exclusion from VAT.
To adapt to the changes, simply change the value in the Accept header from “application/vnd.allegro.public.v1+json” to **“application/vnd.allegro.beta.v1+json”**.
**Sample request:**
```
curl -X GET \
'https://api.allegro.pl/sale/tax-settings?category.id=315261&countryCode=CZ’ \
-H 'Authorization: Bearer {token}' \
-H 'Accept: application/vnd.allegro.beta.v1+json' \
Sample response:
{
"subjects": [ - a list of tax subjects
{
"label": "Goods",
"value": "GOODS"
},
{
"label": "Select",
"value": null
}
],
"rates": [ - a list of tax rates
{
"countryCode": "PL",
"values": [
{
"label": "23%",
"value": "23.00",
"exemptionRequired": false
},
{
"label": "Out of scope of VAT",
"value": "OUT_OF_SCOPE_OF_VAT",
"exemptionRequired": true
},
{
"label": "Select",
"value": null,
"exemptionRequired": false
}
]
},
{
"countryCode": "CZ",
"values": [...]
}
],
"exemptions": [ - a list of tax exemptions
{
"label": "Excise goods",
"value": "EXCISE_GOODS"
},
{
"label": "Margin scheme",
"value": "MARGIN_SCHEME"
},
{
"label": "Select",
"value": null
}
]
}
```
**Why are we making this change?**
The [/sale/tax-settings](https://developer.allegro.pl/documentation#operation/getTaxSettingsForCategory) resource currently operates in the **public.v1** version, but the response structure is not adapted to the **"taxSettings"** object, which we implemented on [April 12, 2023](https://developer.allegro.pl/news/wprowadzamy-zmiany-w-deklarowaniu-stawki-vat-w-ofercie-D7lnKDXDOCE) on the resources:
- [GET /sale/product-offers/{offerID}](https://developer.allegro.pl/documentation#operation/getProductOffer),
- [PATCH /sale/product-offers/{offerID}](https://developer.allegro.pl/documentation#operation/editProductOffers),
- [POST /sale/product-offers](https://developer.allegro.pl/documentation#operation/createProductOffers),
- [GET /sale/offers/{offerID}](https://developer.allegro.pl/documentation#operation/getOfferUsingGET),
- [PUT /sale/offers/{offerID}](https://developer.allegro.pl/documentation#operation/updateOfferUsingPUT),
- [POST /sale/offers](https://developer.allegro.pl/documentation#operation/createOfferUsingPOST),
where we also replaced the **“tax”** field, which we marked as **Deprecated**.
**What are the next steps?**
In the future, we plan to transfer the resource structure in the **beta.v1** version to the **public.v1** version, we will inform you about it in advance.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
評価
この issue はまだ評価されていません。