allegro / allegro-api

Issue tracker and wiki for Allegro REST API
https://developer.allegro.pl/
213 stars 39 forks source link

Product offer - Tax Settings #8161

Closed acerov closed 8 months ago

acerov commented 9 months ago

Hello,

I am trying to POST product offer but am getting back following error:

{ "errors": [ { "code": "TransactionTaxSettingsNotFoundException", "message": "Unprocessable Entity", "details": null, "path": "tax", "userMessage": "Tax settings not found" } ] }

Actually I send TaxSettings with "rates" for various countries, so I don't understand the error.

Please help, Alen

Lukasz-Zurek commented 9 months ago

Please send me a trace-id. I will check our logs.

acerov commented 9 months ago

Here is last trace-id: c338f7bd33d9a9f9

On Wed, Dec 20, 2023 at 12:57 PM Lukasz-Zurek @.***> wrote:

Please send me a trace-id. I will check our logs.

— Reply to this email directly, view it on GitHub https://github.com/allegro/allegro-api/issues/8161#issuecomment-1864351059, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABMUSPFU2M7IOCM3KDO5OCDYKLHDLAVCNFSM6AAAAABA4TQYZGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRUGM2TCMBVHE . You are receiving this because you authored the thread.Message ID: @.***>

Lukasz-Zurek commented 9 months ago

@acerov I am sorry that you had to wait for so long.

I have checked the logs and I see that you were providing incorrect values in the "tax" field:

"tax":{"id":"","rate":"","subject":"","exemption":"","percentage":""},"taxSettings":{"rates":[{"rate":"0","countryCode":"AF"},{"rate":"0","countryCode":"AX"},{"rate":"0","countryCode":"AL"},{"rate":"0","countryCode":"DZ"},{"rate":"0","countryCode":"AS"},{"rate":"0","countryCode":"AD"},{"rate":"0","countryCode":"AO"},{"rate":"0","countryCode":"AI"},{"rate":"0","countryCode":"AQ"},{"rate":"0","countryCode":"AG"},{"rate":"0","countryCode":"AR"},{"rate":"0","countryCode":"AM"},{"rate":"0","countryCode":"AW"},{"rate":"0","countryCode":"AU"},{"rate":"20","countryCode":"AT"},{"rate":"0","countryCode":"AZ"},{"rate":"0","countryCode":"BS"},{"rate":"0","countryCode":"BH"},{"rate":"0","countryCode":"BD"},{"rate":"0","countryCode":"BB"},{"rate":"0","countryCode":"BY"},{"rate":"21","countryCode":"BE"},{"rate":"0","countryCode":"BZ"},{"rate":"0","countryCode":"BJ"},{"rate":"0","countryCode":"BM"},{"rate":"0","countryCode":"BT"},{"rate":"0","countryCode":"BO"},{"rate":"0","countryCode":"BA"},{"rate":"0","countryCode":"BW"},{"rate":"0","countryCode":"BV"},{"rate":"0","countryCode":"BR"},{"rate":"0","countryCode":"IO"},{"rate":"0","countryCode":"BN"},{"rate":"20","countryCode":"BG"},{"rate":"0","countryCode":"BF"},{"rate":"0","countryCode":"BI"},{"rate":"0","countryCode":"KH"},{"rate":"0","countryCode":"CM"},{"rate":"0","countryCode":"CA"},{"rate":"0","countryCode":"CV"},{"rate":"0","countryCode":"KY"},{"rate":"0","countryCode":"CF"},{"rate":"0","countryCode":"TD"},{"rate":"0","countryCode":"CL"},{"rate":"0","countryCode":"CN"},{"rate":"0","countryCode":"CX"},{"rate":"0","countryCode":"CC"},{"rate":"0","countryCode":"CO"},{"rate":"0","countryCode":"KM"},{"rate":"0","countryCode":"CG"},{"rate":"0","countryCode":"CD"},{"rate":"0","countryCode":"CK"},{"rate":"0","countryCode":"CR"},{"rate":"0","countryCode":"CI"},{"rate":"0","countryCode":"CU"},{"rate":"19","countryCode":"CY"},{"rate":"21","countryCode":"CZ"},{"rate":"25","countryCode":"DK"},{"rate":"0","countryCode":"DJ"},{"rate":"0","countryCode":"DM"},{"rate":"0","countryCode":"DO"},{"rate":"0","countryCode":"EC"},{"rate":"0","countryCode":"EG"},{"rate":"0","countryCode":"SV"},{"rate":"0","countryCode":"GQ"},{"rate":"0","countryCode":"ER"},{"rate":"20","countryCode":"EE"},{"rate":"0","countryCode":"ET"},{"rate":"0","countryCode":"FK"},{"rate":"0","countryCode":"FO"},{"rate":"0","countryCode":"FJ"},{"rate":"24","countryCode":"FI"},{"rate":"20","countryCode":"FR"},{"rate":"0","countryCode":"GF"},{"rate":"0","countryCode":"PF"},{"rate":"0","countryCode":"TF"},{"rate":"0","countryCode":"GA"},{"rate":"0","countryCode":"GM"},{"rate":"0","countryCode":"GE"},{"rate":"19","countryCode":"DE"},{"rate":"0","countryCode":"GH"},{"rate":"0","countryCode":"GI"},{"rate":"0","countryCode":"GR"},{"rate":"0","countryCode":"GL"},{"rate":"0","countryCode":"GD"},{"rate":"0","countryCode":"GP"},{"rate":"0","countryCode":"GU"},{"rate":"0","countryCode":"GT"},{"rate":"0","countryCode":"GG"},{"rate":"0","countryCode":"GN"},{"rate":"0","countryCode":"GW"},{"rate":"0","countryCode":"GY"},{"rate":"0","countryCode":"HT"},{"rate":"0","countryCode":"HM"},{"rate":"0","countryCode":"VA"},{"rate":"0","countryCode":"HN"},{"rate":"0","countryCode":"HK"},{"rate":"27","countryCode":"HU"},{"rate":"0","countryCode":"IS"},{"rate":"0","countryCode":"IN"},{"rate":"0","countryCode":"ID"},{"rate":"0","countryCode":"IR"},{"rate":"0","countryCode":"IQ"},{"rate":"23","countryCode":"IE"},{"rate":"0","countryCode":"IM"},{"rate":"0","countryCode":"IL"}

Another thing is the fact that "tax" field is already deprecated, so we suggest using different field “taxSettings” - more information here. Please check GET /sale/tax-settings closely. Thanks to this resource you can check the information needed to define the VAT rate in your offer.

acerov commented 9 months ago

Thank you for your time. Yes I know Tax is deprecated so that was the reason I left empty values in Tax and provide TaxSettings.

So should I completely remove Tax? Are my TaxSettings ok?

Thanks, Alen

čet, 21. pro 2023. 16:24 Lukasz-Zurek @.***> je napisao:

@acerov https://github.com/acerov I am sorry that you had to wait for so long.

I have checked the logs and I see that you were providing incorrect values in the "tax" field:

"tax":{"id":"","rate":"","subject":"","exemption":"","percentage":""},"taxSettings":{"rates":[{"rate":"0","countryCode":"AF"},{"rate":"0","countryCode":"AX"},{"rate":"0","countryCode":"AL"},{"rate":"0","countryCode":"DZ"},{"rate":"0","countryCode":"AS"},{"rate":"0","countryCode":"AD"},{"rate":"0","countryCode":"AO"},{"rate":"0","countryCode":"AI"},{"rate":"0","countryCode":"AQ"},{"rate":"0","countryCode":"AG"},{"rate":"0","countryCode":"AR"},{"rate":"0","countryCode":"AM"},{"rate":"0","countryCode":"AW"},{"rate":"0","countryCode":"AU"},{"rate":"20","countryCode":"AT"},{"rate":"0","countryCode":"AZ"},{"rate":"0","countryCode":"BS"},{"rate":"0","countryCode":"BH"},{"rate":"0","countryCode":"BD"},{"rate":"0","countryCode":"BB"},{"rate":"0","countryCode":"BY"},{"rate":"21","countryCode":"BE"},{"rate":"0","countryCode":"BZ"},{"rate":"0","countryCode":"BJ"},{"rate":"0","countryCode":"BM"},{"rate":"0","countryCode":"BT"},{"rate":"0","countryCode":"BO"},{"rate":"0","countryCode":"BA"},{"rate":"0","countryCode":"BW"},{"rate":"0","countryCode":"BV"},{"rate":"0","countryCode":"BR"},{"rate":"0","countryCode":"IO"},{"rate":"0","countryCode":"BN"},{"rate":"20","countryCode":"BG"},{"rate":"0","countryCode":"BF"},{"rate":"0","countryCode":"BI"},{"rate":"0","countryCode":"KH"},{"rate":"0","countryCode":"CM"},{"rate":"0","countryCode":"CA"},{"rate":"0","countryCode":"CV"},{"rate":"0","countryCode":"KY"},{"rate":"0","countryCode":"CF"},{"rate":"0","countryCode":"TD"},{"rate":"0","countryCode":"CL"},{"rate":"0","countryCode":"CN"},{"rate":"0","countryCode":"CX"},{"rate":"0","countryCode":"CC"},{"rate":"0","countryCode":"CO"},{"rate":"0","countryCode":"KM"},{"rate":"0","countryCode":"CG"},{"rate":"0","countryCode":"CD"},{"rate":"0","countryCode":"CK"},{"rate":"0","countryCode":"CR"},{"rate":"0","countryCode":"CI"},{"rate":"0","countryCode":"CU"},{"rate":"19","countryCode":"CY"},{"rate":"21","countryCode":"CZ"},{"rate":"25","countryCode":"DK"},{"rate":"0","countryCode":"DJ"},{"rate":"0","countryCode":"DM"},{"rate":"0","countryCode":"DO"},{"rate":"0","countryCode":"EC"},{"rate":"0","countryCode":"EG"},{"rate":"0","countryCode":"SV"},{"rate":"0","countryCode":"GQ"},{"rate":"0","countryCode":"ER"},{"rate":"20","countryCode":"EE"},{"rate":"0","countryCode":"ET"},{"rate":"0","countryCode":"FK"},{"rate":"0","countryCode":"FO"},{"rate":"0","countryCode":"FJ"},{"rate":"24","countryCode":"FI"},{"rate":"20","countryCode":"FR"},{"rate":"0","countryCode":"GF"},{"rate":"0","countryCode":"PF"},{"rate":"0","countryCode":"TF"},{"rate":"0","countryCode":"GA"},{"rate":"0","countryCode":"GM"},{"rate":"0","countryCode":"GE"},{"rate":"19","countryCode":"DE"},{"rate":"0","countryCode":"GH"},{"rate":"0","countryCode":"GI"},{"rate":"0","countryCode":"GR"},{"rate":"0","countryCode":"GL"},{"rate":"0","countryCode":"GD"},{"rate":"0","countryCode":"GP"},{"rate":"0","countryCode":"GU"},{"rate":"0","countryCode":"GT"},{"rate":"0","countryCode":"GG"},{"rate":"0","countryCode":"GN"},{"rate":"0","countryCode":"GW"},{"rate":"0","countryCode":"GY"},{"rate":"0","countryCode":"HT"},{"rate":"0","countryCode":"HM"},{"rate":"0","countryCode":"VA"},{"rate":"0","countryCode":"HN"},{"rate":"0","countryCode":"HK"},{"rate":"27","countryCode":"HU"},{"rate":"0","countryCode":"IS"},{"rate":"0","countryCode":"IN"},{"rate":"0","countryCode":"ID"},{"rate":"0","countryCode":"IR"},{"rate":"0","countryCode":"IQ"},{"rate":"23","countryCode":"IE"},{"rate":"0","countryCode":"IM"},{"rate":"0","countryCode":"IL"}

Another thing is the fact that "tax" field is already deprecated, so we suggest using different field “taxSettings” - more information here https://developer.allegro.pl/news/udostepnilismy-nowa-wersje-zasobu-sale-tax-settings-6MBRwVeYGs1. Please check GET /sale/tax-settings https://developer.allegro.pl/documentation#operation/getTaxSettingsForCategory closely. Thanks to this resource you can check the information needed to define the VAT rate in your offer.

— Reply to this email directly, view it on GitHub https://github.com/allegro/allegro-api/issues/8161#issuecomment-1866480159, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABMUSPCVWCY3V4JNAPVQVBTYKRIA3AVCNFSM6AAAAABA4TQYZGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRWGQ4DAMJVHE . You are receiving this because you were mentioned.Message ID: @.***>

Lukasz-Zurek commented 9 months ago

@acerov According to the category which you have chosen, you should call GET /sale/tax-settings?category.id=13638 - then we will return tax settings which you can provide in the request. But please note that you can only use tax settings for countryCode=PL or countryCode=CZ.

acerov commented 9 months ago

Ok, does it mean that customers from other EU or world countries can't buy on Allegro, just from PL and CZ?

Because for example if I buy from Croatia it should be 25% VAT based on "destination principle".

https://taxation-customs.ec.europa.eu/vat-e-commerce_en

Thanks, Alen

čet, 21. pro 2023. 17:08 Lukasz-Zurek @.***> je napisao:

@acerov https://github.com/acerov According to the category which you have chosen, you should call GET /sale/tax-settings?category.id http://category.id=13638 - then we will return tax settings which you can provide in the request. But please note that you can only use tax settings for countryCode=PL or countryCode=CZ.

— Reply to this email directly, view it on GitHub https://github.com/allegro/allegro-api/issues/8161#issuecomment-1866573498, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABMUSPALOYGN7P7KAFZ35X3YKRNFJAVCNFSM6AAAAABA4TQYZGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRWGU3TGNBZHA . You are receiving this because you were mentioned.Message ID: @.***>

Lukasz-Zurek commented 9 months ago

The customers from other EU or world countries can buy on Allegro. I can only confirm that in the /sale/tax-settings resource, where you can retrieve tax settings for given category, we support only two values: “PL” and “CZ” right now. We rely on international services available on Allegro.

But I cannot help you in the specific tax regulations and options. Information about documenting of sales of goods to buyers in the European Union you will find in Allegro Help.

You can ask about some more specific details of tax regulations in Allegro transactions via our contact form.

acerov commented 9 months ago

Hi, I checked /sale/tax-settings but am not sure how TaxSettings should be in my json.

Documentation have this example:

"taxSettings": { "rates": [ { "rate": "23.00", "countryCode": "PL" } ], "subject": "GOODS", "exemption": "MONEY_EQUIVALENT" },

and /sale/tax-settings returns these:

{ "id": "ed5b1dc0-55db-4821-a922-39b0a4a5c716", "rate": { "name": "23%", "id": "23.00" }, "percentage": "23.00", "subject": { "name": "Towar", "id": "GOODS" }, "exemption": null, "countryCode": "PL" },

Please help, Alen

MaciejFrackowiak commented 9 months ago

The example from the tutorial is correct - please, check our news about the latest change.

acerov commented 9 months ago

In my last attempt I posted following:

"taxSettings": { "rates": [ { "rate": "21", "countryCode": "CZ" }, { "rate": "23", "countryCode": "PL" } ], "subject": "GOODS", "exemption": "MONEY_EQUIVALENT" },

and still got "TransactionTaxSettingsNotFoundException"

Trace id: 34967edd76cf2cc7

Alen

MaciejFrackowiak commented 9 months ago

As I see you tried to list an offer in the category with id=13638. It means that you should retrieve tax settings for that category. In the response to GET /sale/tax-settings?category.id=13638 you will not receive a value "exemption": "MONEY_EQUIVALENT". As a result you got an error with code 422.

acerov commented 9 months ago

Ok, but later I tried with following TaxSettings:

"taxSettings": {
    "rates": [
        {
            "rate": "21.00",
            "countryCode": "CZ"
        },
        {
            "rate": "23.00",
            "countryCode": "PL"
        }
    ],
    "subject": "GOODS",
    "exemption": ""
},

Same error, why?

Trace-id: 23b057511ba565df

MaciejFrackowiak commented 9 months ago

You should provide "null" instead of "" in the field "exemption".

acerov commented 9 months ago

I made it through with my first offer.

Thank you, Alen

stale[bot] commented 8 months ago

W tym wątku nie pojawiła się żadna nowa odpowiedź w ciągu 7 dni, dlatego automatycznie oznaczamy go jako przeterminowany. Jeśli w ciągu kolejnych 7 dni nie pojawi się żadna odpowiedź, wątek zostanie zamknięty. Dziękujemy za zaangażowanie w dyskusję i zachęcamy Cię do wypełnienia ankiety dotyczącej naszego wsparcia na forum.


There was no new reply in this thread within 7 days, therefore, we automatically marked it as expired. If no response is received within the next 7 days, this thread will be closed. Thank you for engaging in the discussion. We encourage you to complete our forum support survey.