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

# Location by IP

> Returns the shopper's geo-location by IP address, falling back to the merchant's default location when the IP cannot be resolved.

Returns the user’s geo-location by IP address. The merchant’s default location is returned if an IP address cannot be found (for example if a private network IP address has been specified). The merchant-side caching policy defined by this method should be applied to the whole IP range returned for the IP address specified.


## OpenAPI

````yaml api-reference/specs/locationbyip.yaml POST /Browsing/LocationByIP
openapi: 3.0.3
info:
  title: LocationByIp
  version: 1.0.0
  x-scaled-review: true
  description: >-
    Returns the user’s geo-location by IP address. The merchant’s default
    location is returned if an IP address cannot be found (for example if a
    private network IP address has been specified). The merchant-side caching
    policy defined by this method should be applied to the whole IP range
    returned for the IP address specified.
servers:
  - url: https://{globale_api_domain}
    variables:
      globale_api_domain:
        default: globale_api_domain
        description: Global-e API host, supplied to the merchant by Global-e.
security: []
tags:
  - name: LocationByIp
    x-page-title: LocationByIp
  - name: 'Direction: Merchant → Global-e'
  - name: 'Domain: Browsing & Catalog'
paths:
  /Browsing/LocationByIP:
    post:
      tags:
        - LocationByIp
      summary: Return the user’s geo-location by IP address
      description: >-
        Returns the user’s geo-location by IP address. The merchant’s default
        location is returned if an IP address cannot be found (for example if a
        private network IP address has been specified). The merchant-side
        caching policy defined by this method should be applied to the whole IP
        range returned for the IP address specified.
      operationId: locationByIp
      parameters:
        - name: IP
          in: query
          required: false
          schema:
            type: string
          description: The shopper's IP address
      responses:
        '200':
          description: The shopper's geo-location.
          content:
            application/json:
              schema:
                type: object
                properties:
                  City:
                    allOf:
                      - $ref: '#/components/schemas/City'
                    description: The shopper's city.
                  Country:
                    allOf:
                      - $ref: '#/components/schemas/Country'
                    description: The shopper's country.
                  IPRange:
                    allOf:
                      - $ref: '#/components/schemas/IPRange'
                    description: The shopper's IP range.
                  Region:
                    allOf:
                      - $ref: '#/components/schemas/Region'
                    description: The shopper's region.
components:
  schemas:
    City:
      type: object
      title: City
      properties:
        Code:
          type: string
          description: City code (unique in the respective Region)
        Name:
          type: string
          description: City name
    Country:
      type: object
      title: Country
      properties:
        Code:
          type: string
          description: 2-char ISO country code
        DefaultCurrencyCode:
          type: string
          description: 3-char ISO currency code
        DefaultVATRateType:
          allOf:
            - $ref: '#/components/schemas/VATRateType'
          description: Default (most widely used) VAT rate type or class for this country.
        IsOperatedByGlobalE:
          type: boolean
          description: >-
            Flag to be used as a Mode indicator. Countries that are not operated
            by Global‑e can still be available for selection as a shipping
            destination on the Merchant site. However Global‑e functionality is
            disabled for such countries. TRUE - Country is operated by Global-e.
            FALSE - Country is not operated by Global-e.
        IsStateMandatory:
          type: boolean
          description: >-
            Indicates if State or province (region) is mandatory for addresses
            in this country. TRUE - State is mandatory for address. FALSE -
            State is not mandatory for address.
        Name:
          type: string
          description: Country name
        SiteURL:
          type: string
          description: >-
            URL of a country-specific site owned by the Merchant. Used to allow
            redirection to the Merchant’s country-specific domain for a selected
            country.
        SupportsFixedPrices:
          type: boolean
          description: >-
            Indicates if fixed product prices are allowed for this country.
            Product prices may be fixed only in the Default Currency for this
            Country. TRUE - Prices can be fixed. FALSE - Prices cannot be fixed.
        UseCountryVAT:
          type: boolean
          description: >-
            TRUE if VAT rate specific to this shipping country must be applied
            to the product prices. Otherwise, VAT rates defined for the products
            on the Merchant’s site must be used. This setting is used to support
            trade agreements between the countries such as EEA, when the end
            customer must pay VAT for the shipping country in certain cases.
    IPRange:
      type: object
      title: IPRange
      properties:
        From:
          type: number
          description: A decimal value of a range start
        To:
          type: number
          description: A decimal value of a range end
        Type:
          type: string
          description: Either IPV4 or IPV6
    Region:
      type: object
      title: Region
      properties:
        Code:
          type: string
          description: >-
            Region code for this state or province (unique in the respective
            Country)
        CountryCode:
          type: string
          description: 2-char ISO country code to which this region belongs
        Name:
          type: string
          description: Region name
    VATRateType:
      type: object
      title: VATRateType
      properties:
        Name:
          type: string
          description: VAT rate type name
        Rate:
          type: number
          description: VAT rate decimal value
        VATRateTypeCode:
          type: string
          description: >-
            VAT rate type (or class) code on the Merchant’s site (to be mapped
            on the Global-e side)

````