ViewAttachment
ViewAttachment
This endpoint is used to view attachments uploaded for a particular 1099 form.
In your API request, you must include the RecordId of the specific form for which you want to view attachments. The response will have the file path to access the attachments.
GET Attachment/View Request Body
| Field | Type | Description |
|---|---|---|
| RecordID | Guid | A Unique identifier of the records given by TaxBandits |
Response Body
| Field | Type | Description |
|---|---|---|
| RecordID | Guid | A unique Identifier of the records generated by TaxBandits |
| FilePath | String | File path of the attachment document |
| Errors | object[] | Shows detailed error information. |
| Id | string | Returns the validation error ID. |
| Name | string | Name of the validation error. |
| Message | string | Description of the validation error. |
Payload

Go Lang
Node.js
Python
.NET C#

Ruby
Java

cURL
Request Params
| Sample | Description | Action |
|---|---|---|
| Sample 1 | Query Params - View attachments uploaded for a particular 1099 form |
Sample 1
Attachment/View?RecordId=04ec74ea-9099-42a0-9a64-710a4d7eec37
Response JSON
| Response | Description | Action |
|---|---|---|
| 200 | Success Response - You'll get the below response when the request is processed successfully |
Response: 200
{
"RecordID": "04ec74ea-9099-42a0-9a64-710a4d7eec37",
"FilePath": "https://amazonaws.com/pdfs/a570efbd-740f-4ae2-bfe7-26356cd85148.pdf",
"Errors": null
}
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
url := "<APIURL>/v2.0.0/Attachment/View?RecordId=04ec74ea-9099-42a0-9a64-710a4d7eec37"
method := "GET"
// GET request does not require a request body
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Authorization", "<ACCESS_TOKEN>")
client := &http.Client{}
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
const axios = require('axios');
let data = '';
let config = {
method: 'get',
maxBodyLength: Infinity,
url: '<APIURL>/v2.0.0/Attachment/View?RecordId=04ec74ea-9099-42a0-9a64-710a4d7eec37',
headers: {
'Content-Type': 'application/json',
'Authorization': '<ACCESS_TOKEN>'
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
import http.client
import json
conn = http.client.HTTPSConnection("<APIURL>")
payload = ''
headers = {
'Content-Type': 'application/json',
'Authorization': '<ACCESS_TOKEN>'
}
conn.request("GET", "/v2.0.0/Attachment/View?RecordId=04ec74ea-9099-42a0-9a64-710a4d7eec37", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "<APIURL>/v2.0.0/Attachment/View?RecordId=04ec74ea-9099-42a0-9a64-710a4d7eec37");
request.Headers.Add("Authorization", "<ACCESS_TOKEN>");
var content = new StringContent("", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
require "uri"
require "json"
require "net/http"
url = URI("<APIURL>/v2.0.0/Attachment/View?RecordId=04ec74ea-9099-42a0-9a64-710a4d7eec37")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Content-Type"] = "application/json"
request["Authorization"] = "<ACCESS_TOKEN>"
response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("<APIURL>/v2.0.0/Attachment/View?RecordId=04ec74ea-9099-42a0-9a64-710a4d7eec37")
.method("GET", body)
.addHeader("Content-Type", "application/json")
.addHeader("Authorization", "<ACCESS_TOKEN>")
.build();
Response response = client.newCall(request).execute();
curl --location '<APIURL>/v2.0.0/Attachment/View?RecordId=04ec74ea-9099-42a0-9a64-710a4d7eec37' --header 'Content-Type: application/json' --header 'Authorization: <ACCESS_TOKEN>' --data ''