Important terms
Words you will meet in every response.
proposal
result.proposal tells you what to do with the answer.
| proposal | What to do in your form |
|---|---|
valid | Accept the value. Show the valid state. |
validWithSuggestion | Accept it, and ask “Did you mean …?” |
invalid | Mark the field invalid. |
invalidWithSuggestion | Mark invalid and offer the suggestion. |
invalidWithCorrection | Replace the value with resultCorrected, show valid. |
invalidWithCorrectionWithSuggestion | Correct it, and offer the other options. |
invalidWithPartialCorrection | Apply the format fix, but keep the field invalid. |
unknown | Show no validation state at all. |
result, resultCorrected, suggestions
| Field | Meaning |
|---|---|
result | Your value, evaluated as you sent it. |
resultCorrected | The corrected value, or null if nothing could be corrected. |
suggestions | Other likely values to offer the user. |
client
Optional data about your end user: IP address, country or GPS. It makes search results more relevant.
json
"client": {
"country": "CZ",
"location": { "lat": 50.0628, "lon": 13.9271 }
}
dataScope
How much data comes back. basic is the default, extended and full return more and cost more.