Skip to main content

Get Document Details

The get-document-details endpoint allows users to receive meta-data for documents associated to an account number.

POST
/document-api/v1/get-document-details

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

Attribute NameData TypeRequiredDescription
accountNumberstring✔️StoneX Account Number
documentTypeNamestring✔️Document Type from get-document-types endpoint
referencestringA reference or note related to the document file.
pageintegerPage of the results list to return
sizeintegerSize of the page(s) returned
sortBystringSort method of the results returned. Default: createdDate
sortModestringSort direction of the results returned (ascend or descend)

Response

The data attribute in the response represents an array of document type objects available for use within the API.

Attribute NameData TypeDescription
documentIdstringUnique identifier for the document
subNumberstringSub Number of the account that owns the document
repCodestringRep code of the account that owns the document
accountNumberstringAccount number that owns the document
displayNamestringUser friendly display name for the document
createdDatestring - DateTimeDate the document was stored to StoneX
statusstringCurrent status of the document with StoneX