---
title: Validate an address with TaxJar service.
slug: amberflo-api/validate-an-address-with-taxjar-service
docTags: 
createdAt: 2024-11-07T15:10:16.979Z
---

{
  "id": "wJwN8XRIHbfx399HmHzCM",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://app.amberflo.io/integration/tax/address/taxjar",
    "servers": [
      {
        "url": "https://app.amberflo.io/integration/tax/address/taxjar"
      }
    ],
    "name": "Validate an address with TaxJar service.",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "optional",
          "name": "body",
          "type": "object",
          "description": "",
          "customType": "com.amberflo.integration.tax.AddressValidationRequest.in",
          "schema": [
            {
              "name": "accountDetail",
              "kind": "required",
              "type": "object",
              "description": "The account credential for accessing the address service.",
              "modelRef": "#/components/schemas/com.amberflo.integration.tax.AccountIntegrationDetail.in",
              "customType": "com.amberflo.integration.tax.AccountIntegrationDetail.in",
              "schema": [
                {
                  "name": "username",
                  "kind": "optional",
                  "type": "string",
                  "description": "User name or account id etc.",
                  "example": ""
                },
                {
                  "name": "password",
                  "kind": "optional",
                  "type": "string",
                  "description": "API key, password, license key (such as Avalara), etc.",
                  "example": ""
                },
                {
                  "name": "companyCode",
                  "kind": "optional",
                  "type": "string",
                  "description": "Company code for the integration if applicable, such as Avalara.",
                  "example": ""
                },
                {
                  "name": "environment",
                  "kind": "optional",
                  "type": "string",
                  "description": "Environment that the account integration detail is used for if applicable. Such as sandbox or production",
                  "example": ""
                }
              ]
            },
            {
              "name": "address",
              "kind": "required",
              "type": "object",
              "description": "The address to be normalized",
              "modelRef": "#/components/schemas/com.amberflo.integration.tax.Address.in",
              "customType": "com.amberflo.integration.tax.Address.in",
              "schema": [
                {
                  "name": "country",
                  "kind": "required",
                  "type": "string",
                  "example": ""
                },
                {
                  "name": "postalCode",
                  "kind": "optional",
                  "type": "string",
                  "example": ""
                },
                {
                  "name": "state",
                  "kind": "optional",
                  "type": "string",
                  "example": ""
                },
                {
                  "name": "city",
                  "kind": "required",
                  "type": "string",
                  "example": ""
                },
                {
                  "name": "line1",
                  "kind": "required",
                  "type": "string",
                  "example": ""
                }
              ]
            }
          ],
          "modelRef": "#/components/schemas/com.amberflo.integration.tax.AddressValidationRequest.in",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "apiKey",
          "name": "X-API-KEY",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ]
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Successful request",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "com.amberflo.integration.tax.AddressValidationResponse.out",
            "schema": [
              {
                "name": "addresses",
                "kind": "optional",
                "type": "array",
                "description": "The normalized addresses.",
                "modelRef": "#/components/schemas/com.amberflo.integration.tax.Address.out",
                "customType": "com.amberflo.integration.tax.Address.out[]",
                "schema": [
                  {
                    "name": "country",
                    "kind": "required",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "name": "postalCode",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "name": "state",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "name": "city",
                    "kind": "required",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "name": "line1",
                    "kind": "required",
                    "type": "string",
                    "example": ""
                  }
                ]
              },
              {
                "name": "message",
                "kind": "optional",
                "type": "object",
                "description": "Message for failed address validation",
                "modelRef": "#/components/schemas/com.amberflo.service.common.log_message.LogMessage.out",
                "customType": "com.amberflo.service.common.log_message.LogMessage.out",
                "schema": [
                  {
                    "name": "level",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "modelRef": "#/components/schemas/com.amberflo.service.common.log_message.MessageLevel.out",
                    "customType": "com.amberflo.service.common.log_message.MessageLevel.out",
                    "schema": []
                  },
                  {
                    "name": "code",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "modelRef": "#/components/schemas/com.amberflo.service.common.log_message.MessageCode.out",
                    "customType": "com.amberflo.service.common.log_message.MessageCode.out",
                    "schema": []
                  },
                  {
                    "name": "message",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/com.amberflo.integration.tax.AddressValidationResponse.out",
            "isExpanded": true
          }
        ]
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "633F3q-LJwHYJe5IuLeTP",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://app.amberflo.io/integration/tax/address/taxjar \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"accountDetail\": {},\n     \"address\": {\n     \"country\": \"\",\n     \"city\": \"\",\n     \"line1\": \"\"\n     }\n     }'"
        },
        {
          "id": "KOCzJji6o-9Y8lFPbsCV3",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"accountDetail\": {},\n   \"address\": {\n      \"country\": \"\",\n      \"city\": \"\",\n      \"line1\": \"\"\n   }\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://app.amberflo.io/integration/tax/address/taxjar\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "mKExMuwJAfz9Ad535GeS4",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://app.amberflo.io/integration/tax/address/taxjar\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"accountDetail\": {},\n   \"address\": {\n      \"country\": \"\",\n      \"city\": \"\",\n      \"line1\": \"\"\n   }\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "omThVd2x3GRDY8OUpF7fk",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://app.amberflo.io/integration/tax/address/taxjar\"\n\npayload = json.dumps({\n   \"accountDetail\": {},\n   \"address\": {\n      \"country\": \"\",\n      \"city\": \"\",\n      \"line1\": \"\"\n   }\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "633F3q-LJwHYJe5IuLeTP"
    },
    "results": {
      "languages": [
        {
          "id": "ESwcE7deM1LTNxWtY2Gi4",
          "language": "200",
          "code": "// Successful request\n{\n  \"addresses\": [\n    {\n      \"country\": \"\",\n      \"postalCode\": \"\",\n      \"state\": \"\",\n      \"city\": \"\",\n      \"line1\": \"\"\n    }\n  ],\n  \"message\": {\n    \"level\": \"\",\n    \"code\": \"\",\n    \"message\": \"\"\n  }\n}"
        }
      ],
      "selectedLanguageId": "ESwcE7deM1LTNxWtY2Gi4"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}