smart-links

Get a code's smart rules

Returns the code's current conditional redirect rules; an empty array means the code always uses its primary destination.

get/api/v1/codes/{id}/smart-rules

Request

  • Base URL: https://app.qrtap.kg
  • URL: https://app.qrtap.kg/api/v1/codes/{id}/smart-rules
  • Auth: HTTP bearer

Path parameters

idstring uuid required

Code id (UUID) as returned at creation.

Response

Current rule set.

code_idstring uuid required
version1 required

Rule-set schema version (currently always 1).

Example response

{
  "code_id": "b6a4a1de-46a5-4f0e-a2af-3f5d6a2e9b10",
  "version": 1,
  "rules": [
    {
      "if": {
        "kind": "device",
        "in": [
          "ios"
        ]
      },
      "to": "https://apps.apple.com/app/id1"
    },
    {
      "if": {
        "kind": "device",
        "in": [
          "android"
        ]
      },
      "to": "https://play.google.com/store/apps/details?id=kg.qrtap"
    },
    {
      "if": {
        "kind": "hours",
        "tz": "Asia/Bishkek",
        "from": "22:00",
        "to": "09:00",
        "days": [
          1,
          2,
          3,
          4,
          5
        ]
      },
      "to": "https://example.com/night-menu"
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.