Productsup

Publish an export template revision

Publishes a draft export template by creating an immutable revision snapshot of the current aggregate (including analyzer test assignment configuration). The previous active revision is deactivated, the template state becomes ACTIVE, and draftVersion is incremented. The operation runs asynchronously and returns 202 Accepted with a Content-Location header pointing to the operation resource. Poll GET /V2/operations/{operationId} for progress and the result. **Optimistic locking.** Send the current `draft_version` in the `If-Match` header (from GET `draftVersion` / ETag). A stale or mismatched value returns 409 Conflict and does not create an operation. Publishing a template that is not in DRAFT returns 400. Unknown or soft-deleted templates return 404. Until cutover, `POST /V1/export-templates/{id}/commit` remains available and unchanged.

POST
/V2/export-templates/{id}/publish

Authorization

bearerAuth

Path Parameters

id*integer

Export template ID to publish

Header Parameters

If-Match*string

Current draft_version of the export template (optimistic locking). Send the value from GET draftVersion or the ETag response header. Mismatch returns 409 Conflict.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://export-template-api.productsup.com/V2/export-templates/0/publish" \  -H "If-Match: 1"
{
  "operationId": "01980f10-5b04-7845-b0d5-66861c6cabb0",
  "status": "queued"
}
{
  "errors": {
    "message": "Resource access denied."
  }
}
{
  "errors": {
    "message": "Resource access denied."
  }
}
{
  "errors": {
    "message": "Resource access denied."
  }
}
{
  "errors": {
    "message": "Resource access denied."
  }
}