/api/v1/products/{id}/imagesUpload a product image
Upload a single image file (multipart/form-data, field name `file`) and append it to the product's `imageUrls` array. Use this when you don't have a CDN URL ready — the image lands in our R2 bucket and the public URL is returned in the response.
PNG / JPG / WebP only, max 5 MB per file, max 20 images per product. **No Idempotency-Key support** — multipart bodies aren't safely hashable. Client should check existence + skip if retrying. The matching `DELETE /api/v1/products/{id}/images/{index}` removes a single image by zero-based index.
Path parameters
- idrequired
ObjectId
Product ID.
Headers
- Authorizationrequired
string
`Bearer <api-key>`.
- Content-Typerequired
string
`multipart/form-data` with the boundary parameter set by your HTTP client.
Body fields
- filerequired
binary (PNG / JPG / WebP, ≤ 5 MB)
Image bytes posted as the `file` form field.
Request
curl -sS -X POST \
https://app.tracepass.eu/api/v1/products/6650a1b2c3d4e5f6a7b8c9d0/images \
-H "Authorization: Bearer tp_REDACTED_xxxxxxxxxxxx" \
-F "file=@./battery-hero.jpg"Response
{
"imageUrl": "https://r2.tracepass.eu/<companyId>/products/<id>/images/<imageId>.jpg",
"imageUrls": [
"https://existing-image-1.jpg",
"https://r2.tracepass.eu/<companyId>/products/<id>/images/<imageId>.jpg"
]
}