News:

AbanteCart v1.4.2 is released.

Main Menu

Do you like AbanteCart? Please rate AbanteCart or share your experience with other eCommerce entrepreneurs. Go to Softaculous rating page to add your rating or write a review

Fetch Resources of a Product

Started by Rawinder Dhillon, February 18, 2021, 02:55:16 AM

Previous topic - Next topic

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



Forum Rules Code of conduct
AbanteCart.com 2010 -