> ## Documentation Index
> Fetch the complete documentation index at: https://docs.avatcado.com/llms.txt
> Use this file to discover all available pages before exploring further.

# missing_parameter

> Error: required query parameter not provided

# missing\_parameter

<Info>HTTP Status: **400 Bad Request**</Info>

## Example response

```json theme={null}
{
  "error": {
    "code": "missing_parameter",
    "message": "Query parameter 'vat_number' is required",
    "docs_url": "https://docs.avatcado.com/errors/missing_parameter"
  },
  "meta": {
    "request_id": "550e8400-e29b-41d4-a716-446655440000"
  }
}
```

## What happened?

The request to `/v1/validate` was missing the required `vat_number` query parameter. This happens when:

* The `vat_number` parameter is completely absent from the URL
* The parameter name is misspelled (e.g., `vatNumber` instead of `vat_number`)
* The request body was sent instead of query parameters

## How to fix

1. Add the `vat_number` query parameter to your request URL
2. Make sure you're using **snake\_case**: `vat_number`, not `vatNumber` or `vatnumber`
3. Pass VAT numbers as **query parameters**, not in the request body

```bash theme={null}
# Correct
curl -H "Authorization: Bearer avat_live_your_api_key" \
  "https://api.avatcado.com/v1/validate?vat_number=NL123456789B01"

# Wrong - missing parameter
curl -H "Authorization: Bearer avat_live_your_api_key" \
  "https://api.avatcado.com/v1/validate"
```

## Common mistakes

* Using `vatNumber` or `vat-number` instead of `vat_number`
* Sending a POST request with a JSON body instead of a GET with query params
* URL-encoding the `?` character, preventing the parameter from being parsed

## Catching this error with the SDKs

<CodeGroup>
  ```typescript @avatcado/node theme={null}
  import Avatcado, { ValidationError } from '@avatcado/node';

  const avatcado = new Avatcado('avat_live_your_api_key');
  const { data, error } = await avatcado.vat.validate({ vatNumber: '...' });

  if (error instanceof ValidationError) {
    console.log(error.message);
    console.log(error.details); // Array<{ field, message }> | null
  }
  ```

  ```python Python theme={null}
  from avatcado import Avatcado, ValidationError

  avatcado = Avatcado("avat_live_your_api_key")

  try:
      result = avatcado.vat.validate("...")
  except ValidationError as e:
      print(e.message)
      print(e.details)  # list of dicts or None
  ```
</CodeGroup>

## Related errors

* [`invalid_vat_format`](/errors/invalid_vat_format) - Parameter present but format is wrong
