not_found
HTTP Status: 404 Not Found
Example response
{
"error": {
"code": "not_found",
"message": "No VAT rates found for country code: XX",
"docs_url": "https://docs.avatcado.com/errors/not_found"
},
"meta": {
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}
What happened?
The requested resource does not exist. Common cases:
- VAT Rates: The country code you provided doesn’t match any country in our database
- The resource was removed or never existed
How to fix
- Check the country code. Use a valid ISO 3166-1 alpha-2 code:
curl -H "Authorization: Bearer avat_live_your_api_key" \
"https://api.avatcado.com/v1/rates/NL"
- List all supported countries to find the right code:
curl -H "Authorization: Bearer avat_live_your_api_key" \
"https://api.avatcado.com/v1/rates"
- Note: Greece uses
EL (not GR), following the EU VIES convention
Catching this error with the SDKs
import Avatcado, { AvatcadoError } from '@avatcado/node';
const avatcado = new Avatcado('avat_live_your_api_key');
const { data, error } = await avatcado.vat.validate({ vatNumber: '...' });
if (error instanceof AvatcadoError) {
console.log(`${error.code}: ${error.message}`);
console.log(error.docsUrl);
}