Retrieves the URIs assigned to a product. Use it to see a product’s canonical URI and any other URIs or redirects that point to it.
Before you begin#
- The API token needs
ProductURIList_Load_Query, either assigned directly under Functions or through a group. See Create an API token. - Requests must be signed if the token requires it. See Make a signed request with HMAC.
- You need the product’s
Product_ID,Edit_Product,Product_CodeorProduct_SKU.
Example requests#
Retrieve a product’s URIs#
Returns up to 39 URIs for the product, sorted by URI.
{
"Store_Code": "{{Store_Code}}",
"Miva_Request_Timestamp": "{{$timestamp}}",
"Function": "ProductURIList_Load_Query",
"Product_ID": "{{Product_ID}}",
"Filter": "",
"Sort": "uri",
"Offset": 0,
"Count": 39
}
Sort in descending order#
Puts - in front of the sort column to return the URIs in reverse order.
{
"Store_Code": "{{Store_Code}}",
"Miva_Request_Timestamp": "{{$timestamp}}",
"Function": "ProductURIList_Load_Query",
"Product_ID": "{{Product_ID}}",
"Sort": "-uri",
"Offset": 0,
"Count": 10
}
Request parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
product_idEdit_ProductProduct_CodeProduct_SKU |
Number String String String |
ID Number of product Product code string Product code string Product SKU string |
|
count |
Number | No | Maximum lines of data allowed to be returned in the response. This limit is used to prevent excessive amounts of data return |
filter |
String | No | A string for filtering returned data |
offset |
Number | No | Used with the Count parameter for paginating results of large datasets. Default 0 is no offset. |
sort |
String | No | The order for sorting returned data |
Example response#
The response to the first example, shortened to one URI.
{
"success": 1,
"data": {
"total_count": 2,
"start_offset": 0,
"data": [
{
"id": 12,
"uri": "/product/test-product.html",
"store_id": 1,
"screen": "",
"page_code": "",
"cat_id": 0,
"product_id": 1,
"feed_id": 0,
"canonical": true,
"status": 200
}
]
}
}
Response parameters#
| Parameter | Type | Description |
|---|---|---|
success |
Boolean | Boolean value indicating if the API request was successful |
total_count |
Number | The total number of the product’s URIs that match the filter |
start_offset |
Number | The Offset the results start from |
id |
Number | URI id for the product |
uri |
String | The relative path for the URI |
store_id |
Number | The id number of the store |
screen |
String | The screen description |
page_code |
String | The code of the page |
cat_id |
Number | The id number of the category |
product_id |
Number | The id number of the product |
feed_id |
Number | The id number of the feed |
canonical |
Boolean | Boolean value indicating if the URI is canonical |
status |
Number | The status response number for the URI |
Additional options#
List Load Query overview explains the filter format and every operator.
Pagination#
Count and Offset page through results, and the response’s total_count says how many URIs match. See Pagination.
Error responses#
| Error Code | Error Message | Error Description |
|---|---|---|
MER-JSN-PRD-00070 |
Product not found | Product id is not found |
Related functions#
| Function | Use it to |
|---|---|
ProductURI_Insert |
Add a URI to a product |
ProductURI_Update |
Change a product URI |
ProductURI_Redirect |
Redirect a product URI |
ProductURIList_Delete |
Delete product URIs |
URIList_Load_Query |
Load URIs across the store |
Try in Postman#
In the Miva: JSON API: Authenticated collection, open URIs > ProductURIList_Load_Query. See Set Up Postman.