> ## 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.

# Get a shoppable link

> Retrieve an existing shoppable link by ID



## OpenAPI

````yaml openapi/incarts-public-api.v1.yaml GET /v1/links/{linkId}
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}:
    get:
      tags:
        - Links
      summary: Get a shoppable link
      operationId: getLink
      parameters:
        - $ref: '#/components/parameters/LinkId'
        - $ref: '#/components/parameters/CorrelationId'
      responses:
        '200':
          description: Link found.
          headers:
            X-Correlation-ID:
              $ref: '#/components/headers/CorrelationId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LinkResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '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
    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
  headers:
    CorrelationId:
      description: >-
        Request correlation ID generated by the API or echoed from
        `X-Correlation-ID`.
      schema:
        type: string
      example: req_01JZ4TCZ7AG9P9W38V4VNQ7W4B
  schemas:
    LinkResponse:
      type: object
      additionalProperties: false
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/LinkResource'
    LinkResource:
      type: object
      additionalProperties: false
      required:
        - id
        - projectId
        - name
        - retailer
        - intent
        - status
        - shortLink
        - shortId
        - createdAt
      properties:
        id:
          type: string
          description: Stable identifier for the shoppable link.
          example: lnk_01JZ4TDK6A0NV2HG6R3Q7E28Y9
        projectId:
          type: string
          example: proj_123
        name:
          type: string
          example: Summer grilling basket
        publicName:
          type: string
          example: Shop the grilling list
        retailer:
          $ref: '#/components/schemas/Retailer'
        intent:
          $ref: '#/components/schemas/LinkIntent'
        status:
          type: string
          enum:
            - active
            - inactive
        shortLink:
          type: string
          format: uri
          example: https://in2carts.com/abc123
        shortId:
          type: string
          example: abc123
        urlType:
          type: string
          enum:
            - cart
            - pdp
            - long_link
            - custom
            - instacart_list
            - instacart_recipe
          description: Kind of destination the short link points to.
        products:
          type: array
          items:
            $ref: '#/components/schemas/ProductSelection'
        qrCode:
          $ref: '#/components/schemas/QrCodeResource'
          description: Present when best-effort default QR generation succeeds.
        metadata:
          $ref: '#/components/schemas/Metadata'
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    ErrorResponse:
      type: object
      additionalProperties: false
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/ErrorObject'
    Retailer:
      type: string
      enum:
        - amazon
        - kroger
        - walmart
        - target
        - instacart
        - custom
    LinkIntent:
      type: string
      enum:
        - add_to_cart
        - product_detail
        - shopping_list
        - recipe
        - custom_url
    ProductSelection:
      type: object
      additionalProperties: false
      required:
        - retailerProductId
      properties:
        retailerProductId:
          type: string
          minLength: 1
          maxLength: 128
          description: >-
            Retailer-native product identifier, such as an Amazon ASIN, Kroger
            product ID, Walmart item ID, Target TCIN, or numeric Instacart
            product ID.
          example: '123456789'
        quantity:
          type: integer
          minimum: 1
          maximum: 999
          default: 1
        backupProductIds:
          type: array
          maxItems: 25
          description: >-
            Ordered backup product IDs to try when the primary product is
            unavailable.
          items:
            type: string
            minLength: 1
            maxLength: 128
          example:
            - '987654321'
            - '555555555'
    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
    Metadata:
      type: object
      additionalProperties: true
      description: >-
        Caller-supplied metadata stored with the resource. Do not put secrets
        here.
      example:
        campaignId: cmp_123
    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.
  responses:
    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'
    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

````