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

# Create a QR code

> Create a QR code for an existing shoppable link



## OpenAPI

````yaml openapi/incarts-public-api.v1.yaml POST /v1/links/{linkId}/qr-codes
openapi: 3.1.0
info:
  title: Incarts API
  version: 1.0.0
  summary: Create shoppable links and QR codes with the Incarts API.
  description: >
    Create shoppable Incarts links and QR codes for retailer, campaign, and
    commerce workflows.
  license:
    name: Proprietary
    identifier: LicenseRef-Proprietary
servers:
  - url: https://incarts-api-qob6vapoca-uc.a.run.app
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Health
    description: Service health checks.
  - name: Links
    description: Link generation and retrieval.
  - name: Retailers
    description: Retailer discovery for link generation.
  - name: QR Codes
    description: QR codes associated with shoppable links.
paths:
  /v1/links/{linkId}/qr-codes:
    post:
      tags:
        - QR Codes
      summary: Create a QR code for a shoppable link
      operationId: createQrCodeForLink
      parameters:
        - $ref: '#/components/parameters/LinkId'
        - $ref: '#/components/parameters/IdempotencyKey'
        - $ref: '#/components/parameters/CorrelationId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateQrCodeRequest'
            examples:
              inStoreDisplay:
                value:
                  identifier: in-store-display
                  name: In-store display
                  metadata:
                    placement: endcap
                    market: nyc
      responses:
        '201':
          description: QR code created.
          headers:
            Location:
              description: Absolute URL for the generated QR image.
              schema:
                type: string
                format: uri
            X-Correlation-ID:
              $ref: '#/components/headers/CorrelationId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QrCodeResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  parameters:
    LinkId:
      name: linkId
      in: path
      required: true
      description: Public Incarts link identifier.
      schema:
        type: string
        minLength: 3
        maxLength: 128
      example: lnk_01JZ4TDK6A0NV2HG6R3Q7E28Y9
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: false
      description: Stable client-generated key used to safely retry write requests.
      schema:
        type: string
        minLength: 8
        maxLength: 128
      example: link-create-20260520-001
    CorrelationId:
      name: X-Correlation-ID
      in: header
      required: false
      description: >-
        Client-supplied request correlation ID. The API echoes this value when
        provided.
      schema:
        type: string
        minLength: 8
        maxLength: 128
      example: req_01JZ4TCZ7AG9P9W38V4VNQ7W4B
  schemas:
    CreateQrCodeRequest:
      type: object
      additionalProperties: false
      required:
        - identifier
        - name
      properties:
        identifier:
          type: string
          pattern: ^[A-Za-z0-9-]{3,64}$
          description: Client-chosen QR code identifier unique within the link.
          example: in-store-display
        name:
          type: string
          minLength: 1
          maxLength: 120
          example: In-store display
        metadata:
          $ref: '#/components/schemas/Metadata'
    QrCodeResponse:
      type: object
      additionalProperties: false
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/QrCodeResource'
    Metadata:
      type: object
      additionalProperties: true
      description: >-
        Caller-supplied metadata stored with the resource. Do not put secrets
        here.
      example:
        campaignId: cmp_123
    QrCodeResource:
      type: object
      additionalProperties: false
      required:
        - id
        - linkId
        - identifier
        - name
        - imageUrl
        - encodedUrl
        - isDefault
        - createdAt
      properties:
        id:
          type: string
          example: qr_lnk_01JZ4TDK6A0NV2HG6R3Q7E28Y9_default
        linkId:
          type: string
          example: lnk_01JZ4TDK6A0NV2HG6R3Q7E28Y9
        identifier:
          type: string
          pattern: ^[A-Za-z0-9-]{3,64}$
          example: default
        name:
          type: string
          example: Default QR code
        imageUrl:
          type: string
          format: uri
          example: >-
            https://firebasestorage.googleapis.com/v0/b/incarts.appspot.com/o/qrcodes%2Fexample.png?alt=media
        encodedUrl:
          type: string
          format: uri
          example: https://in2carts.com/qr/qr_lnk_01JZ4TDK6A0NV2HG6R3Q7E28Y9_default
        isDefault:
          type: boolean
        metadata:
          $ref: '#/components/schemas/Metadata'
        createdAt:
          type: string
          format: date-time
    ErrorResponse:
      type: object
      additionalProperties: false
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/ErrorObject'
    ErrorObject:
      type: object
      additionalProperties: false
      required:
        - code
        - message
        - correlationId
      properties:
        code:
          type: string
          description: Stable machine-readable error code.
          example: validation_failed
        message:
          type: string
          description: Human-readable error summary.
          example: products is required for walmart add_to_cart links.
        correlationId:
          type: string
          example: req_01JZ4TCZ7AG9P9W38V4VNQ7W4B
        details:
          type: array
          items:
            $ref: '#/components/schemas/ErrorDetail'
    ErrorDetail:
      type: object
      additionalProperties: false
      required:
        - field
        - message
      properties:
        field:
          type: string
          example: products
        message:
          type: string
          example: At least one product is required.
  headers:
    CorrelationId:
      description: >-
        Request correlation ID generated by the API or echoed from
        `X-Correlation-ID`.
      schema:
        type: string
      example: req_01JZ4TCZ7AG9P9W38V4VNQ7W4B
  responses:
    BadRequest:
      description: Request body, path, or header is malformed.
      headers:
        X-Correlation-ID:
          $ref: '#/components/headers/CorrelationId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: API key is missing or invalid.
      headers:
        X-Correlation-ID:
          $ref: '#/components/headers/CorrelationId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Forbidden:
      description: >-
        API key is valid but does not have access to the requested project or
        scope.
      headers:
        X-Correlation-ID:
          $ref: '#/components/headers/CorrelationId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: Requested resource does not exist or is not visible to the caller.
      headers:
        X-Correlation-ID:
          $ref: '#/components/headers/CorrelationId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Conflict:
      description: >-
        Idempotency conflict, duplicate identifier, or conflicting resource
        state.
      headers:
        X-Correlation-ID:
          $ref: '#/components/headers/CorrelationId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    UnprocessableEntity:
      description: >-
        Request is syntactically valid but violates business rules or retailer
        capabilities.
      headers:
        X-Correlation-ID:
          $ref: '#/components/headers/CorrelationId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            unsupportedCapability:
              value:
                error:
                  code: unsupported_retailer_intent
                  message: Kroger add-to-cart links are not supported.
                  correlationId: req_01JZ4TCZ7AG9P9W38V4VNQ7W4B
    TooManyRequests:
      description: Rate limit exceeded.
      headers:
        X-Correlation-ID:
          $ref: '#/components/headers/CorrelationId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalServerError:
      description: Unexpected server error.
      headers:
        X-Correlation-ID:
          $ref: '#/components/headers/CorrelationId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Incarts-API-Key

````