OneStopAnalyze
The recommended single-call method for address capture. OneStopAnalyze combines the functionalities of AnalyzeGetAlternatives, BrowseAddressEx, and ParseAddress into one request, returning a corrected address with a SERP status code and up to N alternatives for ambiguous input.
http
POST /OneStopAnalyzeRequest#
| Name | Type | Description |
|---|---|---|
| AddressLayoutRequired | string | Name of the address layout to interpret the input against (see /docs/layouts). |
| AnalysisModeRequired | string | Name of the analysis mode (FLEXIBLE / MODERATE / STRICT / oneStop / …). |
| CorrectionStyleRequired | string | Casing and keyword treatment for the corrected output (see /docs/styles). |
| AddressLinesInRequired | LineContent[] | Array of { strName, strContent } pairs matching the layout. For free-form input use a single line with strName: "". |
| MaxAlternatives | number | Cap the Alternatives array. Common: 5 for autocomplete, 200 for batch correction. |
| MaxNamesToAddresses | number | Maximum alternatives returned when the engine expands a name into addresses. |
| BrowsingLevel | number | How aggressively to browse for completions on partial input (0–3). |
| GuessingFlags | number | Bitmask controlling permissive parsing behaviors. |
Example request#
bash
curl $NCODE_BASE/OneStopAnalyze \
-H "Authorization: AcmeLogistics|nck_live_…" \
-H "Content-Type: application/json" \
-d '{
"AddressLayout": "oneStop Address Layout",
"AnalysisMode": "oneStop Analysis Mode",
"CorrectionStyle": "MIXED KYWD",
"AddressLinesIn": [{ "strName": "", "strContent": "100 King St W Toronto ON M5X 1A9" }],
"MaxAlternatives": 5,
"MaxNamesToAddresses": 20,
"BrowsingLevel": 2
}'Response#
| Name | Type | Description |
|---|---|---|
| intRetCodeRequired | number | 0 = success. Non-zero = error; see strMessage. |
| strMessageRequired | string | Human-readable result message. |
| strStatusRequired | string | SERP status: V / C / N / I / F. See /docs/status-codes. |
| HashCode | string | Stable hash for the canonical address — useful for deduplication. |
| AddressComplete | boolean | True when input was sufficient for a definitive single answer. |
| Alternatives | Address[] | Parsed and corrected address candidates. Cardinality bounded by MaxAlternatives. |
| ActualAlternativesFound | number | Total alternatives available before the MaxAlternatives cap. |
| Country | string | Set when the input is foreign and could not be matched to a Canadian record. |
Example response#
json
{
"intRetCode": 0,
"strMessage": "OK",
"strStatus": "V",
"AddressComplete": true,
"HashCode": "F8…2A",
"Alternatives": [
{
"AddressElements": {
"TypeOfAddress": "AES_StreetAddress",
"StreetNumberFrom": "100",
"StreetName": "KING",
"StreetType": "ST",
"StreetDirection": "W",
"Municipality": "TORONTO",
"Province": "ON",
"PostalCode": "M5X 1A9"
}
}
],
"ActualAlternativesFound": 1
}Tips#
- For autocomplete UIs, send each keystroke as a separate request with
MaxAlternatives: 5and render the resultingAlternatives[].AddressElementsas suggestions. - For batch correction, prefer
AnalyzeRecords— billed per record, but a single round-trip for many addresses. - The engine sometimes returns a single alternative for a fully-valid input. Trust
strStatus: Vas the canonical signal, not the array length. - See TransformAddress if you need to reformat the result into a different
AddressLayoutafter capture.