getUploadedDocuments
curl --request GET \
--url https://sandbox.rollfi.xyz/reports/getUploadedDocuments \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"method": "getUploadedDocuments",
"companyId": "EB45E206-5E50-4079-8B41-04C05E4C5338"
}
'import requests
url = "https://sandbox.rollfi.xyz/reports/getUploadedDocuments"
payload = {
"method": "getUploadedDocuments",
"companyId": "EB45E206-5E50-4079-8B41-04C05E4C5338"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.get(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
method: 'getUploadedDocuments',
companyId: 'EB45E206-5E50-4079-8B41-04C05E4C5338'
})
};
fetch('https://sandbox.rollfi.xyz/reports/getUploadedDocuments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.rollfi.xyz/reports/getUploadedDocuments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => json_encode([
'method' => 'getUploadedDocuments',
'companyId' => 'EB45E206-5E50-4079-8B41-04C05E4C5338'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.rollfi.xyz/reports/getUploadedDocuments"
payload := strings.NewReader("{\n \"method\": \"getUploadedDocuments\",\n \"companyId\": \"EB45E206-5E50-4079-8B41-04C05E4C5338\"\n}")
req, _ := http.NewRequest("GET", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sandbox.rollfi.xyz/reports/getUploadedDocuments")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"method\": \"getUploadedDocuments\",\n \"companyId\": \"EB45E206-5E50-4079-8B41-04C05E4C5338\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.rollfi.xyz/reports/getUploadedDocuments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"method\": \"getUploadedDocuments\",\n \"companyId\": \"EB45E206-5E50-4079-8B41-04C05E4C5338\"\n}"
response = http.request(request)
puts response.read_body{
"documents": [
{
"documentId": "3F33DB6B-FFA2-4560-BE56-E7D76A840B57",
"companyId": "EB45E206-5E50-4079-8B41-04C05E4C5338",
"employeeId": "49720D41-693D-435B-982F-7D0C47ECAF61",
"fileName": "FormW4.pdf",
"documentType": "W4Form"
},
{
"documentId": "8EA08254-5EB3-4B2C-8677-E86AECF60B94",
"companyId": "EB45E206-5E50-4079-8B41-04C05E4C5338",
"fileName": "FormDR-835.pdf",
"documentType": "DR-835Form"
},
{
"documentId": "04F235EE-8CEA-4171-A796-8E62CA92C8B1",
"companyId": "EB45E206-5E50-4079-8B41-04C05E4C5338",
"fileName": "FormTR-2000.pdf",
"documentType": "TR-2000Form"
},
{
"documentId": "8654D9DC-2C37-45C9-B6EF-A4E036F78A8B",
"companyId": "EB45E206-5E50-4079-8B41-04C05E4C5338",
"employeeId": "9B3B66A3-94A5-413B-B2C4-F24A651297B8",
"fileName": "FormW4.pdf",
"documentType": "W4Form"
},
{
"documentId": "4F9C341A-B9AA-4E91-8C7C-2371F32A728F",
"companyId": "EB45E206-5E50-4079-8B41-04C05E4C5338",
"employeeId": "49720D41-693D-435B-982F-7D0C47ECAF61",
"fileName": "FormW4.pdf",
"documentType": "W4Form"
},
{
"documentId": "0264ACB0-F3A0-4A9B-9344-D700CC6168DB",
"companyId": "EB45E206-5E50-4079-8B41-04C05E4C5338",
"fileName": "Form8655.pdf",
"documentType": "8655Form"
}
]
}{
"error": {
"code": 400,
"message": "At least one of companyId, employeeId, or payPeriodId is required"
}
}Reports
getUploadedDocuments
The getUploadedDocuments API retrieves a list of uploaded documents alongside their document-specific IDs.
What it does:
- Retrieves uploaded documents that can then be downloaded using the
downloadDocumentAPI - Filters by
companyId,employeeId, andpayPeriodId - Returns a list of
documentIdvalues - Use this when selecting a document to download from a drop-down menu
State W-4s
- Employees’ pre-filled state W-4s are automatically generated after
initiateUserKyc - State W-4 forms can be identified by their
documentType:{StateCode}W4Form, e.g.,NJW4Form - To download a pre-filled state W-4, use the
downloadDocumentAPI with the provideddocumentId
Note:
- At least one ID must be included in the request for filtering
GET
/
reports
/
getUploadedDocuments
getUploadedDocuments
curl --request GET \
--url https://sandbox.rollfi.xyz/reports/getUploadedDocuments \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"method": "getUploadedDocuments",
"companyId": "EB45E206-5E50-4079-8B41-04C05E4C5338"
}
'import requests
url = "https://sandbox.rollfi.xyz/reports/getUploadedDocuments"
payload = {
"method": "getUploadedDocuments",
"companyId": "EB45E206-5E50-4079-8B41-04C05E4C5338"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.get(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
method: 'getUploadedDocuments',
companyId: 'EB45E206-5E50-4079-8B41-04C05E4C5338'
})
};
fetch('https://sandbox.rollfi.xyz/reports/getUploadedDocuments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.rollfi.xyz/reports/getUploadedDocuments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => json_encode([
'method' => 'getUploadedDocuments',
'companyId' => 'EB45E206-5E50-4079-8B41-04C05E4C5338'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.rollfi.xyz/reports/getUploadedDocuments"
payload := strings.NewReader("{\n \"method\": \"getUploadedDocuments\",\n \"companyId\": \"EB45E206-5E50-4079-8B41-04C05E4C5338\"\n}")
req, _ := http.NewRequest("GET", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sandbox.rollfi.xyz/reports/getUploadedDocuments")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"method\": \"getUploadedDocuments\",\n \"companyId\": \"EB45E206-5E50-4079-8B41-04C05E4C5338\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.rollfi.xyz/reports/getUploadedDocuments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"method\": \"getUploadedDocuments\",\n \"companyId\": \"EB45E206-5E50-4079-8B41-04C05E4C5338\"\n}"
response = http.request(request)
puts response.read_body{
"documents": [
{
"documentId": "3F33DB6B-FFA2-4560-BE56-E7D76A840B57",
"companyId": "EB45E206-5E50-4079-8B41-04C05E4C5338",
"employeeId": "49720D41-693D-435B-982F-7D0C47ECAF61",
"fileName": "FormW4.pdf",
"documentType": "W4Form"
},
{
"documentId": "8EA08254-5EB3-4B2C-8677-E86AECF60B94",
"companyId": "EB45E206-5E50-4079-8B41-04C05E4C5338",
"fileName": "FormDR-835.pdf",
"documentType": "DR-835Form"
},
{
"documentId": "04F235EE-8CEA-4171-A796-8E62CA92C8B1",
"companyId": "EB45E206-5E50-4079-8B41-04C05E4C5338",
"fileName": "FormTR-2000.pdf",
"documentType": "TR-2000Form"
},
{
"documentId": "8654D9DC-2C37-45C9-B6EF-A4E036F78A8B",
"companyId": "EB45E206-5E50-4079-8B41-04C05E4C5338",
"employeeId": "9B3B66A3-94A5-413B-B2C4-F24A651297B8",
"fileName": "FormW4.pdf",
"documentType": "W4Form"
},
{
"documentId": "4F9C341A-B9AA-4E91-8C7C-2371F32A728F",
"companyId": "EB45E206-5E50-4079-8B41-04C05E4C5338",
"employeeId": "49720D41-693D-435B-982F-7D0C47ECAF61",
"fileName": "FormW4.pdf",
"documentType": "W4Form"
},
{
"documentId": "0264ACB0-F3A0-4A9B-9344-D700CC6168DB",
"companyId": "EB45E206-5E50-4079-8B41-04C05E4C5338",
"fileName": "Form8655.pdf",
"documentType": "8655Form"
}
]
}{
"error": {
"code": 400,
"message": "At least one of companyId, employeeId, or payPeriodId is required"
}
}Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Response
Show child attributes
Show child attributes
⌘I
