Product media
Images and other files attached to a product. The file itself is stored in AchieveApex storage (uploaded with a signed URL); a product media record links it to the product and sets its display order.
Endpoints
The REST path of this resource is /products-media (with an s in products). /product-media does not exist and returns 404.
| Method | Path | Description |
|---|---|---|
GET | /products-media | List product media |
GET | /products-media/:id | Get a product media item |
POST | /products-media | Upload product media |
PATCH | /products-media/:id | Update product media |
DELETE | /products-media/:id | Delete product media |
The API key is scoped to one organization: reads are filtered to it automatically.
The product media object
json
Fields
| Field | Type | Description |
|---|---|---|
id | integer | Read-only. Unique ID. |
organization_id | integer | Organization of the product. On create it is always taken from the product. |
product_id | integer | Product the file belongs to. Required. |
position | integer | Display order (lowest first). The item with the lowest position is the product's main image. Default 0. |
file_name | string | Original file name. |
file_type | string | MIME type, for example image/jpeg. |
file_size | integer | File size in bytes. |
file_path | string | Storage key of the file (the s3PathWithoutBucket returned by the signing step). |
s3_key | string | Storage key of the file (same value as file_path). Used to delete the file. |
s3_path | string | Full storage path, s3://bucket/key (the s3Path returned by the signing step). |
created_at | string (date-time) | Read-only. Creation time. |
updated_at | string (date-time) | Read-only. Last update time. |
deleted_at | string (date-time) | null | Read-only. Set when the item is deleted. |
Related
Report an issue with this documentation
Please log in to report issues with our documentation.