# Embedded geocode request

Source: https://developer.avalara.com/products/communications/integration-guides/communications-integration/ytp8176834935987/

Guide: Communications

# Embedded geocode request

Learn how to geocode addresses and latitude/longitude coordinates during an AFC calculation request.

AFC allows you to geocode address and latitude/longitude coordinates during a calculation request. This is done by setting `geo` to `true` in a location model.

**View example**:

```
"inv": [
    {
        "bill": {
            "ctry": "USA",
            "geo": true,
            "addr": "11 West 53 Street",
            "city": "Manhattan",
            "st": "NY",
            "zip": "10019"
        }
    },
    ...
] 
```

Keep the following in mind when geocoding an address during an AFC calculation request.

-   The geocoding is slower, but provides a more accurate jurisdiction.

-   If the geocoding process fails the following fallback options are applied:

    -   If a PCode has been provided, the PCode is used.

    -   If a PCode isn't provided, a fallback location lookup occurs on the Country/State/County/City/Zip provided.

    -   If the fallback lookup fails, the transaction fails and an error is generated. If the transaction is part of an invoice, the invoice also fails.

-   PO Box addresses aren’t valid when using geocoding.