Publish a package as the next version
const url = 'https://example.com/v1/templates/example/versions';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/zip'}, body: 'binary'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/v1/templates/example/versions \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/zip' \ --data binaryAuthorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”A .paprika package (format 2).
Responses
Section titled “Responses”The answer.
object
The template’s fields, by name.
object
A field of the template: its type, whether a value is required, its settings by type (a number’s min, max, step and decimals; a choice’s options) and the group it is in (PAP-134).
object
The groups the fields are shown in, in order (PAP-134).
object
Values that render the template, by field name: text, a number, an option’s value or true or false.
object
object
object
object
The brand kit it was published with, its revision then and the kit items it uses (PAP-131).
object
object
Example
{ "fields": { "additionalProperty": { "type": "text" } }}Made; the answer describes it.
object
The template’s fields, by name.
object
A field of the template: its type, whether a value is required, its settings by type (a number’s min, max, step and decimals; a choice’s options) and the group it is in (PAP-134).
object
The groups the fields are shown in, in order (PAP-134).
object
Values that render the template, by field name: text, a number, an option’s value or true or false.
object
object
object
object
The brand kit it was published with, its revision then and the kit items it uses (PAP-131).
object
object
Example
{ "fields": { "additionalProperty": { "type": "text" } }}No key, or not a valid one.
object
Example
{ "code": "field-unknown"}The key lacks the scope, or its tenant is suspended or deleted.
object
Example
{ "code": "field-unknown"}Understood, but refused: values, layout or package problems.
object
Example
{ "code": "field-unknown"}