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

# Get address requirements

> Returns the minimum address field requirements for a given country. Use this to determine which address fields are required, optional, or ignored when submitting addresses for tax calculations and transactions.

<RequestExample>
  ```bash US theme={null}
  curl -X GET "https://transaction-tax.api.in.commenda.io/api/v1/address-requirements?country=US" \
    -H "Authorization: Bearer <token>"
  ```

  ```bash GB theme={null}
  curl -X GET "https://transaction-tax.api.in.commenda.io/api/v1/address-requirements?country=GB" \
    -H "Authorization: Bearer <token>"
  ```

  ```bash DE theme={null}
  curl -X GET "https://transaction-tax.api.in.commenda.io/api/v1/address-requirements?country=DE" \
    -H "Authorization: Bearer <token>"
  ```
</RequestExample>

<ResponseExample>
  ```json US (200) theme={null}
  {
    "data": {
      "country_code": "US",
      "address_line_1": "REQUIRED",
      "address_line_2": "OPTIONAL",
      "address_line_3": "IGNORED",
      "city": "REQUIRED",
      "state": "REQUIRED",
      "postal_code": "REQUIRED",
      "postal_code_regex": "^\\d{5}(-\\d{4})?$",
      "valid_state_codes": [
        "AL", "AK", "AZ", "AR", "CA", "CO", "CT", "DE", "FL", "GA",
        "HI", "ID", "IL", "IN", "IA", "KS", "KY", "LA", "ME", "MD",
        "MA", "MI", "MN", "MS", "MO", "MT", "NE", "NV", "NH", "NJ",
        "NM", "NY", "NC", "ND", "OH", "OK", "OR", "PA", "RI", "SC",
        "SD", "TN", "TX", "UT", "VT", "VA", "WA", "WV", "WI", "WY",
        "DC"
      ]
    },
    "message": "Successfully retrieved address requirements."
  }
  ```

  ```json GB (200) theme={null}
  {
    "data": {
      "country_code": "GB",
      "address_line_1": "REQUIRED",
      "address_line_2": "OPTIONAL",
      "address_line_3": "IGNORED",
      "city": "REQUIRED",
      "state": "OPTIONAL",
      "postal_code": "REQUIRED",
      "postal_code_regex": "^[A-Za-z]{1,2}\\d[A-Za-z\\d]? ?\\d[A-Za-z]{2}$"
    },
    "message": "Successfully retrieved address requirements."
  }
  ```

  ```json DE (200) theme={null}
  {
    "data": {
      "country_code": "DE",
      "address_line_1": "REQUIRED",
      "address_line_2": "OPTIONAL",
      "address_line_3": "IGNORED",
      "city": "REQUIRED",
      "state": "OPTIONAL",
      "postal_code": "REQUIRED",
      "postal_code_regex": "^\\d{5}$"
    },
    "message": "Successfully retrieved address requirements."
  }
  ```

  ```json 400 theme={null}
  {
    "type": "INVALID_REQUEST_BODY",
    "title": "Invalid request body.",
    "detail": {
      "description": "country query parameter is required"
    },
    "status": 400
  }
  ```

  ```json 404 theme={null}
  {
    "type": "RESOURCE_NOT_FOUND",
    "sub_type": "ADDRESS_REQUIREMENTS_NOT_FOUND",
    "title": "Address requirements not found.",
    "detail": {
      "description": "No address requirements found for country: HM"
    },
    "status": 404
  }
  ```
</ResponseExample>


## OpenAPI

````yaml GET /address-requirements
openapi: 3.0.1
info:
  title: Commenda Public APIs
  description: >-
    APIs for Commenda entity management, partner incorporation, indirect tax,
    compliance, and corporate operations.
  license:
    name: NONE
    url: NONE
  version: 1.0.0
servers:
  - url: https://api.prod.commenda.io/api/v1
    description: Commenda platform APIs, including Partner Incorporation and Commenda OS.
  - url: https://transaction-tax.api.in.commenda.io/api/v1
    description: Global Indirect Tax API.
security:
  - bearerAuth: []
paths:
  /address-requirements:
    get:
      summary: Get address requirements for a country
      description: >-
        Returns the minimum address field requirements for a given country. Use
        this to determine which address fields are required, optional, or
        ignored when submitting addresses for tax calculations and transactions.
      operationId: getAddressRequirements
      parameters:
        - name: country
          in: query
          description: A valid 2-letter ISO 3166-1 alpha-2 country code (e.g., US, CA, GB).
          required: true
          schema:
            type: string
            example: US
      responses:
        '200':
          description: Address requirements for the specified country
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/AddressRequirementsResponse'
                  message:
                    type: string
                    example: Successfully retrieved address requirements.
        '400':
          description: Bad request — missing or invalid country parameter
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: No address requirements found for the specified country
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    AddressRequirementsResponse:
      type: object
      properties:
        country_code:
          type: string
          description: The ISO 3166-1 alpha-2 country code.
          example: US
        address_line_1:
          type: string
          enum:
            - REQUIRED
            - OPTIONAL
            - IGNORED
          description: Whether address line 1 is required for this country.
          example: REQUIRED
        address_line_2:
          type: string
          enum:
            - REQUIRED
            - OPTIONAL
            - IGNORED
          description: Whether address line 2 is required for this country.
          example: OPTIONAL
        address_line_3:
          type: string
          enum:
            - REQUIRED
            - OPTIONAL
            - IGNORED
          description: Whether address line 3 is required for this country.
          example: IGNORED
        city:
          type: string
          enum:
            - REQUIRED
            - OPTIONAL
            - IGNORED
          description: Whether the city field is required for this country.
          example: REQUIRED
        state:
          type: string
          enum:
            - REQUIRED
            - OPTIONAL
            - IGNORED
          description: Whether the state or province field is required for this country.
          example: REQUIRED
        postal_code:
          type: string
          enum:
            - REQUIRED
            - OPTIONAL
            - IGNORED
          description: Whether the postal code field is required for this country.
          example: REQUIRED
        postal_code_regex:
          type: string
          nullable: true
          description: >-
            A regex pattern for validating postal codes in this country. Null if
            no specific format is enforced.
          example: ^\d{5}(-\d{4})?$
        valid_state_codes:
          type: array
          nullable: true
          items:
            type: string
          description: >-
            The list of accepted state or province codes for this country. Null
            if no specific codes are enforced.
          example:
            - AL
            - AK
            - AZ
            - AR
            - CA
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              description: 'Specific Error type. Example: CLIENT_INVALID_REQUEST_BODY.'
              example: CLIENT_INVALID_REQUEST_BODY
            doc_url:
              type: string
              description: >-
                A link to the docs with details about this error. Example:
                https://sales-tax-docs.commenda.io/
              example: https://sales-tax-docs.commenda.io/
            title:
              type: string
              description: >-
                A short title describing the error. Example: Missing query
                parameters.
              example: Failed to validate the request body
            detail:
              type: string
              description: >-
                A json string with a description on how to fix the error.
                Example {"description":"Please pass in a valid corporation_id"}
            status:
              type: number
              description: >-
                The status code. It should be the same as the HTTP protocol
                status code. Example: 200
              example: 400
            instance:
              type: string
              description: >-
                The relative path that was hit by the user. Example:
                /api/v1/corporations/1
            Errors:
              type: array
              items:
                type: object
                properties:
                  details:
                    type: string
                    description: More details on how to solve this particular error.
                  pointer:
                    type: string
                    description: >-
                      Relative reference to missing or invalid piece of passed
                      information.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````