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

# Detect market

> Detect the visitor's market and currency/region from their geolocation. Returns a null market and the detected country code when no market could be resolved.



## OpenAPI

````yaml /api-reference/openapi.json get /market
openapi: 3.0.0
info:
  title: Marzipan API
  version: 1.0.0
servers:
  - url: https://api.marzipan.co/v1
security:
  - tenantAuth: []
tags:
  - name: Account
    description: >-
      Account management endpoints including registration, login, and user
      details
  - name: Carts
    description: Shopping cart management endpoints
  - name: Products
    description: Product catalog and search endpoints
  - name: Subscriptions
    description: Subscription management and renewal endpoints
  - name: CMS
    description: Content management system endpoints
  - name: Messaging
    description: Message and communication endpoints
  - name: Search
    description: Search functionality endpoints
  - name: Settings
    description: >-
      Storefront settings and market detection used to configure the web
      components and checkout.
  - name: Analytics
    description: Storefront visit and attribution tracking.
  - name: Rewards
    description: >-
      Loyalty and rewards programme endpoints for the authenticated customer,
      covering points balance, tier status, perks, exclusive products and
      transaction history.
  - name: Forms
    description: Render and submit dynamic storefront forms defined in the CMS.
  - name: Events
    description: >-
      Check event availability, browse occurrences and recurring dates, generate
      ticket QR codes, and manage event waitlists (join, leave, check status,
      and claim promoted spots).
paths:
  /market:
    get:
      tags:
        - Settings
      summary: Detect market
      description: >-
        Detect the visitor's market and currency/region from their geolocation.
        Returns a null market and the detected country code when no market could
        be resolved.
      parameters: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MarketDetection'
              example:
                market:
                  id: 9b1c2d3e-4f5a-6b7c-8d9e-0a1b2c3d4e5f
                  name: United Kingdom
                  currencyCode: GBP
                  currencySymbol: £
                  isPrimary: true
                detectedCountry: GB
components:
  schemas:
    MarketDetection:
      type: object
      properties:
        market:
          allOf:
            - $ref: '#/components/schemas/Market'
          nullable: true
          description: >-
            The detected market, or null when none could be resolved for the
            visitor.
        detectedCountry:
          type: string
          nullable: true
          description: ISO country code detected for the visitor, if any.
    Market:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        currencyCode:
          type: string
        currencySymbol:
          type: string
        isPrimary:
          type: boolean
  securitySchemes:
    tenantAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer authentication header of the form `Bearer <token>`, where
        `<token>` is your API token.
      bearerFormat: JWT

````