RFIs
Upload files to a document item
Answer a document item by uploading its files as multipart/form-data. One call can carry several, because one thing asked for may be several files.
Uploading adds to the set; it never replaces it. A second upload leaves the first file in place.
POST
/
v1
/
rfis
/
{rfi_id}
/
items
/
{item_id}
/
documents
Upload files to a document item
curl --request POST \
--url https://api.balampay.com/sandbox/v1/rfis/{rfi_id}/items/{item_id}/documents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--header 'x-api-key: <api-key>' \
--form 'files=<string>' \
--form files.items='@example-file'import requests
url = "https://api.balampay.com/sandbox/v1/rfis/{rfi_id}/items/{item_id}/documents"
files = { "files.items": ("example-file", open("example-file", "rb")) }
payload = { "files": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"x-api-key": "<api-key>"
}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('files', '<string>');
form.append('files.items', '{
"fileName": "example-file"
}');
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'x-api-key': '<api-key>'}
};
options.body = form;
fetch('https://api.balampay.com/sandbox/v1/rfis/{rfi_id}/items/{item_id}/documents', 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://api.balampay.com/sandbox/v1/rfis/{rfi_id}/items/{item_id}/documents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files.items\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data",
"x-api-key: <api-key>"
],
]);
$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://api.balampay.com/sandbox/v1/rfis/{rfi_id}/items/{item_id}/documents"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files.items\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.balampay.com/sandbox/v1/rfis/{rfi_id}/items/{item_id}/documents")
.header("Authorization", "Bearer <token>")
.header("x-api-key", "<api-key>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files.items\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.balampay.com/sandbox/v1/rfis/{rfi_id}/items/{item_id}/documents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["x-api-key"] = '<api-key>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files.items\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"item": {
"item_id": "1a2b3c4d-5e6f-4708-9a1b-2c3d4e5f6a7b",
"ordinal": 1,
"prompt": "Upload the certificate of good standing issued in the last 90 days.",
"answer_type": "document",
"answer_spec": {
"max_files": 3
},
"target_key": null,
"subject": null,
"status": "answered",
"answer_value": null,
"documents": [
{
"document_id": "9f8e7d6c-5b4a-4321-8765-4321fedcba98",
"file_name": "certificate-of-good-standing.pdf",
"mime_type": "application/pdf",
"size_bytes": 184320,
"checksum": "9f2b1c4e8a6d3f705b1e9c8d7a6f5e4d3c2b1a0908f7e6d5c4b3a2918070605",
"uploaded_at": "2026-09-02T09:15:00.000Z"
}
],
"review_note": null,
"updated_at": "2026-09-02T09:15:00.000Z",
"returned_at": null
}
}{
"code": "validation_error",
"message": "Invalid request body"
}{
"code": "invalid_request",
"message": "The request could not be authenticated. Check the x-api-key and Authorization headers."
}{
"code": "not_found",
"message": "RFI not found"
}{
"code": "conflict",
"message": "This RFI is closed and no longer accepts answers"
}{
"code": "unprocessable",
"message": "The answer does not satisfy the item's answer_spec"
}Headers
Version applied to this request. It wins over your account's pinned version — see Versioning.
Example:
"2026-06-01"
Path Parameters
RFI UUID.
Item UUID. The item must be a document item of this RFI.
Body
multipart/form-data
One or more files. Repeat the field per file.
Response
The files were stored.
One thing being asked for. The addressable unit of an RFI — a PATCH or a document upload always names an item_id, never the parent RFI.
Show child attributes
Show child attributes
⌘I
Upload files to a document item
curl --request POST \
--url https://api.balampay.com/sandbox/v1/rfis/{rfi_id}/items/{item_id}/documents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--header 'x-api-key: <api-key>' \
--form 'files=<string>' \
--form files.items='@example-file'import requests
url = "https://api.balampay.com/sandbox/v1/rfis/{rfi_id}/items/{item_id}/documents"
files = { "files.items": ("example-file", open("example-file", "rb")) }
payload = { "files": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"x-api-key": "<api-key>"
}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('files', '<string>');
form.append('files.items', '{
"fileName": "example-file"
}');
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'x-api-key': '<api-key>'}
};
options.body = form;
fetch('https://api.balampay.com/sandbox/v1/rfis/{rfi_id}/items/{item_id}/documents', 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://api.balampay.com/sandbox/v1/rfis/{rfi_id}/items/{item_id}/documents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files.items\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data",
"x-api-key: <api-key>"
],
]);
$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://api.balampay.com/sandbox/v1/rfis/{rfi_id}/items/{item_id}/documents"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files.items\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.balampay.com/sandbox/v1/rfis/{rfi_id}/items/{item_id}/documents")
.header("Authorization", "Bearer <token>")
.header("x-api-key", "<api-key>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files.items\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.balampay.com/sandbox/v1/rfis/{rfi_id}/items/{item_id}/documents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["x-api-key"] = '<api-key>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files.items\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"item": {
"item_id": "1a2b3c4d-5e6f-4708-9a1b-2c3d4e5f6a7b",
"ordinal": 1,
"prompt": "Upload the certificate of good standing issued in the last 90 days.",
"answer_type": "document",
"answer_spec": {
"max_files": 3
},
"target_key": null,
"subject": null,
"status": "answered",
"answer_value": null,
"documents": [
{
"document_id": "9f8e7d6c-5b4a-4321-8765-4321fedcba98",
"file_name": "certificate-of-good-standing.pdf",
"mime_type": "application/pdf",
"size_bytes": 184320,
"checksum": "9f2b1c4e8a6d3f705b1e9c8d7a6f5e4d3c2b1a0908f7e6d5c4b3a2918070605",
"uploaded_at": "2026-09-02T09:15:00.000Z"
}
],
"review_note": null,
"updated_at": "2026-09-02T09:15:00.000Z",
"returned_at": null
}
}{
"code": "validation_error",
"message": "Invalid request body"
}{
"code": "invalid_request",
"message": "The request could not be authenticated. Check the x-api-key and Authorization headers."
}{
"code": "not_found",
"message": "RFI not found"
}{
"code": "conflict",
"message": "This RFI is closed and no longer accepts answers"
}{
"code": "unprocessable",
"message": "The answer does not satisfy the item's answer_spec"
}