Skip to main content
This endpoint returns different response structures depending on whether the template is fully created or still being processed. Use this endpoint to poll for completion when creating templates with AI.
GET https://api.pdfnoodle.com/v1/integration/templates/:templateId

Request

Response

This endpoint returns different response structures depending on the template’s status:

Completed Template Response

Template Creation Status Response

Path Parameters

string
required
Template identifier. This can be: - The name field from an existing template (same as id from list templates response) - The templateId returned from the create template endpoint

Response Fields

Completed Template Response

Status Response (for templates being created)

Status Checking

When creating a template with AI, use this endpoint to poll for completion:
  • ONGOING: Template creation is still in progress. Continue polling.
  • SUCCESS: Template has been created successfully. The templateHtml field contains the generated template.
  • FAILED: Template creation failed. Check metadata.errorMessage for details.
Status information for templates being created is cached in Redis for 24 hours. Once a template is fully created, the response format changes to the full template object.

Polling Strategy

When polling for template creation status:
  • Poll every 10-30 seconds after initial creation
  • Stop polling once status is SUCCESS or FAILED
  • For completed templates, the response format changes to the full template object
  • If a template doesn’t exist and isn’t in the creation queue, you’ll receive a 404 Not Found error

Usage Example

Here’s a complete example of checking template status:

Error Responses

401 Unauthorized

Occurs when: The API key is missing or invalid.

404 Not Found

Occurs when: The requested template doesn’t exist and isn’t in the creation queue.

500 Internal Server Error

Occurs when: An internal server error prevents the operation from completing.
If the status is FAILED, check the metadata.errorMessage field for details about what went wrong. You may need to contact support if the error persists.