Imports

Save a ready import as a template

Creates the account's own template, version 1, from the import's draft. It counts against the plan's template limit exactly as POST /v1/templates does. Nothing is a template until this call. Saving again returns the same template with 200 and saved: true. Saving is never counted against the plan's import count.

post/v1/imports/{id}/save

Request

  • Base URL: https://api.galleyrender.com
  • URL: https://api.galleyrender.com/v1/imports/{id}/save
  • Auth: HTTP bearer

Path parameters

idstring required
Example:imp_4tq8m2x7k1bv

The import id returned by POST /v1/imports.

Request body

namestring
descriptionstring

Example request

{
  "name": "ashcroft-invoice"
}

Response

Already saved: the same template.

object'template' required
idstring required
namestring required
descriptionstring nullable
latest_versioninteger required
created_atstring date-time required
updated_atstring date-time required
versioninteger

Present when a version was resolved.

refstring
engine'chromium' | 'satori'
schemaobject nullable
optionsobject nullable
expected_pagesinteger

The version's declared PDF page estimate.

exampleunknown
sourcestring
checksumstring

SHA-256 of engine, source, schema and options. Part of the render cache key.

messagestring nullable
version_created_atstring date-time
origin'library' | 'import' | 'own'

On GET /v1/templates: a starter from the library, a template saved from a document import, or one of the account's own.

import_idstring required
savedtrue

Present, and true, on a repeat call that returned the template saved before.

Example response

{
  "id": "tpl_5m2k8q1xv7bd",
  "ref": "invoice@1"
}

Changes

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