File Request API


File requests let you send invites or request for files to anyone and collect them right in your Cloud account.

GET /filerequests

Retrieve the List of File Request of your account. Can be filtered by page_id

GET 'https://filerequestpro.com/api/filerequests?page_id=PAGE_ID'

Reponse

Returns an array with the list of File Request for a given page Id paginated.

{
    "success": true,
    "data": {
        "current_page": 1,
        "data": [
            {
                "id": 1,
                "firstname": "Conrado",
                "lastname": "Maggi",
                "email": "[email protected]",
                "due_date": "2021-05-12",
                "status": "Pending",
                "uuid": "17a974bd-3414-4966-961c-b30275e6ce66",
                "page_id": 5179,
                "created_at": "2021-05-05 10:04:28",
                "updated_at": "2021-05-05 10:04:28"
            }
        ],
        "first_page_url": "https://filerequestpro.com/api/filerequests?page=1",
        "from": 1,
        "last_page": 1,
        "last_page_url": "https://filerequestpro.com/api/filerequests?page=1",
        "next_page_url": null,
        "path": "https://filerequestpro.com/api/filerequests",
        "per_page": 100,
        "prev_page_url": null,
        "to": 9,
        "total": 9
    }
}

GET /filerequests/{id}

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

GET https://filerequestpro.com/api/filerequests/{id}

Response

Returns a JSON object with the File Request fields and related records data.

{
    "success": true,
    "data": {
        "id": 42,
        "firstname": "Conrado",
        "lastname": "M",
        "email": "[email protected]",
        "due_date": "2021-06-08",
        "status": "Completed",
        "uuid": "15339710-a360-49a4-a704-c7de2a32ebd9",
        "page_id": 5179,
        "deleted_at": null,
        "created_at": "2021-06-01 10:08:46",
        "updated_at": "2021-06-01 10:10:45",
        "url": "https://filerequestpro.com/up/test-pr/15339710-a360-49a4-a704-c7de2a32ebd9",
        "form_responses": {
            "Name": "Conrado Maggi",
            "File Upload": "fw8bene_file_request_pro.pdf",
            "File Upload 2": "Resultado_|_CaixaBank.pdf"
        },
        "files": [
            {
                "id": 734325,
                "page_id": 5179,
                "original_filename": "Resultado_|_CaixaBank.pdf",
                "file_size": "0.0367",
                "status": "aws uploaded",
                "created_at": "2021-06-01 10:09:44",
                "updated_at": "2021-06-01 10:25:05",
                "deleted_at": null,
                "file_request_id": 42,
                "review_status": "Accepted"
            },
            {
                "id": 734324,
                "page_id": 5179,
                "original_filename": "fw8bene_file_request_pro.pdf",
                "file_size": "0.4320",
                "status": "aws uploaded",
                "created_at": "2021-06-01 10:09:41",
                "updated_at": "2021-06-01 10:25:05",
                "deleted_at": null,
                "file_request_id": 42,
                "review_status": "Accepted"
            }
        ]
    }
}

POST /filerequests/{id}

Creates a new File Request

POST https://filerequestpro.com/api/filerequests

Request body

{
    "firstname": "First Name",
    "lastname": "Last Name",
    "email": "[email protected]",
    "due_date": "2021-05-31",
    "date_format": "dd/mm/yyyy",
    "status": "Pending",
    "page_id":5179
}

All fields and mandatory.

PUT /filerequests

Updates an existing File Request. Currently we only support updating the request status and due_date fields.

PUT https://filerequestpro.com/api/filerequests/{id}

Request body

{
    "due_date": "2021-05-30",
    "date_format": "dd/mm/yyyy",
    "status": "To Review"
}

DEL /filerequests/{id}

Deletes an existing File Request

DELETE https://filerequestpro.com/api/filerequests/{id}

POST /filerequests/accept-file

Change one of the file request files to accepted. When all request files are set to "Accepted", the request will be updated to "Completed"

POST https://filerequestpro.com/api/accept-file

Request body

{
    "file_id":687866
}

You can get the file Id by getting a file request or subscribing a to file.uploaded webhook.

POST /filerequests/reject-file

Change one of the file request files to accepted. When a request files are set to "Rejected", the request will be updated to "Pending"

POST https://filerequestpro.com/api/reject-file

Request body

{
    "file_id":687866
}

You can get the file Id by getting a file request or subscribing a to file.uploaded webhook.