Create QR template

Overview

Create a QR code template for the authenticated account. Template names must be unique within the store. Enforces the store's review_qr_code plan allocation before saving — a hard-stop / disabled feature raises FeatureLimitException (HTTP 402) via the global handler. The endpoint records on success the usage. Writes a QR_CODE_TEMPLATE_CREATED audit event.

Prerequisites

  • A bearer token in the Authorization header.

Base URL

EnvironmentURL
Productionhttps://production-api.shoutaboutus.com
Developmenthttps://development-api.shoutaboutus.com

Endpoint

POST /api/v1/qr-codes/template/create

Authentication

  • Requires a bearer token in the Authorization: Bearer <bearer-token> header.

  • Bearer — account (account) role. store_id validated by an ownership check; the template records the caller's company_id.

Rate limit

  • No rate limit.

Request body

FieldTypeRequiredDescription
namestringRequiredMax 255. Unique per store_id (soft-deleted rows excluded).
store_idintegerRequiredMust be an existing location + must belong to the auth company.
template_typestringRequiredstandard, hangtag or custom.
design_htmlstringOptionalFront design markup.
design_settingsobjectOptionalFront design settings (JSON; string is decoded).
design_html_backstringOptionalBack design markup.
design_settings_backobjectOptionalBack design settings (JSON; string is decoded).
qr_code_idintegerOptionalMust be an existing QR code — link the template to an existing QR code.
{
  "name": "Standard A6 Template",
  "store_id": 123,
  "template_type": "standard"
}

How it works

  • 201 (createdResponse). Body is double-nested: { "data": { "data": {.QrCodeTemplate }, "message": "QR code template created successfully" } }. The model appends unique_code.
  • 402 QR-template feature hard-stop / disabled (FeatureLimitException) · 422 validation.

Response

201 Created · 201

{
  "data": {
    "data": {
      "id": 11,
      "store_id": 26,
      "company_id": 456,
      "name": "Standard A6 Template",
      "qr_code_id": 123,
      "template_type": "standard",
      "design_settings": null,
      "design_html": "<div class=\"qr-card\">Scan to review</div>",
      "design_settings_back": null,
      "design_html_back": null,
      "created_at": "2026-07-09T10:00:00.000000Z",
      "updated_at": "2026-07-09T10:00:00.000000Z",
      "unique_code": "e5F6g7h8"
    },
    "message": "QR code template created successfully"
  }
}

402 Payment Required · 402

{
  "status": "error",
  "message": "Review QR Code limit reached for this period.",
  "feature": "review_qr_code",
  "remaining": 0,
  "hard_stop": true
}

422 Unprocessable Entity · 422

{
  "message": "Template name already exists.",
  "errors": {
    "name": [
      "Template name already exists."
    ]
  }
}

Errors

StatusMeaning
401The bearer token is missing, expired or invalid
402Payment Required
422Unprocessable Entity
500Unexpected server error

Example request

curl --request POST \
  --url "https://production-api.shoutaboutus.com/api/v1/qr-codes/template/create" \
  --header 'Authorization: Bearer <bearer-token>' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"name": "Standard A6 Template", "store_id": 123, "template_type": "standard"}'

Did this page help you?