This guide covers everything you need to upgrade an integration from Foxentry API 2.0 to 2.1. It lists every breaking change, the additive (non-breaking) features, before/after examples, and a field-by-field reference.
Action required. Version
2.1is now the default. Integrations that do not pin a version will receive2.1automatically. If you are not ready to migrate, pin2.0explicitly (see Selecting a version). The breaking changes are limited to two endpoints —POST /phone/validateandPOST /name/validate— but two of them are silent (no error is returned), so review them carefully.
At a glance
| Area | Status |
|---|---|
| Endpoint catalogue (12 endpoints) | Unchanged |
Request / response envelope (request.query, request.options, request.client, result, resultCorrected, suggestions) | Unchanged |
Authentication and base URL (https://api.foxentry.com) | Unchanged |
POST /company/*, POST /email/*, POST /location/* | Unchanged |
POST /phone/validate | Breaking changes |
POST /name/validate | Breaking changes |
If your integration does not call /phone/validate or /name/validate, upgrading to 2.1 requires no code changes — only confirming the version header.
Selecting a version
The API version is selected with the api-version request header.
curl https://api.foxentry.com/phone/validate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "api-version: 2.1" \
-H "Content-Type: application/json" \
-d '{ "request": { "query": { "numberFull": "+420607123456" } } }'The header is optional, and its default changed in this release:
Default api-version | |
|---|---|
| Before this release | 2.0 |
| Now | 2.1 |
Recommendations
- Pin the version explicitly on every request. Relying on the default means a server-side default change can alter your integration's behaviour without a deploy on your side.
- Not ready to migrate? Send
api-version: 2.0. Version2.0remains available to pinned clients. - Verify what you received. Every response echoes the resolved version in the
Foxentry-Api-Versionresponse header. Assert on it in your tests.
Breaking changes
POST /phone/validate
POST /phone/validateRequest — query
queryThe combined number field was renamed.
| 2.0 | 2.1 |
|---|---|
query.numberWithPrefix | query.numberFull |
The alternative form (separate prefix + number) is unchanged.
Request — options
options| 2.0 | 2.1 | Notes |
|---|---|---|
defaultPrefix (deprecated) | Removed | Use preferredPrefixes |
formatNumber (boolean) | numberFormat (enum) | Type and semantics changed |
numberFormat replaces the boolean toggle with an explicit output format. The four values map to standard telephony notations:
| Value | Description | Example |
|---|---|---|
raw | Number as supplied, digits only | 607123456 |
national | National format with grouping | 607 123 456 |
e123 | ITU-T E.123 international, with spaces | +420 607 123 456 |
e164 | ITU-T E.164 international, no spaces | +420607123456 |
Default: e164.
Before (2.0)
{
"request": {
"query": { "numberWithPrefix": "+420607123456" },
"options": {
"validationType": "basic",
"defaultPrefix": "+420",
"formatNumber": false
}
}
}After (2.1)
{
"request": {
"query": { "numberFull": "+420607123456" },
"options": {
"validationType": "basic",
"preferredPrefixes": ["+420"],
"numberFormat": "e164"
}
}
}Response — result.data
result.dataThe number field was renamed to match the request:
| 2.0 | 2.1 |
|---|---|
result.data.numberWithPrefix | result.data.numberFull |
The result.data.format object was fully renamed:
| 2.0 field | 2.0 value | 2.1 field | 2.1 value |
|---|---|---|---|
national | 775111222 | raw | 775111222 |
nationalFormatted | 775 111 222 | national | 775 111 222 |
international | +420775111222 | e164 | +420775111222 |
internationalFormatted | +420 775 111 222 | e123 | +420 775 111 222 |
⚠️ Silent breaking change —
format.nationalwas reused. The keynationalexists in both versions but its meaning changed: in2.0it was the unformatted number (775111222); in2.1it is the grouped number (775 111 222). Code readingformat.nationalwill keep working without an error and silently return different data. Audit every reference to theformatobject.
Before (2.0)
"format": {
"national": "775111222",
"nationalFormatted": "775 111 222",
"international": "+420775111222",
"internationalFormatted": "+420 775 111 222"
}After (2.1)
"format": {
"raw": "775111222",
"national": "775 111 222",
"e164": "+420775111222",
"e123": "+420 775 111 222"
}Response — nullability
result.data.country.code and result.data.country.prefix are now nullable (string | null). Handle null when the country cannot be resolved.
POST /name/validate
POST /name/validateRequest — options
optionsThe 2.0 depth/smart-mode controls were removed and replaced by the unified correctionMode field (consistent with the other validation endpoints), plus a new dataLanguage field.
| 2.0 | 2.1 | Notes |
|---|---|---|
validationDepth (enum) | Removed | No direct replacement; validation strictness is now handled internally |
smartMode (boolean) | Removed | Superseded by correctionMode |
| — | correctionMode (enum) | New, default full |
| — | dataLanguage (enum) | New, default cs |
correctionMode values:
| Value | Behaviour |
|---|---|
full | Apply all corrections |
format | Fix formatting only |
suggestion | Return corrected data in suggestions only |
none | Apply no corrections |
dataLanguage (en / cs / sk / pl, default cs) controls the language of salutations and inflected name forms (e.g. the Czech vocative pane inženýre).
Mapping the old behaviour
| 2.0 | 2.1 equivalent |
|---|---|
smartMode: true (corrections applied) | correctionMode: full |
smartMode: false (corrections offered as suggestions) | correctionMode: suggestion |
Before (2.0)
"options": {
"dataScope": "full",
"acceptDegrees": false,
"acceptContext": false,
"validationDepth": "strict",
"smartMode": true
}After (2.1)
"options": {
"dataScope": "full",
"acceptDegrees": false,
"acceptContext": false,
"correctionMode": "full",
"dataLanguage": "cs"
}Response — details was relocated
details was relocatedThe details object moved one level deeper, from the result root into the data object:
| 2.0 | 2.1 |
|---|---|
result.details | result.data.details |
⚠️ Silent breaking change. No error is returned if you read the old path; the field is simply absent. Update all reads from
result.detailstoresult.data.details. The internal structure ofdetailsis unchanged, except thatdetails[].nameDaysis no longer required and may be omitted.
New features (additive)
These are safe to ignore until you choose to adopt them.
POST /name/validate — vocative (5th case) forms in result.data:
| Field | Description | Example |
|---|---|---|
vocativeName | Vocative of the first name | Petře |
vocativeSurname | Vocative of the surname | Nováku |
vocativeNameSurname | Vocative of the full name | Petře Nováku |
All three are string | null.
POST /name/validate — result.dataTypes reports which queried components were judged valid vs. invalid:
"dataTypes": {
"valid": ["name", "surname"],
"invalid": []
}Possible members: name, surname, nameSurname, context, degreesBefore, degreesAfter.
Field reference (breaking changes only)
| Endpoint | Location | 2.0 | 2.1 |
|---|---|---|---|
/phone/validate | request query | numberWithPrefix | numberFull |
/phone/validate | request options | defaultPrefix | (removed — use preferredPrefixes) |
/phone/validate | request options | formatNumber (bool) | numberFormat (enum, default e164) |
/phone/validate | response data | numberWithPrefix | numberFull |
/phone/validate | response data.format | national | raw |
/phone/validate | response data.format | nationalFormatted | national |
/phone/validate | response data.format | international | e164 |
/phone/validate | response data.format | internationalFormatted | e123 |
/name/validate | request options | validationDepth | (removed) |
/name/validate | request options | smartMode | correctionMode (enum, default full) |
/name/validate | response | result.details | result.data.details |
Migration checklist
All integrations
- Send the
api-versionheader explicitly on every request. - Assert on the
Foxentry-Api-Versionresponse header in your tests. - Decide your cutover strategy: pin
2.0until ready, or migrate to2.1.
/phone/validate
- Request: rename
numberWithPrefix→numberFull. - Request: remove
defaultPrefix; move topreferredPrefixes. - Request: replace
formatNumber(boolean) withnumberFormat(raw/national/e123/e164). - Response: rename
data.numberWithPrefix→data.numberFull. - Response: remap the
data.formatobject — re-check every use offormat.national(meaning changed). - Response: handle
nullfordata.country.codeanddata.country.prefix.
/name/validate
- Request: remove
validationDepthandsmartMode. - Request: add
correctionMode(and optionallydataLanguage). - Response: move reads from
result.details→result.data.details. - Response: handle a possibly-absent
details[].nameDays. - Optional: adopt
dataTypesand thevocative*fields.