Get Document Details
The get-document-details
endpoint allows users to receive meta-data for documents associated to an account number.
Usage
This endpoint leverages filtering, sorting, and paging to refine and organize the results returned by passing parameters in the request body.
Filtering
When no additional parameters are provided in the body, the endpoint returns metadata for all documents associated with account.
- By Account Number: The endpoint will exclusively return document metadata corresponding to the specified account number.
- By Document Type Name: The endpoint to return metadata for all documents of the specified type.
These retrieval options can be combined for more fine-grained results
Paging
Handling large volumes of data is made easier with paging:
- Default Page Size: 25 records. This can be customized by specifying the size attribute in the request body.
- Page Navigation: Use the page attribute in the request body to specify the page number you wish to retrieve.
For responses that contain more records than the size of one page, you will need to make additional requests with the page attribute incremented to access more data.
Document Statuses
The results of this endpoint contain an attribute called status
which shows the current ststus of the document with StoneX.
The below are the possible values in the status
field:
PendingApproval
Approved
Rejected
Sorting
Organize your results with sorting options:
- Default Sorting: Results are sorted by name in ascending order.
- Custom Sorting: Adjust the sorting behavior by including sortBy and sortMode (
ascend
for ascending,descend
for descending) in the request body.
Sort By Values
accountNumber
subNumber
repCode
status
createdDate
Request
- Schema
- Example
Attribute Name | Data Type | Required | Description |
---|---|---|---|
accountNumber | string | ✔️ | StoneX Account Number |
documentTypeName | string | ✔️ | Document Type from get-document-types endpoint |
reference | string | A reference or note related to the document file. | |
page | integer | Page of the results list to return | |
size | integer | Size of the page(s) returned | |
sortBy | string | Sort method of the results returned. Default: createdDate | |
sortMode | string | Sort direction of the results returned (ascend or descend ) |
{
"accountNumber": "71634495",
"documentTypeName": "New accounts Documents",
"reference": "OPTS",
"page": 1,
"size": 500,
"sortBy": "accountNumber",
"sortMode": "Ascend"
}
Response
The data
attribute in the response represents an array of document type objects available for use within the API.
- Schema
- Example
Attribute Name | 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 | Account number that owns the document |
displayName | string | User friendly display name for the document |
createdDate | string - DateTime | Date the document was stored to StoneX |
status | string | Current status of the document with StoneX |
{
"statusCode": 200,
"message": "Request successful.",
"data": [
{
"documentId": "d452afcb-d9d6-4e51-9882-b13300f58acf",
"subNumber": "301",
"repCode": "JC01",
"accountNumber": "13098960",
"displayName": "OPTS Signed Document3",
"createdDate": "2024-03-14T14:53:59.3041418",
"status": "PendingApproval"
},
{
"documentId": "372daea2-9e48-44bd-85df-b13300c23719",
"subNumber": "301",
"repCode": "JC01",
"accountNumber": "13098960",
"displayName": "OPTS Signed Document3",
"createdDate": "2024-03-14T11:47:06.7557795",
"status": "Rejected"
},
{
"documentId": "ed653ba5-7060-4fba-8b65-b13300f2bfa2",
"subNumber": "301",
"repCode": "JC01",
"accountNumber": "13098960",
"displayName": "OPTS Signed Document3",
"createdDate": "2024-03-14T14:43:49.0948054",
"status": "Approved"
},
}
],
"errors": [],
"traceId": "00-77bb46cfa00498ee9ff271b46de46efd-2a21ced70f146551-00",
"hasErrors": false
}