Skip to main content
The /templates endpoint provides an interface for managing template compilation in the shop system. Through this interface you can start the compilation process, query the current progress and status, and view a list of past compilation results. In addition, you can determine how many steps are required for the full compilation process.

Supported methods

List of all supported methods.
Command/InfoEndpointsGETPOSTPUTDELETE
Template compilationtemplates/

Data fields for template compilation

NameTypeMeaning
createdAtStringTime of the compilation (ISO 8601 format, UTC).
diagnosticsObjectDetailed messages and hints about errors or warnings (e.g. missing text snippets).
durationMillisIntegerDuration of the compilation in milliseconds.
errorCountIntegerNumber of errors that occurred.
statusStringResult status of the operation (e.g. success, error).
subshopIdStringID of the subshop whose templates were compiled.
userIdIntegerID of the user who started the compilation.
userNameStringDisplay name of the user who started the compilation. Either first + last name or “WEBSALE” if it is an account owned by WEBSALE.
warningCountIntegerNumber of warnings that occurred.

Example

{
    "createdAt": "2025-04-08T11:06:43.000Z",
    "diagnostics": {
        "compilation": [
            {
                "column": 33,
                "file": "/views/contact.htm",
                "line": 141,
                "message": "Function with name 'formFields' does not exist",
                "type": "error"
            },
            ...
        ],
        "translation": []
    },
    "durationMillis": 1800,
    "errorCount": 5,
    "status": "error",
    "subshopId": "deutsch",
    "userId": 1,
    "userName": " ",
    "warningCount": 0
}

Methods for template compilation

The following methods let you start the template compilation process, monitor its progress, and view past compilation results.

GET templates/results

This method gives you access to a list of previous template compilation runs. Each entry contains information about status, duration, the number of errors and warnings as well as the subshops and users involved. The results can be filtered and sorted to analyze specific compilation runs. To use this endpoint, the corresponding permissions to read template data must be available.

Example

https://www.<your-shop>.de/admin/api/v1/templates/results

Response

{
    "endReached": true,
    "items": [
        {
            "createdAt": "2025-02-11T08:52:22.000Z",
            "diagnostics": {
                "compilation": [],
                "translation": []
            },
            "durationMillis": 4233,
            "errorCount": 0,
            "status": "success",
            "subshopId": "english",
            "userId": 1,
            "userName": " ",
            "warningCount": 0
        },
        ...
    ],
    "nextPageToken": "NQ",
    "totalCount": 6
}

Filter fields

createdAt, duration, errorCount, warningCount, user, subshopId

Sort fields

createdAt, duration, durationMillis, errorCount, warningCount, subshopId, status

Error codes

ErrorTypeReason
401 UnauthorizedNot authorized: you are not logged in or you do not have the required permissions to read template data.
400 Bad Request”invalidValue”size ∉ [1;300]pageToken is not a number or is less than 0.
400 Bad Request”unknownDataField”A filter or sort field is invalid.
400 Bad Request”unknownOperation”A filter type is invalid.
400 Bad Request”invalidCharacters”size is not an integer.
A filter value is invalid.
400 Bad Request”syntaxError”sort contains more than one or no ”:”.

GET templates/compilationSteps

This method returns the total number of compilation steps performed when building the templates. Each template file is assigned a fixed three-step sequence: translating, parsing and linking. Therefore the response returns the number of files × 3. To use this endpoint, the corresponding permissions to read template data must be available.

Example

https://www.<your-shop>.de/admin/api/v1/templates/compilationSteps

Response

In this example 4 templates were processed, and each compilation run consists of 3 steps (translating, parsing, linking), which results in 12 steps in total.
{
    "compilationSteps": 12
}

Error codes

ErrorTypeReason
401 UnauthorizedNot authorized: you are not logged in or you do not have the required permissions to read template data.
503 Service Unavailable”internalError”Template files could not be read.

GET templates/compile

This method returns the current status of the running compilation process. As long as the compilation is not yet finished, the response contains information about progress. After completion, the endpoint additionally returns details about any warnings or errors. To use this method, the corresponding permissions to read template data must be available.

Example

https://www.<your-shop>.de/admin/api/v1/templates/compile

Response (compilation not yet finished)

{
    "current": 240,
    "progress": 0,
    "running": true,
    "total": 240
}

Response (compilation finished)

{
    "diagnostics": {
        "compilation": [],
        "translation": []
    },
    "errorCount": 0,
    "running": false,
    "warningCount": 0
}

Error codes

ErrorTypeReason
401 UnauthorizedNot authorized: you are not logged in or you do not have the required permissions to read template data.
503 Service Unavailable”internalError”The server found invalid data.

POST templates/compile

This method starts the compilation and publication of all templates. The current text snippets are taken into account and embedded into the templates. To trigger this operation, the corresponding permissions to publish template data must be available.

Example

https://www.<your-shop>.de/admin/api/v1/templates/compile

Response

{
    "success": true
}

Error codes

ErrorTypeReason
401 UnauthorizedNot authorized: you are not logged in or you do not have the required permissions to publish template data.
503 Service Unavailable”serviceUnavailable”TemplateCompilerUrl could not be found, or compilation failed.

Support

Bei technischen Fragen und Hilfestellungen ist unser Support-Team für Sie erreichbar: Zum Kundenportal Bitte senden Sie uns eine möglichst detaillierte Beschreibung sowie Screenshots, Requests/Antworten, damit wir Ihre Anfrage zeitnah und zielführend beantworten können.