Productsup

Update an export template's settings

Changes only the settings in the request body and leaves everything else as it is. Use it to change a template's name, file settings, delta settings, visibility or export type without sending the whole template back. **Field semantics.** A field left out, or sent as null, is not changed. Attributes, tags, custom form fields, marketing and metadata can't be changed here and are never touched: their ids stay the same. Use `PUT /V2/export-templates/{id}` or their own endpoints for those. The same rules as the full replace apply: `global`, `accountId`, `projectId` and `siteId` can only be changed by admin and internal users (an unchanged value is accepted from anyone); a change that leaves a delta template without a Delta Key is refused; internal-only export type tags can only be changed by admin and internal users. 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. Returns 404 if the export template does not exist; no operation is created. **Publishing required.** This request stores a draft. The change becomes available in the Productsup platform only after you publish the export template with `POST /V2/export-templates/{id}/publish`. **Optimistic locking.** Clients must send the current `draft_version` in the `If-Match` header (from GET `draftVersion` / ETag). A stale or mismatched value returns 409 Conflict and applies no changes.

PATCH
/V2/export-templates/{id}
AuthorizationBearer <token>

Productsup Keycloak JWT bearer token.

In: header

Path Parameters

id*integer

Export template ID

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.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://export-template-api.productsup.com/V2/export-templates/0" \  -H "If-Match: 1" \  -H "Content-Type: application/json" \  -d '{}'
{
  "operationId": "01980f10-5b04-7845-b0d5-66861c6cabb0",
  "status": "queued"
}
{
  "message": "Invalid JSON payload"
}
{
  "errors": {
    "message": "Resource access denied."
  }
}
{
  "code": "NOT_FOUND",
  "message": "Export template with ID 12345 not found."
}
{
  "errors": {
    "message": "Draft version mismatch: expected 1, current is 2. Re-fetch the export template and retry."
  }
}