LegalSuite LegalSuite API Documentation

Connect to a LegalSuite database in a secure environment.

Introduction

LegalSuite is a Windows-based program designed to assist Attorneys in managing their legal practices. It is written in Clarion and .Net and uses the MS SQL database to store the program’s data. It also provides an API to allow 3rd party programs to access the data.

This document serves to explain how to use the LegalSuite API to connect to a LegalSuite database and retrieve data and (optionally) save, update and delete data.

Calls are made to our API at https://api.legalsuite.net/ using an API Key

The API Key serves to not only authenticate the request but also to point the request at a specific LegalSuite Database.

Example
POST https://api.legalsuite.net/matter/get/71017  
Header: 'authorization'='Bearer API Key'  
Response:
{
"data": [{
"recordid": "71017",
"fileref": "0001/0001",
"description": "Kelvin Test",
"clientid": "28787",
"docgenid": "5",
"mattertypeid": "5",
"documentlanguageid": "1",
"employeeid": "69",
...
}]
}


Getting Started

To use the LegalSuite API you will need to be registered as a Developer and recieve a Developer Key. Please contact us to register as a Developer.

This Developer Key is used by the API to identify the Developer. This must be sent in the first request with the LegalSuite Employee's LoginId and Password.

The LegalSuite Employee's LoginId and Password are the same as those used to login to LegalSuite itself.

Example
POST https://api.legalsuite.net/auth
Header : 'authorization'='Developer Key'
Body : 'company'='ACME'
       'login'='Kobus'
       'password'='Password12345'
Response:
{
"apikey": "8jjh70XcSkzVvqOe1...",
"employee": {
"recordid": "1034",
"name": "Kobus",
"loginid": "Kobus Smith",
"email": "kobus@Attorney.co.za",
"suspendedflag": "0",
"supervisorflag": "1",
...
}

If the login is successful, an API Key will be returned in the response.

This API Key is then used in all subsequent queries to the API.

Note: Not all LegalSuite clients allow access to their databases via the API.

To enable access via the API, a LegalSuite client needs to register with the API and grant specific rights to each Developer.

See Registering a Client below.


Postman

Postman is a free to use 3rd Party application that can be used to build and Test API Queries.

We have also built a library of all the API example queries in this documentation for easy access.

Once you have Postman set up, click the Run In Postman button below to add all these queries to the application.

Note: These queries are linked to a demo API key which only has read access test environment.


Retrieving Data

You can retrieve data from the LegalSuite Database by querying a Table or a View

Tables queries provide full CRUD (Create, Read, Update and Delete) functionality, while views only offer read access.

Although the LegalSuite API offers CRUD Functionality, some Developers are only granted Read Access - depending on the scope of their Application.

Retrieve All FileNotes
Example
POST https://api.legalsuite.net/filenote/get
Header: 'authorization'='Bearer API Key'
Response:
{
"data": [{
"recordid": "6615999",
"matterid": "942",
"docfilenoteid": "2",
...
},
{,
"recordid": "6616000",
"matterid": "945",
"docfilenoteid": "5",
...
}]
}
Get a Single FileNote (with RecordID 610024)
Example
POST https://api.legalsuite.net/filenote/get/610024
Header: 'authorization'='Bearer API Key'
Response:
{
"data": [{
"recordid": "610024",
"matterid": "145",
"docfilenoteid": "1",
...
}]
}
Create a New FileNote
Example
POST https://api.legalsuite.net/filenote/store
Header: 'authorization'='Bearer API Key'
Body : 'matterid'='71017'
       'employeeid'='1034'
       'description'='FileNote Description'
       '...'
Response:
{
"data": [{
"recordid": "621111",
"matterid": "71017",
"docfilenoteid": "0",
...
}]
}
Update a FileNote (with the RecordID 621111)
Example
POST https://api.legalsuite.net/filenote/update
Header: 'authorization'='Bearer API Key'
Body : 'recordid'='621111'
       'employeeid'='1011'
       'docfilenoteid'='35'
Response:
{
"data": [{
"recordid": "621111",
"matterid": "71017",
"docfilenoteid": "35",
...
}]
}
Delete a FileNote (with the RecordID 621111)
Example
POST https://api.legalsuite.net/filenote/delete
Header: 'authorization'='Bearer API Key'
Body : 'recordid'='621111'
Response:
{
"data": []
}

Creating SQL Views and retreiving data from Views

The API not only allows you to retrieve data from a View, but also you to create your own SQL Views

This is done by including the view name and SQL Script in the body of the request to : https://api.legalsuite.net/createview

Note: If the view exist, it will be replaced therefore it is important to prefix your Application Name to any Views you create to ensure they do not clash with any existing Views and are also easily identifiable.

Creating a View
Example
POST https://api.legalsuite.net/createview
Header: 'authorization'='Bearer API Key'
Body : viewname:AppNameStageCodeListView
SQL: SELECT
Stage.RecordID,
Stage.Description,
Stage.Code,
StageGroup.Description AS stagegroupdescription,
Stage.StageGroupID
FROM Stage
LEFT JOIN StageGroup ON
Stage.StageGroupID = StageGroup.RecordId
Response:
{
"success": [{
"You may access the view at api.legalsuite.net/AppNameStageCodeListView/get"
}]
}

Once the view is successfully created the API will give you a response with the URL to retrieve data from this view.

All of the customizing you are able to perform on normal tables you are also able to apply to SQL views.

Retrieving data from a View
Example
POST https://api.legalsuite.net/appnamestagecodelistview/get
Header: 'authorization'='Bearer API Key'
Response:
{
"data": [{
{
"recordid": "1",
"description": "Letter of Demand",
"code": "0000",
"stagegroupdescription": "General Collections",
"stagegroupid": "1"
},
{
"recordid": "2",
"description": "Section 57 AOD & consent to Judgment",
"code": "0010",
"stagegroupdescription": "General Collections",
"stagegroupid": "1"
},
...
}]
}

Customizing Queries

API requests can be customized to add additional functionality.

The LegalSuite API comes with many useful Parameters. It contains a lot of native SQL syntax including WHERE clauses and table JOINs.

It also allows you to set Paging parmeters to allowing you to retrieve smaller subsets of data to improve performance.

Field Description Example
start The record position to start from must be used with the length parameter Useful to add paging functionality to the result set, start=0
length How many records to return must be used with the start parameter length=10
getSql Instead of a results set, returns the SQL Query. method:getSql
Count Returns a Count of the result set. method:Count
Example
POST https://api.legalsuite.net/matter/get
Header: 'authorization'='Bearer API Key'
Body: 'start'='0'
       'length'='10'
Response:
{
"data": [{
"recordid": "1",
"fileref": "0001/0001",
"description": "Kelvin Test",
...
},
{
"recordid": "2",
"fileref": "0001/0002",
"description": "Smith vs Jones",
...
},
... (10 records returned)
]
}

Selecting Columns

The API returns a default set of columns when retrieving data from a table.

These are often all that are required, but you can specify the columns returned by using select and addselect.

If you want to add multiple Columns, you may send through an array of Select fields in the URL. EG select[]=matter.fileref, select[]=matter.description

This will return the FileRef and Description records from the Matter Table, we recommend using the paging parameters that can be found under Customizing Queries to receive smaller result sets.

This can be done on any of the select field types, an example of this can be found below.

Field Description Example
select Select specific columns, e.g. fileRef and description - Send this in the body: select[]=matter.fileRef select[]=matter.description
addselect Add additional columns to the default columns - Send this in the body: addselect=employee.name
selectraw To be used when you want to use a function within a Select selectraw=MAX(matter.RecordID)
Example
POST https://api.legalsuite.net/matter/get
Header: 'authorization'='Bearer API Key'
Body: 'addselect:Matter.RecordId'
       'selectraw:Matter.FileRef as MatterFileRef'
       'select:Matter.Description
Response:
{
"data": [{
"recordid": "71017",
"matterfileref": "0001/0001",
"description": "Kelvin Test",
}]
}

Where Clauses

SQL WHERE Clauses are a very powerful feature when using SQL. We are happy to tell you that the API offers this same powerful functionality.

WHERE clauses help users filter down the result sets on all CRUD functionality.

The format of any type of where clause will follow this pattern where=ColumnName,Operator,Value.

To send multiple where clauses in one query we can make use of the array feature, and example can be found below.

Hint: You can always use the Method:toSql to get back your constructed SQL query to check the WHERE clauses you have.

Field Description Example
where adds a sql where clause. where[]=Matter.RecordID,=,17 where[]=Matter.Employee,=,17
orwhere adds a sql or Where clause. orwhere=fileRef,like,1200
wherein adds a sql where In clause. wherein=recordId,17,25,32
wherenull adds a sql or Where clause. wherenull=matter.description
orwhere adds a sql orWhere clause. orwhere=fileRef,like,1200
whereraw To be used when you want to use a function within a where. whereraw=MAX(Matter.RecordID)
whereBetween To be used when you want to use a function within a where. wherebetween=recordId,1000,1200
Example
POST https://api.legalsuite.net/matter/get
Header: 'authorization'='Bearer API Key'
Body: 'select:Matter.RecordId'
       'select:Matter.FileRef'
       'select:Matter.Description
       'where[]:Matter.EmployeeID,=,8'
       'where[]:Matter.FileRef,like,ACO1%'
Response:
{
"data": [{
"recordid": "61810",
"fileref": "ACO1/0003",
"description": "No Description"
},
{
"recordid": "61811",
"fileref": "ACO1/0004",
"description": "No Description"
}]
}

Ordering and Grouping

The API also allows you to ORDER BY or GROUP BY your result set.

The ORDER BY is used to sort the result-set in ascending or descending order. The ORDER BY keyword sorts the records in ascending order by default. To sort the records in descending order, use the DESC keyword.

GROUP BY is also supported by the API and can be used to arrange identical data into groups

Field Description Example
orderby Provides a Sql OrderBy Functionality orderby=matter.fileRef,DESC
orderbyraw Provides a Sql OrderBy when wanting to use a SQL Function orderbyraw=MAX(CustomTable.RecordID),DESC
groupby Provides a Sql GroupBy Clause groupby=Matter.DateInstructed
Example
POST https://api.legalsuite.net/matter/get
Header: 'authorization'='Bearer API Key'
Body: 'orderby:Matter.FileRef,desc'
Response:
{
"data": [{
"fileref": "0001/0001",
"name": "Jennifer Daly",
"recordid": "74249",
"matterid": "71017",
"employeeid": "23",
"date": "80460",
"time": "4521774"
}]
}

Registering as a Developer

To register as a developer for the API you need to contact our admins at tech@LegalSuite.co.za


How to get Matter FileRefs

As part of uploading documents to our document log, a file reference (fileref) will need to be added as a parameter.

Use this example to fetch a list of all File References and descriptions.

Example
POST https://api.legalsuite.net/utils/matters/get
Header: 'authorization'='Developer API Key'
Body: companycode":acme01

Uploading Documents

The Legalsuite API allows you upload documents to existing matters by adding them to the document log.

These documents are then easily accessible on the LegalSuite Apps for Clients to view

Example
POST https://api.legalsuite.net/utils/documents/upload
Header: 'authorization'='Developer API Key'
Body: fileref:0001/0001
companycode":acme01
description":Uploading Document to Cloud
filename:TestDoc.docx
filecontents:{MetaData of File Contents}

Database Structure

To gain a more indepth understanding of the LegalSuite Database Structure you can find a document explaining the core relationships here


Exporting Collections Matters

Debt collection often involves recovering debts from a large number of Debtors for a particular Client. Manually capturing these Matters in the LegalSuite program can be an onerous and time-consuming task for the LegalSuite user. In many cases, however, the basic data required to open each file is available in the client's database or credit control system.

To automate the process of handing over bulk Matters for Debt Collection, LegalSuite has a feature that allows a third party to send data to an attorney which is then imported into the LegalSuite database.

The process involves the third party exporting the debtor information from their system to the LegalSuite API, where it becomes available for a LegalSuite user to view and then import into the LegalSuite program. Once imported, the user can inspect the data, add any additional information that may be required, and start the debt collection process.

This can be of great benefit if a client has numerous delinquent debtors that need to be handed over. It not only avoids the onerous task of taking on each Matter manually, but also avoids data-capturing errors and ensures the debt collection process can be initiated much sooner.

Exporting the Data

The data must be sent in an XML format.

The XML data will be validated against an XSD before it is imported into the LegalSuite system. The XSD file can be downloaded from matters.xsd.

If the XML data does not conform to the rules contained in the XSD, it will be rejected. You should always validate your XML against the XSD before exporting it. You can do this programmatically or use an online tool such as XML Validator.

An example of a valid XML file can be downloaded from matters.xml.

Notes:

  • The XSD has comments (annotations) to indicate which fields are compulsory (indicated by minOccurs="1") and what data is expected in each field.
  • Any elements in the XML must appear in the sequence as specified in the XSD, i.e. one after each other in the sequence specified in the XSD.
  • All dates must be in the YYYY-MM-DD format.

The Basic Structure of the XML

The XML contains a <matters> element that wraps the entire XML.

The <matters> element has two important header elements: <clientCode> and <employeeCode> which are described below.

Inside the <matters> element, there can be multiple <matter> elements which contain the basic details of each delinquent account (a Matter on the LegalSuite system), such as the description, your reference, the amount outstanding etc.

Each <matter> element must have at least one <party> child element.

If the <role> of the <party> element is set to "Defendant", it should contain the debtor's personal information, such as their name, address, language and entity (e.g. male, female or business).

You can specify the Plaintiff by adding another <party> element with the <role> set to "Plaintiff", but in most cases, the Plaintiff is the Client. If a Plaintiff is not specified, the Client will be the Plaintiff on each Matter.

Each <party> element can have one or more <contact> child elements which provide the contact information for each Party such as their phone numbers and email address.

Each <matter> element can optionally include <doclog> and <filenote> child elements for attaching documents and notes to the matter.

Basic Structure
<matters>
<clientCode>FIN1</clientCode>
<employeeCode>JD</employeeCode>
<matter>
<description>...</description>
<reference>...</reference>
<claimAmount>...</claimAmount>
<party>
<role>Defendant</role>
<name>Jones</name>
<contact>
  <type>Mobile</type>
  <value>0827863452</value>
</contact>
</party>
<doclog>...</doclog>
<filenote>...</filenote>
</matter>
</matters>

Matters Element

These two elements in the <matters> element identify the Client and the Employee on the LegalSuite system:

  1. The <clientCode> element is used to identify your company in their Address Book.
  2. The <employeeCode> element is the User on their system who requested the data and who will be notified that the data has been sent so they can import it into their LegalSuite system.

Note: These will be provided to you by the LegalSuite user beforehand.

Matter Element

The <matter> elements represent the basic information of each delinquent account.

Note: You can send an unlimited number of <matter> elements.

Party Element

The <party> element is a child of the <matter> element and represents the Party's personal information. You can have an unlimited number of <party> elements.

Contact Element

A <party> element can contain zero or more <contact> elements which provide the contact information for each Party such as their phone numbers and email address.

DocLog Element

The <doclog> element is a child of the <matter> element and represents documents attached to the matter. You can have an unlimited number of <doclog> elements. This is an optional element.

File Note Element

The <filenote> element is a child of the <matter> element and represents notes logged against the matter. You can have an unlimited number of <filenote> elements. The element contains required fields like employeeId and description, and optional fields such as date, time, internalFlag, and stageId. This is an optional element.

Exporting the Data

Data is exported by sending an HTTP POST request to the following URL:

POST https://api.legalsuite.net/export/matters?companyCode=ACME01

Every firm that uses LegalSuite is assigned a unique company code. The companyCode in the URL identifies the LegalSuite client who is to receive the data. This will be provided to you by the LegalSuite client, or you can get it from our customer support team.

To access the LegalSuite API, you must register as a Developer on our system. Once registered, you will be provided with an API key, which must be sent in the header of the POST request to authenticate you and give you the necessary permissions.

Before exporting the XML, you should validate it against the matters.xsd otherwise it may be rejected by the LegalSuite API. If it is rejected, you can simply fix the XML and send it again.

cURL Example (PHP)
$apiUrl = 'https://api.legalsuite.net/export/matters?companyCode=ACME01';
$httpHeader = [
    'Authorization: <your api key>',
    'Content-Type: application/xml'
];
$xmlData = '<matters>...your XML data goes here...</matters>';
$curl = curl_init();
curl_setopt_array($curl, [
    CURLOPT_URL => $apiUrl,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => '',
    CURLOPT_SSL_VERIFYPEER => false,
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30000,
    CURLOPT_CONNECTTIMEOUT => 30000,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => $xmlData,
    CURLOPT_HTTPHEADER => $httpHeader,
]);
$curlResponse = curl_exec($curl);
if (curl_errno($curl)) {
    $response['errors'] = 'Curl Error No: ' . curl_errno($curl);
    curl_close($curl);
    return $response;
} else {
    $response = json_decode($curlResponse);
}
curl_close($curl);
return json_encode($response);

Testing Your Export

ACME01 is a test company on our system which you can use to test your code. Please contact us if you would like to send some test data to ACME01 and we will give you a clientCode and employeeCode you can use.

If you need any assistance, please contact support at LegalSuite Software and we will be glad to help.

Note: The full document can be downloaded by clicking here.


Importing Fee Notes

The LegalSuite API allows third parties to bulk-import Fee Notes (charges, fees and disbursements) into the LegalSuite system. This eliminates the need for manual capturing and ensures billing data from external systems can be transferred accurately and efficiently.

The process is similar to importing Matters: you export your Fee Note data in XML format, the API validates it against an XSD schema, and once accepted, a LegalSuite user can view and import the data into the LegalSuite program.

Exporting the Data

The data must be sent in an XML format.

The XML data will be validated against an XSD before it is imported into the LegalSuite system. The XSD file can be downloaded from feenotes.xsd.

If the XML data does not conform to the rules contained in the XSD, it will be rejected. You should always validate your XML against the XSD before exporting it. You can do this programmatically or by posting to the validation endpoint.

An example of a valid XML file can be downloaded from feenotes.xml.

Notes:

  • All dates must be in the YYYY-MM-DD format.
  • Elements must appear in the sequence specified in the XSD.
  • Each <feenote> must specify a valid FileReference (the Matter's file reference on the LegalSuite system, e.g. BRA1/0005).
  • The Employee and CostCentre fields reference existing records in the LegalSuite database by their name/description.

The Basic Structure of the XML

The XML contains a <feenotes> root element.

The <feenotes> element has a required <EmailAddress> header element — used for validation and import error notifications.

Inside the <feenotes> element, there can be multiple <feenote> elements, each representing a single fee or disbursement entry.

Fee Note Fields

Field Required Description
FileReferenceYesThe Matter file reference (e.g. BRA1/0005). Used to resolve the MatterID.
DateYesThe date of the fee note in YYYY-MM-DD format.
TypeYesEither Fee or Disbursement.
DescriptionYesA description of the fee or disbursement.
AmountYesThe monetary amount (decimal).
VatRateYesThe VAT rate (decimal).
VatIEYesI = Inclusive, E = Exclusive, F = Free (no VAT).
PostedFlagYesMust be NO.
EmployeeYesThe employee name/ID this fee is allocated to.
CostCentreYesThe cost centre name/ID.
IncomeAccountIf Type=FeeThe income account name (required for Fees).
FeeTypeNoThe fee type (e.g. Normal). Only applicable when Type is Fee.
DisbursementAccountIf Type=DisbursementThe disbursement account name (required for Disbursements).
OnHoldNo0 or 1. Whether the fee note is on hold.
SendToDebtorNo0 or 1. Whether the fee note should be sent to the debtor.
Fee Note Example (Fee)
<feenotes>
<EmailAddress>user@example.com</EmailAddress>
<feenote>
<FileReference>BRA1/0005</FileReference>
<Date>2025-04-16</Date>
<Type>Fee</Type>
<Description>Acknowledgment of Debt</Description>
<Amount>131.63</Amount>
<VatRate>1</VatRate>
<VatIE>E</VatIE>
<PostedFlag>NO</PostedFlag>
<Employee>PK Naidoo</Employee>
<CostCentre>Administration</CostCentre>
<IncomeAccount>Fee Income</IncomeAccount>
<FeeType>Normal</FeeType>
<OnHold>0</OnHold>
<SendToDebtor>1</SendToDebtor>
</feenote>
</feenotes>
Fee Note Example (Disbursement)
<feenotes>
<EmailAddress>user@example.com</EmailAddress>
<feenote>
<FileReference>BRA1/0005</FileReference>
<Date>2025-02-15</Date>
<Type>Disbursement</Type>
<Description>Long distance telephone call</Description>
<Amount>8.90</Amount>
<VatRate>1</VatRate>
<VatIE>E</VatIE>
<PostedFlag>NO</PostedFlag>
<Employee>Jennifer Daly</Employee>
<CostCentre>Administration</CostCentre>
<DisbursementAccount>Fee Income</DisbursementAccount>
<OnHold>0</OnHold>
<SendToDebtor>1</SendToDebtor>
</feenote>
</feenotes>

Sending the Data

Fee Note data is exported by sending an HTTP POST request to:

Export Fee Notes
POST https://api.legalsuite.net/export/feenotes?companyCode=ACME01
Header: 'Authorization'='<your developer api key>'
Content-Type: application/xml
Body: <feenotes>...your XML data...</feenotes>
Response:
{
"result": "Fee Note XML has been posted and stored",
"file": "feenotes-2025-03-15-10-30-00-1710489000000.xml",
"errors": []
}
Validate Only (without storing)

You can validate your XML against the XSD without storing it by posting to the validation endpoint:

Validate Fee Notes XML
POST https://api.legalsuite.net/export/feenotes/validatexml
Content-Type: application/xml
Body: <feenotes>...your XML data...</feenotes>
Response (success):
{
"result": "XML validation succeeded.",
"errors": []
}

Importing File Notes

The LegalSuite API allows third parties to bulk-import File Notes into the LegalSuite system. File Notes are chronological records of activity on a Matter — such as phone calls, emails, meetings and internal memos. Importing these programmatically avoids manual capturing and ensures a complete audit trail is maintained.

The process follows the same pattern as Matter and Fee Note imports: you export your File Note data in XML format, the API validates it against an XSD schema, and once accepted, a LegalSuite user can view and import the data into the LegalSuite program.

Exporting the Data

The data must be sent in an XML format.

The XML data will be validated against an XSD before it is imported into the LegalSuite system. The XSD file can be downloaded from filenotes.xsd.

If the XML data does not conform to the rules contained in the XSD, it will be rejected. You should always validate your XML against the XSD before exporting it.

An example of a valid XML file can be downloaded from filenotes.xml.

Notes:

  • All dates must be in the YYYY-MM-DD format.
  • All times must be in the HH:MM:SS format (24-hour).
  • Elements must appear in the sequence specified in the XSD.
  • Each <filenote> must specify a valid FileReference (the Matter's file reference on the LegalSuite system, e.g. BRA1/0005).
  • The Employee field must match an existing employee name in the LegalSuite database.

The Basic Structure of the XML

The XML contains a <filenotes> root element.

The <filenotes> element has a required <EmailAddress> header element — used for validation and import error notifications.

Inside the <filenotes> element, there can be multiple <filenote> elements, each representing a single file note entry.

File Note Fields

Field Required Description
FileReferenceYesThe Matter file reference (e.g. BRA1/0005). Used to resolve the MatterID.
DateYesThe date of the file note in YYYY-MM-DD format.
DescriptionYesThe content/description of the file note.
EmployeeYesThe name of the employee this file note is allocated to. Must match an existing employee name.
InternalFlagNo0 = visible to client (default), 1 = internal only (not visible to the client).
OriginNoThe origin type: 0 = None, 1 = Email, 2 = Phone, 3 = Meeting, 4 = Other.
TimeNoThe time of the file note in HH:MM:SS format. Defaults to the current time if not specified.
File Note Example
<filenotes>
<EmailAddress>user@example.com</EmailAddress>
<filenote>
<FileReference>BRA1/0005</FileReference>
<Date>2025-03-15</Date>
<Description>Telephonic consultation with client regarding outstanding balance.</Description>
<Employee>Jennifer Daly</Employee>
<InternalFlag>0</InternalFlag>
<Origin>2</Origin>
<Time>09:30:00</Time>
</filenote>
<filenote>
<FileReference>BRA1/0005</FileReference>
<Date>2025-04-10</Date>
<Description>Court date set for 15 May 2025.</Description>
<Employee>Wanda Zurcher</Employee>
</filenote>
</filenotes>
Internal File Note Example
<filenotes>
<EmailAddress>user@example.com</EmailAddress>
<filenote>
<FileReference>BRA1/0005</FileReference>
<Date>2025-04-02</Date>
<Description>Internal review of case strategy.</Description>
<Employee>Jennifer Daly</Employee>
<InternalFlag>1</InternalFlag>
<Origin>3</Origin>
<Time>10:00:00</Time>
</filenote>
</filenotes>

Sending the Data

File Note data is exported by sending an HTTP POST request to:

Export File Notes
POST https://api.legalsuite.net/export/filenotes?companyCode=ACME01
Header: 'Authorization'='<your developer api key>'
Content-Type: application/xml
Body: <filenotes>...your XML data...</filenotes>
Response:
{
"result": "File Note XML has been posted and stored",
"file": "filenotes-2025-03-15-10-30-00-1710489000000.xml",
"errors": []
}
Validate Only (without storing)

You can validate your XML against the XSD without storing it by posting to the validation endpoint:

Validate File Notes XML
POST https://api.legalsuite.net/export/filenotes/validatexml
Content-Type: application/xml
Body: <filenotes>...your XML data...</filenotes>
Response (success):
{
"result": "XML validation succeeded.",
"errors": []
}
cURL Example (PHP)
$apiUrl = 'https://api.legalsuite.net/export/filenotes?companyCode=ACME01';
$httpHeader = [
    'Authorization: <your api key>',
    'Content-Type: application/xml'
];
$xmlData = '<filenotes>...your XML data goes here...</filenotes>';
$curl = curl_init();
curl_setopt_array($curl, [
    CURLOPT_URL => $apiUrl,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_SSL_VERIFYPEER => false,
    CURLOPT_TIMEOUT => 30000,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => $xmlData,
    CURLOPT_HTTPHEADER => $httpHeader,
]);
$curlResponse = curl_exec($curl);
$response = json_decode($curlResponse);
curl_close($curl);
return json_encode($response);