Add Document
The add-document endpoint gives users the ability to upload documents to our platform and securely store them to specific account numbers and document types.
POST
/account-api/v1/add-document
File Restrictions
The below restrictions are placed on the file that is being uploaded to the API:
- Maximum File Size
10 MB
- Allowed File Types:
.pdf
,.jpg
,.jpeg
,.bmp
,.png
,.tiff
,.tif
Request
Request Headers
Key | Value |
---|---|
Content-Type | multipart/form-data |
Request Body
To upload a document, your request should include form data with the following attributes:
- Schema
- Example
Attribute | Type | Required | Description |
---|---|---|---|
documentTypeName | text | ✔️ | The type of document being uploaded. |
reference | text | ✔️ | A reference or note related to the document file. |
accountNumber | text | ✔️ | The account number associated with the document. |
comments | text | Information for user's reference. | |
displayName | text | Information that will be displayed for reference. | |
file | file | ✔️ | The document file to upload.* |
curl --location 'https://api.clearing.test.stonex.com/document-api/v1/add-document' \
--header 'Content-Type: multipart/form-data' \
--header 'Authorization: <YOUR_BEARER_TOKEN>' \
--form 'documentTypeName="New Accounts Documents"' \
--form 'reference="NEWA"'\
--form 'accountNumber="35802374"' \
--form 'comments="PDF file"' \
--form 'displayName="Test for PDF file"' \
--form 'file=@"TEST DOCUMENT.pdf"' \
Response
The data
attribute of the JSON response contains details about the uploaded document:
- Schema
- Example
Attribute | Data Type | Description |
---|---|---|
documentId | string | Unique identifier for the document. |
subNumber | string | Sub Number of the account that owns the document |
repCode | string | Rep code of the account that owns the document |
accountNumber | string | The account number associated with the document. |
displayName | string | Information that will be displayed for reference. |
createdDate | string | Date the document was stored to StoneX. |
updatedDate | string | Date the document was updated to StoneX. |
status | string | The approval status of the document is stored in StoneX. |
{
"documentId": "a1abd72e-2f06-4ee9-8f94-b1b600f2223f",
"subNumber": "301",
"repCode": "JC01",
"accountNumber": "71634495",
"displayName": "Example Document",
"createdDate": "07/23/2024 14:41:34",
"updatedDate": "",
"status": "PendingApproval"
},