Generate Document
The generate-document
endpoint offers a dynamic way to create documents by mapping provided data onto a template, resulting in a customized, pre-filled PDF document
POST
/account-api/v1/generate-document
Available Document Types for Generation
The below documents are available for generation through this endpoint:
Document Type | Reference | Description |
---|---|---|
New Accounts Documents | CASH | StoneX Customer Account Agreement |
New Accounts Documents | ADOP-simple | IRA Simplifier - Simple |
New Accounts Documents | ADOP-Traditional | IRA Simplifier - Traditional |
New Accounts Documents | ADOP-Roth | IRA Simplifier - Roth |
New Accounts Documents | W9 | IRS Form W9 |
New Accounts Documents | W8BE | IRS Form W-8 BEN |
New Accounts Documents | OPTS | Option Agreement form |
New Accounts Documents | TOD | Transfer Of Death Agreement |
New Accounts Documents | NEWA | New Account Application |
New Accounts Documents | FASF | Foreign Account Section 312 form |
New Accounts Documents | MRGN | Margin agreement document |
Request
- Schema
- Primary Owner
- Associated Party
Attribute | Type | Required | Description |
---|---|---|---|
accountNumber | string | ✔️ | Account number to pull information from to populate the document |
documentTypeName | string | ✔️ | Document Type Name of document to generate |
Reference | string | ✔️ | Document Type Reference of document to generate |
Profiles | string | ✔️ | Document Type Reference used for W8BE associated parties |
{
"accountNumber": "12345678",
"documentTypeName": "New Accounts Documents",
"Reference": "NEWA"
}
{
"accountNumber": "12345678",
"documentTypeName": "New Accounts Documents",
"Reference": "W8BE",
"Profiles":[
"associatedparty-1",
]
}
Response
The response will be a PDF file. Depending on your implementation, you might need to:
- Directly display the PDF in a user interface.
- Prompt the user to download the file.
- Automatically save the file to a predefined location.
Response Headers
Key | Value |
---|---|
Content-Type | application/pdf |