curl -X POST "https://api.scanova.io/qr-assets/design-template/" \
-H "Authorization: 401f7ac837da42b97f613d789819ff93537bee6a" \
-H "Content-Type: application/json" \
-d '{
"name": "Blue Gradient",
"resource_type": "qr_category",
"category": 3,
"design_info": { "bg": "#0033ff" },
"gradient_type": "linear",
"is_template": true
}'
{
"id": 9,
"name": "Blue Gradient",
"resource_type": "qr_category",
"category": 3,
"design_info": { "bg": "#0033ff" },
"gradient_type": "linear",
"color_palette": null,
"font_styles": null,
"is_template": true,
"info": null,
"template_id": null
}
QR Assets
Create a user design template
POST /qr-assets/design-template/
POST
/
qr-assets
/
design-template
/
curl -X POST "https://api.scanova.io/qr-assets/design-template/" \
-H "Authorization: 401f7ac837da42b97f613d789819ff93537bee6a" \
-H "Content-Type: application/json" \
-d '{
"name": "Blue Gradient",
"resource_type": "qr_category",
"category": 3,
"design_info": { "bg": "#0033ff" },
"gradient_type": "linear",
"is_template": true
}'
{
"id": 9,
"name": "Blue Gradient",
"resource_type": "qr_category",
"category": 3,
"design_info": { "bg": "#0033ff" },
"gradient_type": "linear",
"color_palette": null,
"font_styles": null,
"is_template": true,
"info": null,
"template_id": null
}
Saves a new design template for a QR category or a form, on the Management API host (
The
api.scanova.io), authenticated with your raw Management API key.
POST https://api.scanova.io/qr-assets/design-template/
Authorization: 401f7ac837da42b97f613d789819ff93537bee6a
string
required
Template name, max 150 characters.
string
default:"qr_category"
qr_category or form.integer
The
QRCategory id this template belongs to. Required when resource_type is qr_category; must be omitted when resource_type is form.object
Arbitrary JSON design data.
string
Gradient style, e.g.
linear.string
Color palette, typically JSON encoded as a string.
string
Font style data.
boolean
default:"false"
Marks this record as a reusable template rather than a one-off save.
curl -X POST "https://api.scanova.io/qr-assets/design-template/" \
-H "Authorization: 401f7ac837da42b97f613d789819ff93537bee6a" \
-H "Content-Type: application/json" \
-d '{
"name": "Blue Gradient",
"resource_type": "qr_category",
"category": 3,
"design_info": { "bg": "#0033ff" },
"gradient_type": "linear",
"is_template": true
}'
{
"id": 9,
"name": "Blue Gradient",
"resource_type": "qr_category",
"category": 3,
"design_info": { "bg": "#0033ff" },
"gradient_type": "linear",
"color_palette": null,
"font_styles": null,
"is_template": true,
"info": null,
"template_id": null
}
The resource_type/category pairing rule
category is required for resource_type=qr_category and forbidden for resource_type=form — both the serializer and a database check constraint enforce this, so it can’t drift. 400 with {"category": "This field is required for qr_category templates."} or the inverse if you get it backwards.
Related
- List user design templates — see saved templates.
- Update a user design template — edit an existing one.
- Management API overview — the auth scheme and quota rules that apply to this endpoint.
Authorizations
Send your Management API key as the raw value of the Authorization header — no "Bearer " or "Token " prefix, and no other characters. Example: Authorization: 401f7ac837da42b97f613d789819ff93537bee6a. A header containing more than one space-separated part is rejected outright. Requests also require the request's Host header to be the management API host (e.g. api.scanova.io) — the same key sent to the regular API host will not authenticate.
Response
Template created.
Was this page helpful?