AbanteCart Development > API Development
Fetch Resources of a Product
(1/1)
Rawinder Dhillon:
Hi,
i want to fetch all the images i uploaded on website through API of a particular product
with rt=a/product/product
it returns only Main image (one Url)
but i want all to display in android APP
i tried
a/product/resources
but it returns empty response on "Postman"
can someone plz help
output of a/product/resources (this product has 3 images)
{
"total": 6,
"resources": [
{
"type_id": "1",
"type_name": "image",
"default_directory": "image/",
"default_icon": "icon_resource_image.png",
"file_types": "/.+(jpe?g|gif|png|ico|svg|svgz|webp)$/i",
"access_type": "0"
},
{
"type_id": "2",
"type_name": "audio",
"default_directory": "audio/",
"default_icon": "icon_resource_audio.png",
"file_types": "/.+(mp3|wav)$/i",
"access_type": "0"
},
{
"type_id": "3",
"type_name": "video",
"default_directory": "video/",
"default_icon": "icon_resource_video.png",
"file_types": "/.+(avi|mpg|mov|flv)$/i",
"access_type": "0"
},
{
"type_id": "4",
"type_name": "pdf",
"default_directory": "pdf_document/",
"default_icon": "icon_resource_pdf.png",
"file_types": "/.+(pdf)$/i",
"access_type": "0"
},
{
"type_id": "5",
"type_name": "archive",
"default_directory": "archive/",
"default_icon": "icon_resource_archive.png",
"file_types": "/.+(zip|rar|gz|7z)$/i",
"access_type": "1"
},
{
"type_id": "6",
"type_name": "download",
"default_directory": "download/",
"default_icon": "icon_resource_download.png",
"file_types": "/.+$/i",
"access_type": "1"
}
]
}
dvagner:
Abantecart not have api for return all resources of products.
You can extend api via new extension.
Please see, it can help you:
https://abantecart.atlassian.net/wiki/spaces/DOC/pages/17695186/Catalog+API+Requests+Parameters+and+Responses#CatalogAPI:Requests,ParametersandResponses-GetProductResources
Rawinder Dhillon:
ok, Thx
Navigation
[0] Message Index
Go to full version