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

# Validatemerchantsession

> ### Validate Merchant Session

Check if a merchant session token is still valid.



## OpenAPI

````yaml https://api.loyalty.dog/openapi.json post /v2/giftcards/merchants/session/validate
openapi: 3.1.0
info:
  title: LoyaltyDog
  description: >-

    Welcome to the LoyaltyDog API! This API provides access to our loyalty
    program features, allowing you to integrate with various platforms and
    manage your loyalty data.


    Want to query LoyaltyDog via an AI assistant (Claude, Cursor, Windsurf)? See
    the [MCP Integration guide](https://loyaltydog.ai/playground#mcp).
        
  termsOfService: https://loyalty.dog/loyalty-program-terms-service
  contact:
    name: LoyaltyDog Support
    url: https://loyalty.dog/contact-us
    email: support@loyalty.dog
  version: 1.0.1
servers:
  - url: https://api.loyalty.dog
    description: Production
security:
  - bearerAuth: []
paths:
  /v2/giftcards/merchants/session/validate:
    post:
      tags:
        - Gift Card Merchants
      summary: Validatemerchantsession
      description: |-
        ### Validate Merchant Session

        Check if a merchant session token is still valid.
      operationId: validateMerchantSession_v2_giftcards_merchants_session_validate_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ValidateMerchantSessionRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidateMerchantSessionResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ValidateMerchantSessionRequest:
      properties:
        sessionToken:
          type: string
          title: Sessiontoken
      type: object
      required:
        - sessionToken
      title: ValidateMerchantSessionRequest
    ValidateMerchantSessionResponse:
      properties:
        valid:
          type: boolean
          title: Valid
        merchant:
          anyOf:
            - $ref: '#/components/schemas/MerchantSessionResponse'
            - type: 'null'
      type: object
      required:
        - valid
      title: ValidateMerchantSessionResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    MerchantSessionResponse:
      properties:
        id:
          type: string
          title: Id
        merchantId:
          anyOf:
            - $ref: '#/components/schemas/PydanticObjectId'
            - type: 'null'
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        platform:
          type: string
          title: Platform
        programId:
          anyOf:
            - type: string
            - type: 'null'
          title: Programid
        active:
          type: boolean
          title: Active
        locationId:
          anyOf:
            - type: string
            - type: 'null'
          title: Locationid
        locationName:
          anyOf:
            - type: string
            - type: 'null'
          title: Locationname
        locations:
          items:
            $ref: '#/components/schemas/MerchantLocationResponse'
          type: array
          title: Locations
        cashierId:
          anyOf:
            - type: string
            - type: 'null'
          title: Cashierid
        terminalId:
          anyOf:
            - type: string
            - type: 'null'
          title: Terminalid
        role:
          anyOf:
            - type: string
            - type: 'null'
          title: Role
        sessionToken:
          anyOf:
            - type: string
            - type: 'null'
          title: Sessiontoken
      type: object
      required:
        - id
        - merchantId
        - name
        - platform
        - programId
        - active
        - locationId
        - locationName
        - locations
      title: MerchantSessionResponse
      description: |-
        Returned after a successful merchant session init or validation.

        Contains everything needed to populate the eposn-giftcards session
        without an additional core_api round-trip.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    PydanticObjectId:
      type: string
      maxLength: 24
      minLength: 24
      pattern: ^[0-9a-f]{24}$
      example: 5eb7cf5a86d9755df3a6c593
    MerchantLocationResponse:
      properties:
        locationId:
          type: string
          title: Locationid
        locationName:
          anyOf:
            - type: string
            - type: 'null'
          title: Locationname
        lastSeenAt:
          anyOf:
            - type: string
            - type: 'null'
          title: Lastseenat
        programId:
          anyOf:
            - type: string
            - type: 'null'
          title: Programid
      type: object
      required:
        - locationId
        - locationName
        - lastSeenAt
        - programId
      title: MerchantLocationResponse
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT access token obtained from POST /v2/token.

````