Status codes
Address-analysis methods return strStatus alongside intRetCode in the standard envelope. intRetCode reports transport-level success (0 = OK), while strStatus reports the semantic outcome of the address engine.
SERP status values#
| Code | Meaning | When you'll see it |
|---|---|---|
| V | Valid | Address is correct as entered. No changes were applied. |
| C | Correctable | Address had recoverable issues (casing, missing words, abbreviations). The engine returns a canonical version. |
| N | Non-correctable | Address has issues the engine cannot resolve with confidence (e.g. a street that exists in two municipalities at the same postal code). Surface Alternatives[] to the user. |
| I | Invalid | No plausible Canadian address could be derived from the input. |
| F | Failed | Service-level failure: the engine could not run the request. Check intRetCode and strMessage for details. |
intRetCode values#
| Code | Meaning |
|---|---|
0 | Success. strStatus carries the semantic result. |
400 | Bad request — malformed JSON or missing required parameter. See strMessage. |
401 | Missing or invalid Authorization header. |
403 | License key revoked, expired, or out of credits. |
429 | Rate limit exceeded (per-IP for demo traffic). See Rate limits. |
500 | Internal engine error. Retry with backoff; if persistent, open a support ticket. |
Handling each strStatus#
js
switch (response.strStatus) {
case 'V':
// Use response.Alternatives[0] (or AddressLinesOut) as-is.
break;
case 'C':
// Use the corrected output. Optionally show the user a "we made these changes" diff.
break;
case 'N':
// Surface response.Alternatives[] to the user; ask them to confirm one.
break;
case 'I':
// Fail validation in the UI and prompt for re-entry.
break;
case 'F':
// Treat as a transient service issue; retry or fall back to manual entry.
break;
}