Address Analyzer

Examples

    • Example 1 – Address with a correction suggestion
    • Example 2 – Address without a correction suggestion

    Example 1 – Address with a correction suggestion

    In this example, the address is sent in the label format, with an abbreviated street type, the ZIP code with a hyphen and the city without accents.

    Request

    {
      "label": "av paulista 1578 museu,,bela vista,01310-200,sao paulo,SP"
    }

    Response

    The response brings the suggested official spelling for the street, district and city, with the number and complement split. The returned status is CORRECTED.

    {
      "road": "Avenida Paulista",
      "number": "1578",
      "complement": "museu",
      "district": "Bela Vista",
      "zipcode": "01310200",
      "city": "São Paulo",
      "state": "SP",
      "status": "CORRECTED",
      "matchScore": 100.0,
      "label": "Avenida Paulista, 1578, Bela Vista, 01310200, São Paulo, SP"
    }

    Example 2 – Address without a correction suggestion

    In this example, the address is sent in the structured format and the street does not match the ZIP code provided.

    Request

    {
      "road": "rua das acacias 45",
      "number": "",
      "zipcode": "01310200",
      "district": "bela vista",
      "city": "São Paulo",
      "state": "SP"
    }

    Response

    The number was split from the street, but there is no correction suggestion. The returned status is NORMALIZED.

    {
      "road": "rua das acacias",
      "number": "45",
      "complement": "",
      "district": "bela vista",
      "zipcode": "01310200",
      "city": "São Paulo",
      "state": "SP",
      "status": "NORMALIZED",
      "matchScore": 18.75,
      "label": "rua das acacias, 45, bela vista, 01310200, São Paulo, SP"
    }