Products

Update a product.

Patch one or more product fields. Send only the keys you want to change — omitted fields stay untouched.

imageUrls REPLACES the existing array (deliberate — your CMS stays canonical). To append a single image without rewriting the list, use the multipart upload endpoint. description: null clears the description (distinct from omitting the key).

patch/api/v1/products/{id}

Request

  • Base URL: https://app.tracepass.eu
  • URL: https://app.tracepass.eu/api/v1/products/{id}
  • Auth: one of:
    • HTTP bearer
    • OAuth 2 (authorization code, authorization URL https://app.tracepass.eu/api/oauth/authorize, token URL https://app.tracepass.eu/api/oauth/token, scopes: passports:write)

Headers

Idempotency-Keystring

UUID v4 (or any opaque string ≤ 64 chars) per logical operation. The platform stores the first response for 24 hours and replays it on the same key + same workspace. Reusing the same key with a different request body returns 422.

Request body

namestring
modelstring
descriptionstring nullable
defaultFieldValuesobject

Seed values for passports created from this product, keyed by template field. Each value is checked against the template: a numeric string for a number field is stored as a number, and any other value the template rejects answers 400 Invalid default field values with details (in a batch, that item's result is an error).

imageUrlsstring[]
status'active' | 'archived'
sourceLocalestring

Response

Product updated.

_idstring

MongoDB ObjectId hex string (24 chars).

namestring
modelstring
categorystring
templateIdstring

MongoDB ObjectId hex string (24 chars).

defaultFieldValuesobject

Seed values for passports created from this product, keyed by template field. Each value is checked against the template: a numeric string for a number field is stored as a number, and any other value the template rejects answers 400 Invalid default field values with details (in a batch, that item's result is an error).

imageUrlsstring[]
passportCountinteger
status'active' | 'archived'
sourceLocalestring
createdAtstring date-time
updatedAtstring date-time

Example response

{
  "_id": "6650a1b2c3d4e5f6a7b8c9d0",
  "templateId": "6650a1b2c3d4e5f6a7b8c9d0"
}

Changes

No recorded changes to this operation across all 1 revision of this API.