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

# QR codes

> Create QR codes for shoppable Incarts links

Link creation attempts to include a default QR code without making QR availability a prerequisite
for the shoppable link. You may customize its `identifier` and `name` with `defaultQrCode` in the
create-link request. Use `POST /v1/links/{linkId}/qr-codes` when the default QR is absent or when you
need additional QR codes for placements, regions, or channels.

```bash theme={null}
curl --request POST "$INCARTS_API_BASE_URL/v1/links/lnk_01JZ4TDK6A0NV2HG6R3Q7E28Y9/qr-codes" \
  --header "Content-Type: application/json" \
  --header "X-Incarts-API-Key: $INCARTS_API_KEY" \
  --header "Idempotency-Key: qr-create-20260521-001" \
  --data '{
    "identifier": "in-store-display",
    "name": "In-store display",
    "metadata": {
      "placement": "endcap",
      "market": "nyc"
    }
  }'
```

## Naming QR codes

Use a stable `identifier` for your integration or campaign system and a human-friendly `name` for your team.

Identifiers are unique within a link, contain 3–64 letters, numbers, or hyphens, and are returned in
every QR resource. Reusing an identifier for the same link returns `409`.

## QR response URLs

* `imageUrl` is the generated PNG to download, print, or place in creative.
* `encodedUrl` is the tracked `https://in2carts.com/qr/{qrCodeId}` destination embedded in that
  image. It resolves through the Incarts shortener and preserves QR attribution.
* `isDefault` distinguishes the automatically created code from additional codes.

Creating an additional QR code requires `qr-codes:write`, access to the parent link's project, and
an API key belonging to the same organization as the link.

<Tip>
  Add placement details in `metadata` so reporting can distinguish where each code was used.
</Tip>

<Card title="Create QR code endpoint" icon="terminal" href="/api-reference/endpoint/create-qr-code-for-link">
  See request fields, examples, and response codes.
</Card>
