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

# Pair POS device

> This endpoint allows a POS device to be activated by submitting a valid pairing code received via phone or email. The endpoint requires authentication with an API key that has the scope set to 'storefront' for a particular store, ensuring secure access for device activation operation.



## OpenAPI

````yaml post /pos/auth/pair-device
openapi: 3.1.0
info:
  version: '1.0'
  title: CE Storefront APIs
  summary: Customer-facing e-commerce API for building exceptional shopping experiences
  description: >-
    Public-facing API for Commerce Engine storefronts, enabling seamless
    shopping experiences with product browsing, cart management, checkout
    processing, user accounts, and order tracking. Perfect for building web,
    mobile, and headless commerce applications.
  contact:
    name: Support
    email: support@commercengine.io
    url: https://www.commercengine.io/contact-us
  license:
    url: https://www.commercengine.io/contact-us
    name: All Rights Reserved
servers:
  - url: https://staging.api.commercengine.io/api/v1/{store_id}/storefront
    description: Staging Server
    variables:
      store_id:
        description: Store ID
        default: store_id
    x-speakeasy-server-id: staging
  - url: https://prod.api.commercengine.io/api/v1/{store_id}/storefront
    description: Prod Server
    variables:
      store_id:
        description: Store ID
        default: store_id
    x-speakeasy-server-id: prod
security: []
tags:
  - name: Analytics
    description: Analytics
  - name: Auth
    description: auth
  - name: Campaigns
    description: Campaigns
  - name: Carts
    description: Carts
  - name: Catalog
    description: Catalog
  - name: Common
    description: Common
  - name: Coupons & promotions
    description: Coupons & promotions
  - name: Customers
    description: Customers
  - name: Juspay
    description: Juspay Payments
  - name: KYC
    description: KYC
  - name: Marketplace
    description: Marketplace
  - name: Orders
    description: Orders
  - name: Others
    description: Others
  - name: Payments
    description: Payments
  - name: PayU
    description: PayU Payments
  - name: POS
    description: POS
  - name: Shipping
    description: Shipping
  - name: Store
    description: Store
  - name: Subscriptions
    description: Subscriptions
externalDocs:
  url: https://llm-docs.commercengine.io
  description: Commerce Engine API Reference Documentation
paths:
  /pos/auth/pair-device:
    post:
      tags:
        - POS
      summary: Pair POS device
      description: >-
        This endpoint allows a POS device to be activated by submitting a valid
        pairing code received via phone or email. The endpoint requires
        authentication with an API key that has the scope set to 'storefront'
        for a particular store, ensuring secure access for device activation
        operation.
      operationId: pair-pos-device
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - pairing_code
              properties:
                pairing_code:
                  type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                  - message
                  - success
                  - content
                properties:
                  message:
                    type: string
                  success:
                    type: boolean
                  content:
                    properties:
                      device:
                        $ref: '#/components/schemas/PosDevice'
                    required:
                      - device
                    type: object
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
      security:
        - X-Api-Key: []
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/storefront/operations/pair-pos-device
        description: API reference for the pair-pos-device operation
components:
  schemas:
    PosDevice:
      title: PosDevice
      type: object
      externalDocs:
        url: https://llm-docs.commercengine.io/storefront/schemas/PosDevice
        description: API reference for the PosDevice schema
      required:
        - id
        - name
        - device_type
        - external_device_id
        - vendor
        - model_number
        - mac_address
        - location_id
        - location_name
        - claimed_by
        - status
        - is_busy
      properties:
        id:
          type: string
          readOnly: true
        name:
          type: string
        device_type:
          type: string
          enum:
            - pos-terminal
        external_device_id:
          description: A Device ID shared by POS device provider.
          type: string
          readOnly: true
        vendor:
          type: string
        model_number:
          type: string
        mac_address:
          type:
            - string
            - 'null'
        location_id:
          type: string
        location_name:
          type: string
          readOnly: true
        claimed_by:
          description: >-
            Returns a user object if the device is claimed, otherwise returns
            null.
          oneOf:
            - $ref: '#/components/schemas/PosDeviceClaimedUser'
            - type: 'null'
        status:
          type: string
          enum:
            - available
            - claimed
            - offline
          readOnly: true
        is_busy:
          type: boolean
          readOnly: true
    PosDeviceClaimedUser:
      title: PosDeviceClaimedUser
      type: object
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/storefront/schemas/PosDeviceClaimedUser
        description: API reference for the PosDeviceClaimedUser schema
      required:
        - id
        - first_name
        - last_name
        - phone
        - email
      properties:
        id:
          type: string
          readOnly: true
        first_name:
          type: string
        last_name:
          type:
            - string
            - 'null'
        phone:
          type: string
        email:
          type: string
          format: email
  responses:
    BadRequest:
      description: Bad request
      content:
        application/json:
          schema:
            type: object
            required:
              - message
              - success
              - code
            properties:
              message:
                type: string
                x-speakeasy-error-message: true
              success:
                type: boolean
              code:
                type: string
              error:
                type: object
    Unauthorized:
      description: Not authorized for given operation on the Resource
      content:
        application/json:
          schema:
            type: object
            required:
              - message
              - success
              - code
            properties:
              message:
                type: string
                examples:
                  - Not authorized for given operation on the Resource.
                x-speakeasy-error-message: true
              success:
                type: boolean
                default: false
              code:
                type: string
                examples:
                  - unauthorized
  securitySchemes:
    X-Api-Key:
      type: apiKey
      description: API key for your store
      name: X-Api-Key
      in: header

````