qrtap_set_smart_rules
Replace a QR code's Smart Links rules to route scans by device, language, or time window; unmatched scans fall back to the primary destination.
Instructions
REPLACE the Smart Links rules of one code — conditional redirects evaluated on every scan, first match wins, falling back to the code's primary destination when nothing matches. Typical uses: send iOS and Android scans to their own app stores, serve a Russian and a Kyrgyz page, or point at the delivery menu outside opening hours. The array you pass becomes the complete rule set, so read the current one with qrtap_get_smart_rules first; passing [] clears all rules. At most 5 rules.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rules | Yes | The complete new rule set, max 5, evaluated top to bottom. Each rule is {"if": <condition>, "to": "<http/https url>"}. Pass [] to remove every rule. | |
| codeId | Yes | The code id (UUID), as returned by qrtap_create_code, qrtap_create_codes_bulk or qrtap_list_codes. This is the internal id, not the short_url slug. |