Download Subscription Agreement
1 min
Download Subscription Agreement
Downloads the signed subscription agreement PDF for an investment. The X-Agreement-Status response header carries the agreement's status.
GET
https://equidefi.io/api/v1/investments/{investmentId}/subscription-agreement
import { writeFile } from "node:fs/promises";
const response = await fetch(
"https://equidefi.io/api/v1/investments/{investmentId}/subscription-agreement",
{
method: "GET",
headers: {
Authorization: `Bearer ${process.env.EQUIDEFI_API_KEY}`,
},
}
);
const status = response.headers.get("x-agreement-status");
const buffer = Buffer.from(await response.arrayBuffer());
await writeFile("subscription-agreement.pdf", buffer);