ApiAsset pictures
Upload an asset picture
Uploads a new picture file and associates it with the specified asset and organization. Accepts files up to 10MB. Allowed formats: image/jpeg, image/png, image/webp, image/svg+xml. Each asset can have only one picture. If a picture already exists for the asset, it must be removed before uploading a new one.
Access restricted to roles:
- admin
- manufacturer-admin
- manufacturer-user
- producer-admin
- producer-user
Authorization
bearer AuthorizationBearer <token>
In: header
Path Parameters
assetId*string
The ID of the asset this picture belongs to
organizationId*string
The organization ID the asset belongs to
Request Body
multipart/form-data
The picture file to upload
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/pictures/asset/833cb09d-6c34-4590-be5f-a62fab9f41a2/org-5678"{ "data": { "id": "a3f2b65e-4f22-4f45-80c4-9e547a8f5e6a", "filename": "document.pdf", "ownerId": "d1f2g3h4-i5j6-k7l8-m9n0", "mimetype": "application/pdf", "type": "AssetPicture", "createdBy": "user-5678efgh", "createdAt": "2025-01-15T09:30:00.000Z", "updatedBy": "user-1234abcd", "updatedAt": "2025-02-27T12:00:00.000Z", "organizationId": "d1f2g3h4-i5j6-k7l8-m9n0", "manufacturerId": "d1f2g3h4-i5j6-k7l8-m9n0", "assetId": "de8bf591-0a43-4ec3-958e-9f3466adf688" }}