Change where a printed code points
Find a code by name, point it somewhere new, and confirm the change, without touching the artwork.
The whole point of a dynamic code: the poster stays on the wall while the destination behind it changes. Three calls.
1. Find the code
List codes filtered by name. q matches part of the name; the response carries the ids you need.
curl "https://api.kuikcode.com/v1/codes?q=front%20window" \
-H "Authorization: Bearer kc_live_..."{
"data": [
{
"id": "K02bEPC2SmtopwPr6S-jt",
"shortCode": "Ab3dE9xYz",
"name": "Front window",
"scanUrl": "https://kuikco.de/p/Ab3dE9xYz",
"destination": { "type": "url", "url": "https://example.com/spring-menu", "pageId": null, "summary": "example.com/spring-menu" },
"folderId": "f_9n2",
"tags": ["signage"],
"archived": false,
"scans": 123
}
],
"next_cursor": null
}Keep the id. shortCode and scanUrl are what is printed and never change.
2. Point it somewhere new
PATCH /codes/{id} with a new destination. Everything else about the code, design, tags, tracking settings, is left as it is.
curl -X PATCH https://api.kuikcode.com/v1/codes/K02bEPC2SmtopwPr6S-jt \
-H "Authorization: Bearer kc_live_..." \
-H "Content-Type: application/json" \
-d '{ "destination": { "type": "url", "url": "https://example.com/summer-menu" } }'To land on a KuikPage instead, send { "type": "page", "pageId": "..." } with an id from GET /pages.
The response is the updated code. Printed copies follow within a minute; the scan handler caches a code's destination for at most sixty seconds.
3. Confirm
curl https://api.kuikcode.com/v1/codes/K02bEPC2SmtopwPr6S-jt \
-H "Authorization: Bearer kc_live_..."destination.url reads the new address. Scans from then on appear under the new destination in GET /codes/{id}/scans and in the dashboard's Top destinations.
Many codes at once
When a campaign ends, repoint every code in it in one call with PATCH /codes/bulk, up to a hundred ids:
curl -X PATCH https://api.kuikcode.com/v1/codes/bulk \
-H "Authorization: Bearer kc_live_..." \
-H "Content-Type: application/json" \
-d '{
"ids": ["K02bEPC2SmtopwPr6S-jt", "Zq9vX1mN4kLp8rTb2cWd0"],
"destination": { "type": "url", "url": "https://example.com/closed-for-season" }
}'The response lists updated and any failed ids with a reason. Ids from another workspace are ignored rather than reported.
Good to know
- A read-only key cannot do step 2; it answers
403 insufficient_scope. - Codes made in the dashboard with other destination kinds (vCard, WiFi, Smart Rules...) come back with their engine name in
destination.type. Switching them tourlorpagethrough the API works; editing the richer kinds stays in the dashboard. - Archived codes are listed with
?archived=true. Set"archived": falsein a PATCH to bring one back.