ReferenceTemplates
Template imports
2 operations. Send Authorization: Bearer $PASSBOOK_KEY. Markdown
GET
/api/v1/templates/uploadstemplates:readSDK pb.templateImports.list
Query
limitinteger · ≥ 1 · ≤ 20
cursorstring · max 512
Returns
200
Errors
| Code | Status | Fix |
|---|---|---|
| ARCHIVE_TOO_LARGE | Remove unused files and upload an archive under 15 MB. | |
| ASSETS_INVALID | Fix the files named in issues and upload the archive again. | |
| ASSET_NOT_FOUND | Check the image name or id and that it belongs to this organization. | |
| FORBIDDEN | Use a key with the scope the operation lists, or ask an org admin. | |
| IMPORT_CONFLICT | Send the request again. | |
| INVALID_API_KEY | Create a new key in the console and update PASSBOOK_KEY. | |
| INVALID_CURSOR | Pass the nextCursor from the previous page unchanged, or drop it to start over. | |
| INVALID_INPUT | Fix the inputs named in issues; GET /api/v1/templates/{id}/input-schema lists them. | |
| KEY_CREATOR_GONE | Create a new key with POST /api/v1/api-keys. | |
| KEY_CREATOR_NOT_MEMBER | Create a new key from a current member with POST /api/v1/api-keys. | |
| KEY_TEST_ONLY | Use a pb_test_ key. | |
| MANIFEST_INVALID | Fix the manifest fields listed in issues and upload it again. | |
| MISSING_SCOPE | Create a key with the scope the operation lists under security. | |
| NOT_A_ZIP | Upload the template as a .zip file. | |
| NO_FILE | Send the archive as multipart form data in the file field. | |
| ORG_NOT_FOUND | Check orgId with GET /api/v1/orgs. | |
| ORG_REQUIRED | Send orgId with the request, or use a key scoped to one organization. | |
| RATE_LIMITED | Wait for Retry-After seconds, then retry. Back off on repeats. | |
| STAMPS_ABOVE_MAX | Raise the template's stamp maximum, or redeem stamps first. | |
| STAMPS_NONE | Use a template with stamps. | |
| STAMPS_QUERY | Retry the request. | |
| STAMPS_REDRAW | Make the change in the template designer and publish a new version. | |
| TEMPLATE_ARCHIVED | Restore it with POST /api/v1/templates/{id}/restore, or use another template. | |
| TEMPLATE_ASSET_CONFLICT | Upload the template version again. | |
| TEMPLATE_BAKED | Clone it with POST /api/v1/templates/{id}/clone and change the clone. | |
| TEMPLATE_BLUEPRINT_INACTIVE | Pick another. | |
| TEMPLATE_CANDIDATE_NOT_FOUND | Check the id with GET /api/v1/templates/{id}/candidates. | |
| TEMPLATE_CONFLICT | Fetch it with GET /api/v1/templates/{id} and send your change again. | |
| TEMPLATE_CONTENT_CHANGED | Send the request again to use the current release. | |
| TEMPLATE_EXISTS | Pick another name. | |
| TEMPLATE_IN_USE | Remove it from them first. | |
| TEMPLATE_IS_BLUEPRINT | Use this blueprint to make one first. | |
| TEMPLATE_MODE_MISMATCH | Use a key of the template's mode. | |
| TEMPLATE_NOT_BLUEPRINT | Duplicate a template instead. | |
| TEMPLATE_NOT_FOUND | Check the id with GET /api/v1/templates and the key's mode. | |
| TEMPLATE_NOT_SHAREABLE | Share an upload that no organization has taken. | |
| TEMPLATE_NOT_TESTED | Release it in Test first. | |
| TEMPLATE_ORG_REQUIRED | Assign the template to an organization, then retry. | |
| TEMPLATE_PROVIDER_UNSUPPORTED | Configure the provider for the organization, or release for another provider. | |
| TEMPLATE_RELEASE_CONFLICT | Send the request again to use the current release. | |
| TEMPLATE_RELEASE_NOT_FOUND | Check the id with GET /api/v1/templates/{id}/releases. | |
| TEMPLATE_RELEASE_REQUIRED | Approve a release with POST /api/v1/templates/{id}/candidates/{candidateId}/approve. | |
| TEMPLATE_SLUG_CONFLICT | Send the request again, or choose a different name. | |
| TEMPLATE_USED_BY_OTHER_ORG | Reissue or delete them first. | |
| TEMPLATE_VERSION_CONFLICT | Fetch the template and publish again. | |
| TEMPLATE_VERSION_CONTENT_CONFLICT | Run the sync again. | |
| TEMPLATE_VERSION_NOT_FOUND | Check the version with GET /api/v1/templates/{id}. | |
| UNAUTHENTICATED | Send Authorization: Bearer $PASSBOOK_KEY. | |
| UPLOAD_NOT_FOUND | Check the id with GET /api/v1/templates/uploads. | |
| VALIDATION | Fix each field in issues and resend. | |
| VERSION_INVALID | Use a version number from GET /api/v1/templates/{id}. | |
| WORKFLOW_START | Send the request again. |
GET
/api/v1/templates/uploads/{id}templates:readSDK pb.templateImports.retrieve
Path
idstring · max 64Required
Returns
200
Errors
| Code | Status | Fix |
|---|---|---|
| ARCHIVE_TOO_LARGE | Remove unused files and upload an archive under 15 MB. | |
| ASSETS_INVALID | Fix the files named in issues and upload the archive again. | |
| ASSET_NOT_FOUND | Check the image name or id and that it belongs to this organization. | |
| FORBIDDEN | Use a key with the scope the operation lists, or ask an org admin. | |
| IMPORT_CONFLICT | Send the request again. | |
| INVALID_API_KEY | Create a new key in the console and update PASSBOOK_KEY. | |
| INVALID_CURSOR | Pass the nextCursor from the previous page unchanged, or drop it to start over. | |
| INVALID_INPUT | Fix the inputs named in issues; GET /api/v1/templates/{id}/input-schema lists them. | |
| KEY_CREATOR_GONE | Create a new key with POST /api/v1/api-keys. | |
| KEY_CREATOR_NOT_MEMBER | Create a new key from a current member with POST /api/v1/api-keys. | |
| KEY_TEST_ONLY | Use a pb_test_ key. | |
| MANIFEST_INVALID | Fix the manifest fields listed in issues and upload it again. | |
| MISSING_SCOPE | Create a key with the scope the operation lists under security. | |
| NOT_A_ZIP | Upload the template as a .zip file. | |
| NOT_FOUND | Check the id, and that the key's mode (test or live) matches the object. | |
| NO_FILE | Send the archive as multipart form data in the file field. | |
| ORG_NOT_FOUND | Check orgId with GET /api/v1/orgs. | |
| ORG_REQUIRED | Send orgId with the request, or use a key scoped to one organization. | |
| RATE_LIMITED | Wait for Retry-After seconds, then retry. Back off on repeats. | |
| STAMPS_ABOVE_MAX | Raise the template's stamp maximum, or redeem stamps first. | |
| STAMPS_NONE | Use a template with stamps. | |
| STAMPS_QUERY | Retry the request. | |
| STAMPS_REDRAW | Make the change in the template designer and publish a new version. | |
| TEMPLATE_ARCHIVED | Restore it with POST /api/v1/templates/{id}/restore, or use another template. | |
| TEMPLATE_ASSET_CONFLICT | Upload the template version again. | |
| TEMPLATE_BAKED | Clone it with POST /api/v1/templates/{id}/clone and change the clone. | |
| TEMPLATE_BLUEPRINT_INACTIVE | Pick another. | |
| TEMPLATE_CANDIDATE_NOT_FOUND | Check the id with GET /api/v1/templates/{id}/candidates. | |
| TEMPLATE_CONFLICT | Fetch it with GET /api/v1/templates/{id} and send your change again. | |
| TEMPLATE_CONTENT_CHANGED | Send the request again to use the current release. | |
| TEMPLATE_EXISTS | Pick another name. | |
| TEMPLATE_IN_USE | Remove it from them first. | |
| TEMPLATE_IS_BLUEPRINT | Use this blueprint to make one first. | |
| TEMPLATE_MODE_MISMATCH | Use a key of the template's mode. | |
| TEMPLATE_NOT_BLUEPRINT | Duplicate a template instead. | |
| TEMPLATE_NOT_FOUND | Check the id with GET /api/v1/templates and the key's mode. | |
| TEMPLATE_NOT_SHAREABLE | Share an upload that no organization has taken. | |
| TEMPLATE_NOT_TESTED | Release it in Test first. | |
| TEMPLATE_ORG_REQUIRED | Assign the template to an organization, then retry. | |
| TEMPLATE_PROVIDER_UNSUPPORTED | Configure the provider for the organization, or release for another provider. | |
| TEMPLATE_RELEASE_CONFLICT | Send the request again to use the current release. | |
| TEMPLATE_RELEASE_NOT_FOUND | Check the id with GET /api/v1/templates/{id}/releases. | |
| TEMPLATE_RELEASE_REQUIRED | Approve a release with POST /api/v1/templates/{id}/candidates/{candidateId}/approve. | |
| TEMPLATE_SLUG_CONFLICT | Send the request again, or choose a different name. | |
| TEMPLATE_USED_BY_OTHER_ORG | Reissue or delete them first. | |
| TEMPLATE_VERSION_CONFLICT | Fetch the template and publish again. | |
| TEMPLATE_VERSION_CONTENT_CONFLICT | Run the sync again. | |
| TEMPLATE_VERSION_NOT_FOUND | Check the version with GET /api/v1/templates/{id}. | |
| UNAUTHENTICATED | Send Authorization: Bearer $PASSBOOK_KEY. | |
| UPLOAD_NOT_FOUND | Check the id with GET /api/v1/templates/uploads. | |
| VALIDATION | Fix each field in issues and resend. | |
| VERSION_INVALID | Use a version number from GET /api/v1/templates/{id}. | |
| WORKFLOW_START | Send the request again. |
Console only
Signed-in console sessions only. An API key cannot call these.
POST
/api/v1/templates/uploadsUpload a template archive (zip or multipart, up to 15 MB)