Get File List

This API retrieves a paginated list of files from the specified folder. You can filter files by type and control pagination using the query parameters.

The Get File List API retrieves a paginated list of files from the specified folder. You can filter files by type and control pagination using the query parameters.

This API is especially useful for:

  1. Fetching stored files in a specific folder.
  2. Managing and reviewing uploaded files.
  3. Accessing detailed file metadata such as dimensions, file size, and type.

Request Parameters

Public Request Parameters

📘

Public Request Parameters

Query Parameters

FieldTypeDescriptionRequiredExample
pageint32Page number; defaults to 1 if not specified. Must be a positive integer.No1
limitint32The number of files to retrieve per page. Defaults to 20 if not specified. Must be greater than 0 and less than or equal to 300.No20
folderstringThe folder name to fetch files from. Defaults to "product". Allowed values: product, all_upload.Noproduct

Response Explanation

Public Response Parameters

📘

Public Response Parameters

Success Response

FieldTypeDescriptionExample
filesarrayList of files.See below for structure.
upload_linkstringDirect link to access the uploaded file.https://cdn.shoplazza.com/7ebb4faa8d92e1d627edf9ca61a98993.png
file_uristringUnique identifier of the file.7ebb4faa8d92e1d627edf9ca61a98993.png
folderstringThe folder where the file is stored.upload
sizeintFile size in bytes.6842
typestringMIME type of the file.image/png
origin_linkstringThe original link of the file if uploaded via URL.""
descstringFile description.""
aspect_ratiostringAspect ratio of the file."1.2500000"
widthintWidth of the file in pixels.250
heightintHeight of the file in pixels.200
created_atstringTimestamp when the file was created."2024-04-23T09:32:57+08:00"
updated_atstringTimestamp when the file was last updated."2024-04-23T09:32:57+08:00"

Error Response

Error responses in the API can be represented using two different fields: errors and error. Both fields provide details about issues encountered during request processing. Below is an explanation of the fields with their respective examples and descriptions.

FieldTypeExampleDescription
errorString "page not found"Indicates an error encountered during the process

Error Detail

ErrorCodeDescriptionPossible reasons
400Bad Request1. Backend status indicates failure
2.Invalid domain url or credentials
3.JSON parsing error
422UnprocessableErrorValidation errors of limit fied
500StatusInternalServerError1.Aborted
2.Unimplemented
3.Unauthenticated
4.DeadlineExceeded
5. Response message parsing error

API Structure Overview

Language
Credentials
Header
URL
Click Try It! to start a request and see the response here!