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

# Look up location details by IDs

> Get location details for specific location IDs with caching.

This endpoint performs reverse lookup - converts location IDs to human-readable names.
Returns full location details including name, canonical name, type, and country code.
Results are cached for 30 days unless force_refresh is True.



## OpenAPI

````yaml https://dev-api.cattix.com/openapi.json post /api/v1/google-ads/locations/lookup
openapi: 3.1.0
info:
  title: CATTIX API
  description: CATTIX Backend API
  version: 0.107.0
servers:
  - url: http://localhost:8000
    description: Local
  - url: https://dev-api.cattix.com
    description: Development
  - url: https://staging-api.cattix.com
    description: Staging
  - url: https://api.cattix.com
    description: Production
security: []
paths:
  /api/v1/google-ads/locations/lookup:
    post:
      tags:
        - Google Ads - Locations & Languages
      summary: Look up location details by IDs
      description: >-
        Get location details for specific location IDs with caching.


        This endpoint performs reverse lookup - converts location IDs to
        human-readable names.

        Returns full location details including name, canonical name, type, and
        country code.

        Results are cached for 30 days unless force_refresh is True.
      operationId: lookup_locations_api_v1_google_ads_locations_lookup_post
      parameters:
        - name: token_id
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            description: Optional specific Token ID
            title: Token Id
          description: Optional specific Token ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LocationLookupRequestSchema'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/LocationSuggestionSchema'
                title: >-
                  Response Lookup Locations Api V1 Google Ads Locations Lookup
                  Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
components:
  schemas:
    LocationLookupRequestSchema:
      properties:
        google_ads_customer_id:
          type: integer
          title: Google Ads Customer Id
          description: Google Ads customer ID
        location_ids:
          items:
            type: integer
          type: array
          maxItems: 100
          minItems: 1
          title: Location Ids
          description: List of location IDs to look up
        force_refresh:
          type: boolean
          title: Force Refresh
          description: Force refresh from API, bypass cache
          default: false
      type: object
      required:
        - google_ads_customer_id
        - location_ids
      title: LocationLookupRequestSchema
      description: Request schema for location lookup by IDs.
    LocationSuggestionSchema:
      properties:
        id:
          type: integer
          title: Id
          description: Location ID from GeoTargetConstant
        name:
          type: string
          title: Name
          description: Location name
        canonical_name:
          type: string
          title: Canonical Name
          description: Full canonical name (e.g., 'New York, NY, United States')
        type:
          type: string
          title: Type
          description: Location type (City, State, Country, Province)
        country_code:
          type: string
          title: Country Code
          description: Country code
      type: object
      required:
        - id
        - name
        - canonical_name
        - type
        - country_code
      title: LocationSuggestionSchema
      description: Schema for a single location suggestion.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: api/v1/users/authorization/token

````