List Media for a given Product
GET
/api/v2/products/{productId}/media.json
Get or search for one or more media items associated with a Product using a range of accepted query parameters.
Scopes
Requires either the products
or products.readonly
OAuth scope.
Path Parameters
productId
required
The product ID is required. |
Query Parameters
Accepts the following query parameters:
id:in
Return media items for a product by a comma-separated list of IDs. |
id:min
Return media items with an ID greater than or equal to that specified. |
id:max
Return media items with an ID less than or equal to that specified. |
id:after
Return media items with an ID greater than that specified. |
id:before
Return media items with an ID less than that specified. |
isPrimary
Return media items by their primary status:
|
type
Return media items by type:
|
JSON response
Evance will return a JSON object containing the following properties:
success
A successful search request containing zero or more results will always return a true value.
|
status
An integer matching the HTTP response code. A successful request will have a status of 200 .
|
data
An array containing zero or more Product Media data objects. |
pagination
Search results include a pagination object contain information about the current page, total pages, the limit per page and the total number of results available.
|
links
An object containing links to traverse available search results.
|
Example response
{
"success": true,
"status": 200,
"data": [
{
"id": 48646,
"productId": 3066,
"type": "photo",
"isPrimary": true,
"image": "https://cdn.evance.me/portal/web/0/content/images/be05aa4b29f41eb94c6f4bb5a36370be.jpg",
"video": null,
"title": null,
"description": null,
"sequence": 1,
"createdOn": "2022-05-21T15:54:05+00:00",
"createdBy": null,
"modifiedOn": "2022-05-21T15:54:05+00:00",
"modifiedBy": null
},
{
"id": 48649,
"productId": 3066,
"type": "video",
"isPrimary": false,
"image": "https://cdn.evance.me/portal/web/0/content/images/be05aa4b29f41eb94c6f4bb5a36370be.jpg",
"video": "https://www.youtube.com/watch?v=ZpZ5Wu5Myeo",
"title": null,
"description": null,
"sequence": 2,
"createdOn": "2022-05-21T15:55:05+00:00",
"createdBy": null,
"modifiedOn": "2022-05-21T15:55:05+00:00",
"modifiedBy": null
},
{
"id": 48651,
"productId": 3066,
"type": "rotate",
"isPrimary": false,
"image": "https://cdn.evance.me/portal/web/0/content/images/be05aa4b29f41eb94c6f4bb5a36370be.jpg",
"video": null,
"title": null,
"description": null,
"sequence": 3,
"createdOn": "2022-05-21T15:56:05+00:00",
"createdBy": null,
"modifiedOn": "2022-05-21T15:56:05+00:00",
"modifiedBy": null,
"frames": [
"https://cdn.evance.me/portal/web/0/content/images/be05aa4-frame-01.jpg",
"https://cdn.evance.me/portal/web/0/content/images/be05aa4-frame-02.jpg",
"https://cdn.evance.me/portal/web/0/content/images/be05aa4-frame-03.jpg",
"https://cdn.evance.me/portal/web/0/content/images/be05aa4-frame-04.jpg",
"https://cdn.evance.me/portal/web/0/content/images/be05aa4-frame-05.jpg"
]
}
],
"pagination": {
"page": 1,
"limit": 100,
"total": 1,
"totalPages": 1
},
"links": {
"self": "https://examples.evance.me/api/v2/products/3066/media.json",
"previous": null,
"next": null
}
}