POST

/Document/File

Usage Notes

When

  • Upload file content for existing document
  • Attach file to document metadata record

Requirements

  • Document record must exist
  • Supported file types: PDF, DOCX, XLSX, CSV, PNG, JPG

Notes

  • MIME type validation on upload
  • Secure storage with access controls

Description

Uploads file content for an existing document record. Validates file type and stores securely.

Required Headers - See Authentication

HeaderValueDescription
Content-Typemultipart/form-dataRequest content type for file uploads
Authorization{accessToken}Bearer token for API access
Version2.0API version identifier

Request Body (multipart/form-data)

Parameter Type Required Description
DocumentID >
integer
The native 7G identifier for the document record to upload file content to.
ExternalDocumentId >
string
Your external system identifier for the document record to upload file content to.
ProductID >
integer
The product identifier for document validation. Used to verify document exists within the specified product scope before file upload.
ExternalProductId >
string
Your external product identifier. Alternative to ProductID for product-scoped document validation.
file >
binary
The binary file content to upload. Supports various formats depending on document type and system configuration (Document, Image, Import categories).
DocumentID
integer
The native 7G identifier for the document record to upload file content to.
ExternalDocumentId
string
Your external system identifier for the document record to upload file content to.
ProductID
integer
The product identifier for document validation. Used to verify document exists within the specified product scope before file upload.
ExternalProductId
string
Your external product identifier. Alternative to ProductID for product-scoped document validation.
file
binary
The binary file content to upload. Supports various formats depending on document type and system configuration (Document, Image, Import categories).

Example Requests

bash
# Upload file to document by native IDs
curl -X POST 'https://api.7g.com.au/Document/File' \
  -H 'Authorization: {accessToken}' \
  -H 'Version: 2.0' \
  -F 'ProductID=100' \
  -F 'DocumentID=12345' \
  -F 'file=@/path/to/investor_statement.pdf'

# Upload file to document by external IDs
curl -X POST 'https://api.7g.com.au/Document/File' \
  -H 'Authorization: {accessToken}' \
  -H 'Version: 2.0' \
  -F 'ExternalProductId=GROWTH_FUND_AU' \
  -F 'ExternalDocumentId=INV-STMT-2024-001' \
  -F 'file=@/path/to/compliance_document.pdf'

Response Examples

json
{
  "result": true,
  "message": "File uploaded successfully",
  "recordCount": 1,
  "data": {
    "documentID": 12345,
    "externalDocumentId": null,
    "documentTypeID": 1,
    "name": "Investor Statement Q4 2024",
    "code": "INV-STMT-Q4-2024",
    "description": "Quarterly investment statement",
    "password": null,
    "ordinal": 1,
    "productID": 100,
    "externalProductId": null,
    "bizEntityID": 5678,
    "externalBizEntityId": null,
    "organisationID": null,
    "externalOrganisationId": null,
    "showInDocumentsInPortal": true,
    "isPublic": false
  }
}