> ## Documentation Index
> Fetch the complete documentation index at: https://docs.corsair.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# API

> API reference for Google Address Validation: every `googleaddressvalidation.api.*` operation with input and output types.

Every `googleaddressvalidation.api.*` operation is listed below with parameter shapes and return types from the plugin Zod schemas.

<Info>
  **New to Corsair?** See [API access](/concepts/api), [authentication](/concepts/auth), and [error handling](/concepts/error-handling).
</Info>

## Address

### provideFeedback

`address.provideFeedback`

Report the outcome of a previous address validation sequence back to Google

**Risk:** `write`

```ts theme={null}
await corsair.googleaddressvalidation.api.address.provideFeedback({});
```

**Input**

| Name         | Type                                                                                | Required | Description |
| ------------ | ----------------------------------------------------------------------------------- | -------- | ----------- |
| `conclusion` | `VALIDATED_VERSION_USED \| USER_VERSION_USED \| UNVALIDATED_VERSION_USED \| UNUSED` | Yes      | —           |
| `responseId` | `string`                                                                            | Yes      | —           |

**Output:** *empty object*

***

### validate

`address.validate`

Validate a postal address and get standardized results

**Risk:** `read`

```ts theme={null}
await corsair.googleaddressvalidation.api.address.validate({});
```

**Input**

| Name                 | Type      | Required | Description |
| -------------------- | --------- | -------- | ----------- |
| `address`            | `object`  | Yes      | —           |
| `previousResponseId` | `string`  | No       | —           |
| `enableUspsCass`     | `boolean` | No       | —           |
| `languageOptions`    | `object`  | No       | —           |
| `sessionToken`       | `string`  | No       | —           |

<AccordionGroup>
  <Accordion title="address full type">
    ```ts theme={null}
    {
      revision?: 0,
      regionCode?: string,
      languageCode?: string,
      postalCode?: string,
      sortingCode?: string,
      administrativeArea?: string,
      locality?: string,
      sublocality?: string,
      addressLines: string[],
      recipients?: string[],
      organization?: string
    }
    ```
  </Accordion>

  <Accordion title="languageOptions full type">
    ```ts theme={null}
    {
      returnEnglishLatinAddress?: boolean
    }
    ```
  </Accordion>
</AccordionGroup>

**Output**

| Name         | Type     | Required | Description |
| ------------ | -------- | -------- | ----------- |
| `result`     | `object` | Yes      | —           |
| `responseId` | `string` | Yes      | —           |

<AccordionGroup>
  <Accordion title="result full type">
    ```ts theme={null}
    {
      verdict?: {
        inputGranularity?: GRANULARITY_UNSPECIFIED | SUB_PREMISE | PREMISE | PREMISE_PROXIMITY | BLOCK | ROUTE | OTHER,
        validationGranularity?: GRANULARITY_UNSPECIFIED | SUB_PREMISE | PREMISE | PREMISE_PROXIMITY | BLOCK | ROUTE | OTHER,
        geocodeGranularity?: GRANULARITY_UNSPECIFIED | SUB_PREMISE | PREMISE | PREMISE_PROXIMITY | BLOCK | ROUTE | OTHER,
        addressComplete?: boolean,
        hasUnconfirmedComponents?: boolean,
        hasInferredComponents?: boolean,
        hasReplacedComponents?: boolean,
        hasSpellCorrectedComponents?: boolean,
        possibleNextAction?: POSSIBLE_NEXT_ACTION_UNSPECIFIED | FIX | CONFIRM_ADD_SUBPREMISES | CONFIRM | ACCEPT
      },
      address?: {
        formattedAddress?: string,
        postalAddress?: {
          revision?: 0,
          regionCode?: string,
          languageCode?: string,
          postalCode?: string,
          sortingCode?: string,
          administrativeArea?: string,
          locality?: string,
          sublocality?: string,
          addressLines?: string[],
          recipients?: string[],
          organization?: string
        },
        addressComponents?: {
          componentName?: {
            text?: string,
            languageCode?: string
          },
          componentType?: string,
          confirmationLevel?: CONFIRMATION_LEVEL_UNSPECIFIED | CONFIRMED | UNCONFIRMED_BUT_PLAUSIBLE | UNCONFIRMED_AND_SUSPICIOUS,
          inferred?: boolean,
          spellCorrected?: boolean,
          replaced?: boolean,
          unexpected?: boolean
        }[],
        missingComponentTypes?: string[],
        unconfirmedComponentTypes?: string[],
        unresolvedTokens?: string[]
      },
      geocode?: {
        location?: {
          latitude?: number,
          longitude?: number
        },
        plusCode?: {
          globalCode?: string,
          compoundCode?: string
        },
        bounds?: {
          low?: {
            latitude?: number,
            longitude?: number
          },
          high?: {
            latitude?: number,
            longitude?: number
          }
        },
        featureSizeMeters?: number,
        placeId?: string,
        placeTypes?: string[]
      },
      metadata?: {
        business?: boolean,
        poBox?: boolean,
        residential?: boolean
      },
      uspsData?: {
        standardizedAddress?: {
          firstAddressLine?: string,
          firm?: string,
          secondAddressLine?: string,
          urbanization?: string,
          cityStateZipAddressLine?: string,
          city?: string,
          state?: string,
          zipCode?: string,
          zipCodeExtension?: string
        },
        deliveryPointCode?: string,
        deliveryPointCheckDigit?: string,
        dpvConfirmation?: string,
        dpvFootnote?: string,
        dpvCmra?: string,
        dpvVacant?: string,
        dpvNoStat?: string,
        dpvNoStatReasonCode?: number,
        dpvDrop?: string,
        dpvThrowback?: string,
        dpvNonDeliveryDays?: string,
        dpvNonDeliveryDaysValues?: number,
        dpvNoSecureLocation?: string,
        dpvPbsa?: string,
        dpvDoorNotAccessible?: string,
        dpvEnhancedDeliveryCode?: string,
        carrierRoute?: string,
        carrierRouteIndicator?: string,
        ewsNoMatch?: boolean,
        postOfficeCity?: string,
        postOfficeState?: string,
        abbreviatedCity?: string,
        fipsCountyCode?: string,
        county?: string,
        elotNumber?: string,
        elotFlag?: string,
        lacsLinkReturnCode?: string,
        lacsLinkIndicator?: string,
        poBoxOnlyPostalCode?: boolean,
        suitelinkFootnote?: string,
        pmbDesignator?: string,
        pmbNumber?: string,
        addressRecordType?: string,
        defaultAddress?: boolean,
        errorMessage?: string,
        cassProcessed?: boolean
      },
      englishLatinAddress?: {
        formattedAddress?: string,
        postalAddress?: {
          revision?: 0,
          regionCode?: string,
          languageCode?: string,
          postalCode?: string,
          sortingCode?: string,
          administrativeArea?: string,
          locality?: string,
          sublocality?: string,
          addressLines?: string[],
          recipients?: string[],
          organization?: string
        },
        addressComponents?: {
          componentName?: {
            text?: string,
            languageCode?: string
          },
          componentType?: string,
          confirmationLevel?: CONFIRMATION_LEVEL_UNSPECIFIED | CONFIRMED | UNCONFIRMED_BUT_PLAUSIBLE | UNCONFIRMED_AND_SUSPICIOUS,
          inferred?: boolean,
          spellCorrected?: boolean,
          replaced?: boolean,
          unexpected?: boolean
        }[],
        missingComponentTypes?: string[],
        unconfirmedComponentTypes?: string[],
        unresolvedTokens?: string[]
      }
    }
    ```
  </Accordion>
</AccordionGroup>

***
