Files API


File Fields

The file object consist of

    {
        "id": 23500,
        "page_id": 5,
        "original_filename": "original_file_name.png",
        "file_size": "0.0973",
        "status": "aws uploaded",
        "created_at": "2019-11-07 04:54:51",
        "updated_at": "2019-11-07 04:54:58",
        "deleted_at": null,
        "file_request_id": null,
        "review_status": null,
        "form_response": [],
        "download_url": "download_url.com"
    }

GET /files

Retrieve the List of Files of your account

   GET https://filerequestpro.com/api/files

Request Parameters:

  • Page ID: Return the list of files off the provided page.
  • Page: Use for pagination porpoises.
   GET https://filerequestpro.com/api/files?page=1&page_id={YOUR_PAGE_ID}

Response

Returns an array with the list of files

{
    "success": true,
    "data": {
        "current_page": 34,
        "data": [
            {
                "id": 40062,
                "page_id": 5,
                "original_filename": "IMG_0004.JPG",
                "file_size": "0.9461",
                "created_at": "2020-03-21 19:13:56",
                "updated_at": "2020-03-21 19:30:07",
                "deleted_at": null,
                "file_request_id": null,
                "review_status": null
            },
            {
                "id": 57473,
                "page_id": 5,
                "original_filename": "NATH_ASSIGMENT_FOR_POLICY_STRATEGY.docx",
                "file_size": "0.0487",
                "created_at": "2020-04-19 21:25:35",
                "updated_at": "2020-04-19 21:25:37",
                "deleted_at": null,
                "file_request_id": null,
                "review_status": null
            }
        ]
    }
}

Pagination

Responses are paginated on 100 items. You will get the following information in the JSON response.

{
    "success": true,
    "data": {
        "current_page": 1,
        "data": [

        ],
        "first_page_url": "https://filerequestpro.com/api/files?page=1",
        "from": 1,
        "last_page": 22,
        "last_page_url": "https://filerequestpro.com/api/files?page=22",
        "next_page_url": "https://filerequestpro.com/api/files?page=2",
        "path": "https://filerequestpro.com/api/files",
        "per_page": 100,
        "prev_page_url": null,
        "to": 100,
        "total": 2199
    }
}

GET /files/{id}

Get all the information of a File linked to the provided ID.

   GET https://filerequestpro.com/api/files/{file_id}

Response

Returns a JSON with the page fields and form fields attached to the page.

{
    "success": true,
    "data": {
        "id": 23500,
        "page_id": 5,
        "original_filename": "File_name.png",
        "file_size": "0.0973",
        "status": "aws uploaded",
        "created_at": "2019-11-07 04:54:51",
        "updated_at": "2019-11-07 04:54:58",
        "deleted_at": null,
        "file_request_id": null,
        "review_status": null,
        "form_response": [],
        "download_url": "download_url.png"
    }
}