VTEX · Schema

Correction

Response body object.

CommerceE-CommerceRetailMarketplacePayments

Properties

Name Type Description
correction object Object that indicates if the term was misspelled and suggests a possible correction.
View JSON Schema on GitHub

JSON Schema

vtex-correction-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/Correction",
  "title": "Correction",
  "type": "object",
  "description": "Response body object.",
  "properties": {
    "correction": {
      "type": "object",
      "description": "Object that indicates if the term was misspelled and suggests a possible correction.",
      "properties": {
        "misspelled": {
          "type": "boolean",
          "description": "Defines whether the term was misspelled (`true`) or not (`false`)."
        },
        "correction": {
          "type": "boolean",
          "description": "Defines whether the API was able to suggest a correction (`true`) or not (`false`)."
        },
        "text": {
          "type": "string",
          "description": "The corrected term. If the API was not able to correct the term, it will show the original search term."
        },
        "highlighted": {
          "type": "string",
          "description": "The same as `text`, but it highlights the corrected word. Useful when there is more than one word."
        }
      }
    }
  }
}