Equinox API


TABLE OF CONTENTS

Introduction

We designed the Equinox API to allow for RESTful URI-based interactions with Equinox. We will expand the functionality over time to allow for more complicated and in-depth interactions with Equinox. 

All routes defined in this document must be prefixed with a hostname that corresponds with the server housing the data to be retrieved:

ServerHostname
Mainhttps://www.workanyware.co.uk/products/api
Canadahttps://ca.workanyware.co.uk/products/api
Pacifichttps://pa.workanyware.co.uk/products/api

 

 

Routes and Functionality

HTTP Responses

The API will return different status codes/responses depending on why you can't authenticate with the service. The table below summarises these response codes:

Status  CodeReason  for the response
200OK
400Validation error
401Unauthorised  – Invalid credentials were provided
403Forbidden – Correct username/key combination was entered, but this key has been  marked as invalid and will no longer allow access.
405Method not allowed – Probably incorrect GET or POST
500Internal server error

 

Authentication

Key Generation and Management

The API access is based around the concept of username and API key combinations. A user can generate API keys using their username/password combination. Once generated, a key will allow access to the API indefinitely until the user either deletes the key or marks it as 'inactive'.

 Once a key has been generated, all other routes will be accessible. These will take the standard basic authentication header of email/key combination. The code sample in Appendix B for 'Validate a key' provides context and an example connection to the API. 

Key New

DESCRIPTION

To generate a new key, you must send a POST request to “key/new” with a basic authentication header containing the user's email/password combination. You must send the password as an MD5 hash.

URL STRUCTURE

https://[hostname]/key/new

METHOD

      POST

HEADERS

**Authorization:**    string Base64       [email]:[md5(password)]

PARAMETERS

**name**              string             User string to reference key (optional)

RETURNS

Sample response

{  
          "key": "EG1B954ZWH"
}

 

 

 

EXAMPLE

     C#

using System.Net.Http;
using System.Net.Http.Headers;
using System.Security.Cryptography;

/// <summary>
/// Request the API key from the server based on user email and password, basic example
/// </summary>
/// <param name="userEmail"></param>
/// <param name="password"></param>
/// <returns>string</returns>
public static async Task<string> RequestAPIKey(string userEmail, string password)
{
  string key = null;
  string url = "https://[hostname]/key/new";

  // Auth headers
  MD5 md5Hash = MD5.Create();
  string hashedPassword = Security.GetMd5Hash(md5Hash, password);
  var credentials = Convert.ToBase64String(
          Encoding.ASCII.GetBytes(userEmail + ":" + hashedPassword)
  );

  // Content
  var form = new MultipartFormDataContent();

  using (HttpClient client = new HttpClient())
  {
      client.DefaultRequestHeaders.Accept.Clear();
      client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", credentials);

      // Response
      HttpResponseMessage res = await client.PostAsync(url, form);
      content = await res.Content.ReadAsStringAsync();

      // JSON Serialise
      dynamic obj = JsonConvert.DeserializeObject(content);

      // Handle response
      if (obj.key != null)
      {
          key = obj.key;
      }
  }
  return key;
}

 

Key Validate

DESCRIPTION

We have built a specific end point to check that your freshly generated key (or previously stored key) will correctly allow access to the API.

Send a POST request to “key/validate” which contains a basic authentication header of email/key combination. If the key is valid, a simple “true” will be returned. 

URL STRUCTURE

https://[hostname]/key/validate

METHOD

      POST

HEADERS

**Authorization:**    string Base64       [email]:[key]

RETURNS

Sample response

true

EXAMPLE

     C#

using System.Net.Http;
using System.Net.Http.Headers;
using System.Security.Cryptography;

/// <summary>
/// Validate an API key with the server, basic example
/// </summary>
/// <param name="userEmail"></param>
/// <param name="password"></param>
/// <returns>bool</returns>
public static async Task<bool> ValidateAPIKey(string userEmail, string password)
{
  bool isValidated = false;
  string url = "https://[hostname]/key/validate";

  // Auth headers
  MD5 md5Hash = MD5.Create();
  string hashedPassword = Security.GetMd5Hash(md5Hash, password);
  var credentials = Convert.ToBase64String(
          Encoding.ASCII.GetBytes(userEmail + ":" + hashedPassword)
  );

  // Content
  var form = new MultipartFormDataContent();

  using (HttpClient client = new HttpClient())
  {
      client.DefaultRequestHeaders.Accept.Clear();
      client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", credentials);

      // Response
      HttpResponseMessage res = await client.PostAsync(url, form);
      content = await res.Content.ReadAsStringAsync();

      if (content != "true")
      {
          isValidated = true;
      }
  }
  return isValidated;
}

 

Users

Users All

DESCRIPTION

A specific end point has been built to retrieve all users for the current system.

Send a GET request to “users/all” which contains a basic authentication header of email/key combination. If the key is valid, a JSON formatted response will be returned containing the user information. 

URL STRUCTURE

https://[hostname]/users/all

METHOD

      GET

HEADERS

**Authorization:**    string Base64       [email]:[key]

RETURNS

Sample response

[
  {
      "id": "1622",
      "oldId": null,
      "subscriberId": "1",
      "username": "Wilf",
      "email": "wilf@workanyware.co.uk",
      "secondaryEmail": [
          ""
      ],
      "firstName": "Tom",
      "secondName": "Wilford",
      "subscriberRef": "wal",
      "clientSQL": null,
      "loginCount": "209",
      "lastLogin": "2019-07-06 12:55:59",
      "notes": null,
      "gender": "m",
      "initials": "TW",
      "legalEntity": "1"
  },
  {
      "id": "153",
      "oldId": null,
      "subscriberId": "1",
      "username": "snicholson",
      "email": "samn@workanyware.co.uk",
      "secondaryEmail": [
          ""
      ],
      "firstName": "Sam",
      "secondName": "",
      "subscriberRef": "wal",
      "clientSQL": null,
      "loginCount": "2072",
      "lastLogin": "2019-06-01 13:52:19",
      "notes": null,
      "gender": "m",
      "initials": "",
      "legalEntity": "1"
  }
]

** **

Users – Get Signature

DESCRIPTION

This endpoint retrieves the signature for the currently signed in user.

Send a GET request to “users/get-signature” which contains a basic authentication header of email/key combination. If the key is valid a JSON formatted response will be returned containing the current user’s signature.

URL STRUCTURE

https://[hostname]/users/get-signature

METHOD

      GET

HEADERS

**Authorization:**    string Base64       [email]:[key]

RETURNS

The users signature as embedded image if there is one available.

 

Matter

Matter – Get by document ID

DESCRIPTION

This endpoint retrieves a specific matter by its document ID. 

Send a GET request to “matter/get-by-document-id/” followed by the document ID which contains a basic authentication header of email/key combination. If the key is valid a JSON formatted response will be returned containing all information about the matter associated with the provided document id.

URL STRUCTURE

https://[hostname]/matter/get-by-document-id/{documentId:[0-9]+}

METHOD

      GET

HEADERS

**Authorization:**    string Base64       [email]:[key]

PARAMETERS

**documentId**              integer                  User string to reference key (optional)

RETURNS

{
  "id": "296",
  "oldCode": null,
  "oldId": null,
  "country": "GB",
  "countryName": "United Kingdom",
  "status": {
      "id": "0",
      "name": "Open"
  },
  "matterCode": "000027GB",
  "shortTitle": "Magic \"The Bean\" Beans",
  "longTitle": "Magic \"The Bean\" Beans Sauce",
  "formalTitle": null,
  "clientRef": null,
  "parentage": null,
  "designatedCountries": null,
  "application": {},
  "publication": {},
  "natRegEntry": {},
  "natRegPublication": null,
  "grant": {},
  "priority": {},
  "applicants": [
      {
          "id": "44",
          "oldId": null,
          "type": null,
          "name": "Tom Wilfpp",
          "formalName": "Tom Wilf",
          "formalNameTitle": null,
          "formalNameFirst": null,
          "formalNameMiddle": null,
          "formalNameLast": null,
          "addressName": null,
          "salutation": null,
          "nationality": null,
          "secondaryNationality": null,
          "domicile": null,
          "address": null,
          "street1": null,
          "street2": null,
          "street3": null,
          "city": null,
          "county": null,
          "postcode": null,
          "phone": null,
          "email": null,
          "cc": null,
          "dateOfBirth": null,
          "notes": null,
          "entity": null,
          "active": null,
          "licensee": null,
          "checkedByUserId": null,
          "entityType": "appInv"
      }
  ],
  "inventors": [],
  "licensees": [],
  "associates": [],
  "otherSideClients": [],
  "otherSideSolicitors": [],
  "clientKeyContactId": null,
  "category": {
      "id": "36",
      "definition": "registereddesigns",
      "name": "Registered Designs"
  },
  "subCategory": {
      "id": "1",
      "name": "Registereddesigns - Product Designs",
      "categoryType": "registereddesigns"
  },
  "imageId": "0",
  "typeOfMark": "0",
  "businessUnit": null,
  "expiryDate": null,
  "client": {
      "id": "98",
      "name": "Example Company",
      "orgCode": "EXA",
      "categories": [
          {}
      ],
      "type": {},
      "secondaryType": null,
      "marketSource": "0",
      "marketNotes": null,
      "exportNumber": "",
      "tags": "",
      "extraCareNotes": "",
      "setupDateTime": "2018-11-06 09:29:50",
      "setupByUser": "1782",
      "nominator": "0",
      "modifiedDateTime": null,
      "modifiedByUser": null,
      "hasGeneralPowerAttorney": "0",
      "generalPowerAttorneyStartDate": "0000-00-00",
      "generalPowerAttorneyStartEnd": "0000-00-00",
      "contactChecked": "0",
      "contactCheckedBy": "0",
      "contactCheckedDate": null,
      "linkedMatterId": "162",
      "oldId": null,
      "notes": null,
      "correspondenceNotes": "",
      "organisationGroupId": "0",
      "entityType": "organisation",
      "linkedMatter": null,
      "customFields": []
  },
  "clientId": "98",
  "billingAddress": {
      "id": "86237",
      "organisationId": "98",
      "categories": [
          {
              "name": "Correspondence",
              "id": "1"
          },
          {
              "name": "Visiting",
              "id": "2"
          },
          {
              "name": "Billing",
              "id": "3"
          }
      ],
      "type": null,
      "name": "Example Company",
      "address": "Example Company\r\n13 Placeholder Street\r\nTypical City\r\nSample County",
      "street1": "",
      "street2": "",
      "street3": "",
      "city": "",
      "county": "",
      "postCode": "BU88 73S",
      "country": "GB",
      "website": "",
      "phone": "0122354575",
      "phone2": "0122354575",
      "phone3": null,
      "email": "admin@examplecompany.com",
      "email2": null,
      "email3": null,
      "notes": "",
      "extraCareNotes": "",
      "extraCareNotesColor": "",
      "setupDateTime": "2018-11-06 09:29:50",
      "setupByUser": "1782",
      "modifiedDateTime": "2018-11-06 09:29:50",
      "modifiedByUser": "1782",
      "active": "1",
      "VATNumber": "",
      "badPayer": "0",
      "taxCode": "0",
      "exportCode": "",
      "oldId": null,
      "companyNumber": "",
      "bankAccount": "",
      "matterToSaveInvoicesOn": "0",
      "accountsContactId": "0",
      "entityType": "location",
      "invoiceSettings": null,
      "defaultCurrency": null,
      "customFields": [],
      "addressString": "Example Company<br />\r\n13 Placeholder Street<br />\r\nTypical City<br />\r\nSample County,<br>BU88 73S"
  },
  "billingAddressId": "86237",
  "user": {
      "id": "1782",
      "oldId": null,
      "subscriberId": null,
      "username": "twilf",
      "email": null,
      "secondaryEmail": [],
      "firstName": "Tom",
      "secondName": "Wilford",
      "subscriberRef": null,
      "clientSQL": null,
      "loginCount": null,
      "lastLogin": null,
      "notes": null,
      "gender": null,
      "initials": null,
      "legalEntity": null
  },
  "user2": {
      "id": null,
      "oldId": null,
      "subscriberId": null,
      "username": null,
      "email": null,
      "secondaryEmail": [],
      "firstName": null,
      "secondName": null,
      "subscriberRef": null,
      "clientSQL": null,
      "loginCount": null,
      "lastLogin": null,
      "notes": null,
      "gender": null,
      "initials": null,
      "legalEntity": null
  },
  "user3": {
      "id": null,
      "oldId": null,
      "subscriberId": null,
      "username": null,
      "email": null,
      "secondaryEmail": [],
      "firstName": null,
      "secondName": null,
      "subscriberRef": null,
      "clientSQL": null,
      "loginCount": null,
      "lastLogin": null,
      "notes": null,
      "gender": null,
      "initials": null,
      "legalEntity": null
  },
  "user4": {
      "id": null,
      "oldId": null,
      "subscriberId": null,
      "username": null,
      "email": null,
      "secondaryEmail": [],
      "firstName": null,
      "secondName": null,
      "subscriberRef": null,
      "clientSQL": null,
      "loginCount": null,
      "lastLogin": null,
      "notes": null,
      "gender": null,
      "initials": null,
      "legalEntity": null
  },
  "family": null,
  "office": null,
  "notes": null,
  "familyId": "0",
  "businessGroup": null,
  "internationalRegistrationId": "0",
  "classes": null,
  "goods": null,
  "openDate": "2019-11-05 10:50:25",
  "designatedStates": "",
  "parentMatterId": null,
  "typeId": "7",
  "correspondenceNotes": null,
  "renewalClient": null,
  "renewalClientId": null,
  "renewalBillingAddress": null,
  "renewalBillingAddressId": null,
  "entityType": "matter",
  "legalEntity": "6",
  "allHistoryDates": null,
  "goodsAndClasses": null,
  "associatesLoaded": null,
  "budgets": null,
  "customFields": []
}

** **

Matter – Get by mattercode

DESCRIPTION

This endpoint retrieves a matter by its mattercode.

Send a GET request to “matter/get-by-mattercode/” followed by the reference for the matter number in Equinox which contains a basic authentication header of email/key combination. If the key is valid a JSON formatted response will be returned containing all information about the requested matter.

URL STRUCTURE

https://[hostname]/matter/get-by-mattercode/{matterCode}

METHOD

      GET

HEADERS

**Authorization:**    string Base64       [email]:[key]

PARAMETERS

**matterCode**              string             Reference code for matter in Equinox

RETURNS

               See sample response under “Matter – Get By Document ID”.

 

Matter – Search by mattercode

DESCRIPTION

This endpoint searches for a given number of cases using a partial reference for the mattercode.

Send a GET request to “matter/search-by-mattercode/” followed by the string to be searched and the amount of results you’d like to see, containing a basic authentication header of email/key combination. If the key is valid a JSON formatted response will be returned containing details about each matter that matches the search criteria.

 

URL STRUCTURE

https://[hostname]/matter/get-by-mattercode/{searchTerm}/{matterCount}

METHOD

      GET

HEADERS

**Authorization:**    string Base64       [email]:[key]

PARAMETERS

**searchTerm**              string             String to search

**matterCount**             string             Number of results to be returned

RETURNS

Sample response

[
  {
      "id": "65",
      "oldCode": null,
      "oldId": null,
      "country": "GB",
      "countryName": "United Kingdom",
      "status": {
          "id": "8",
          "name": "Pending"
      },
      "matterCode": "000014GB",
      "shortTitle": "Back scratcher",
      "longTitle": "Back scratcher",
      "formalTitle": "",
      "clientRef": null,
      "parentage": null,
      "designatedCountries": null,
      "application": {},
      "publication": {},
      "natRegEntry": {},
      "natRegPublication": null,
      "grant": {},
      "priority": {},
      "applicants": [],
      "inventors": [],
      "licensees": [],
      "associates": [],
      "otherSideClients": [],
      "otherSideSolicitors": [],
      "clientKeyContactId": null,
      "category": {
          "id": "33",
          "definition": "patent",
          "name": "Patents"
      },
      "subCategory": {
          "id": "1",
          "name": "Patent - Concept",
          "categoryType": "patent"
      },
      "imageId": "0",
      "typeOfMark": "0",
      "businessUnit": null,
      "expiryDate": null,
      "client": null,
      "clientId": "27",
      "billingAddress": null,
      "billingAddressId": "0",
      "user": {
          "id": "1776",
          "oldId": null,
          "subscriberId": null,
          "username": "Josh",
          "email": null,
          "secondaryEmail": [],
          "firstName": "Josh",
          "secondName": "Lyell",
          "subscriberRef": null,
          "clientSQL": null,
          "loginCount": null,
          "lastLogin": null,
          "notes": null,
          "gender": null,
          "initials": null,
          "legalEntity": null
      },
      "user2": {
          "id": null,
          "oldId": null,
          "subscriberId": null,
          "username": null,
          "email": null,
          "secondaryEmail": [],
          "firstName": null,
          "secondName": null,
          "subscriberRef": null,
          "clientSQL": null,
          "loginCount": null,
          "lastLogin": null,
          "notes": null,
          "gender": null,
          "initials": null,
          "legalEntity": null
      },
      "user3": {
          "id": null,
          "oldId": null,
          "subscriberId": null,
          "username": null,
          "email": null,
          "secondaryEmail": [],
          "firstName": null,
          "secondName": null,
          "subscriberRef": null,
          "clientSQL": null,
          "loginCount": null,
          "lastLogin": null,
          "notes": null,
          "gender": null,
          "initials": null,
          "legalEntity": null
      },
      "user4": {
          "id": null,
          "oldId": null,
          "subscriberId": null,
          "username": null,
          "email": null,
          "secondaryEmail": [],
          "firstName": null,
          "secondName": null,
          "subscriberRef": null,
          "clientSQL": null,
          "loginCount": null,
          "lastLogin": null,
          "notes": null,
          "gender": null,
          "initials": null,
          "legalEntity": null
      },
      "family": null,
      "office": null,
      "notes": null,
      "familyId": "48",
      "businessGroup": null,
      "internationalRegistrationId": "0",
      "classes": null,
      "goods": null,
      "openDate": "2018-08-22 12:19:59",
      "designatedStates": "",
      "parentMatterId": null,
      "typeId": "5",
      "correspondenceNotes": null,
      "renewalClient": null,
      "renewalClientId": null,
      "renewalBillingAddress": null,
      "renewalBillingAddressId": null,
      "entityType": "matter",
      "legalEntity": "1",
      "allHistoryDates": null,
      "goodsAndClasses": null,
      "associatesLoaded": null,
      "budgets": null,
      "customFields": []
  },
  {
      "id": "66",
      "oldCode": null,
      "oldId": null,
      "country": "GB",
      "countryName": "United Kingdom",
      "status": {
          "id": "0",
          "name": "Open"
      },
      "matterCode": "000015GB",
      "shortTitle": "Seraphis Hybrid",
      "longTitle": "Seraphis Hybrid",
      "formalTitle": "",
      "clientRef": null,
      "parentage": null,
      "designatedCountries": null,
      "application": {},
      "publication": {},
      "natRegEntry": {},
      "natRegPublication": null,
      "grant": {},
      "priority": {},
      "applicants": [],
      "inventors": [],
      "licensees": [],
      "associates": [],
      "otherSideClients": [],
      "otherSideSolicitors": [],
      "clientKeyContactId": null,
      "category": {
          "id": "4",
          "definition": null,
          "name": null
      },
      "subCategory": {
          "id": "2",
          "name": "",
          "categoryType": ""
      },
      "imageId": "0",
      "typeOfMark": "0",
      "businessUnit": null,
      "expiryDate": null,
      "client": null,
      "clientId": "27",
      "billingAddress": null,
      "billingAddressId": "0",
      "user": {
          "id": "1776",
          "oldId": null,
          "subscriberId": null,
          "username": "Josh",
          "email": null,
          "secondaryEmail": [],
          "firstName": "Josh",
          "secondName": "Lyell",
          "subscriberRef": null,
          "clientSQL": null,
          "loginCount": null,
          "lastLogin": null,
          "notes": null,
          "gender": null,
          "initials": null,
          "legalEntity": null
      },
      "user2": {
          "id": null,
          "oldId": null,
          "subscriberId": null,
          "username": null,
          "email": null,
          "secondaryEmail": [],
          "firstName": null,
          "secondName": null,
          "subscriberRef": null,
          "clientSQL": null,
          "loginCount": null,
          "lastLogin": null,
          "notes": null,
          "gender": null,
          "initials": null,
          "legalEntity": null
      },
      "user3": {
          "id": null,
          "oldId": null,
          "subscriberId": null,
          "username": null,
          "email": null,
          "secondaryEmail": [],
          "firstName": null,
          "secondName": null,
          "subscriberRef": null,
          "clientSQL": null,
          "loginCount": null,
          "lastLogin": null,
          "notes": null,
          "gender": null,
          "initials": null,
          "legalEntity": null
      },
      "user4": {
          "id": null,
          "oldId": null,
          "subscriberId": null,
          "username": null,
          "email": null,
          "secondaryEmail": [],
          "firstName": null,
          "secondName": null,
          "subscriberRef": null,
          "clientSQL": null,
          "loginCount": null,
          "lastLogin": null,
          "notes": null,
          "gender": null,
          "initials": null,
          "legalEntity": null
      },
      "family": null,
      "office": null,
      "notes": null,
      "familyId": "0",
      "businessGroup": null,
      "internationalRegistrationId": "0",
      "classes": null,
      "goods": null,
      "openDate": "2018-08-24 09:30:03",
      "designatedStates": "",
      "parentMatterId": null,
      "typeId": "0",
      "correspondenceNotes": null,
      "renewalClient": null,
      "renewalClientId": null,
      "renewalBillingAddress": null,
      "renewalBillingAddressId": null,
      "entityType": "matter",
      "legalEntity": "1",
      "allHistoryDates": null,
      "goodsAndClasses": null,
      "associatesLoaded": null,
      "budgets": null,
      "customFields": []
  }
]
   

 

Matter – Search by matter ID

DESCRIPTION

This endpoint searches for a specific case by its internal ID in Equinox.

Send a GET request to “matter/” followed by the internal ID of the matter, containing a basic authentication header of email/key combination. If the key is valid a JSON formatted response will be returned containing details about each matter that matches the search criteria.

 

URL STRUCTURE

https://[hostname]/matter/{matterId:[0-9]+}

METHOD

      GET

HEADERS

**Authorization:**    string Base64       [email]:[key]

PARAMETERS

**matterId**                string             Equinox internal reference for the matter

RETURNS

See sample response under “Matter – Get By Document Id”

 

Matter – Get contacts

DESCRIPTION

This endpoint gets the contact information associated with a case 

Send a GET request to “matter/” followed by internal ID of the matter, containing a basic authentication header of email/key combination. If the key is valid a JSON formatted response will be returned containing details about each matter that matches the search criteria.

 

URL STRUCTURE

https://[hostname]/get-contacts/{matterId:[0-9]+}

METHOD

      GET

HEADERS

**Authorization:**    string Base64       [email]:[key]

PARAMETERS

**matterId**                string             Equinox internal reference for the matter

RETURNS

Sample response:

[
{
  "applicant": [
      {
          "mcid": "201",
          "cid": "44",
          "name": "Tom Wilford",
          "formalname": "Thomas Wilford",
          "address": "",
          "nationality": "GB",
          "email": "twilf@gmail.com",
          "phone": "097328429554",
          "type": "1",
          "cc": null,
          "entity": "Micro"
      }
  ],
  "inventor": [],
  "licensee": [
      {
          "mcid": "204",
          "cid": "663",
          "name": "Ms B Green",
          "formalname": "Bee Green",
          "address": "",
          "nationality": "",
          "email": "",
          "phone": "",
          "type": "0",
          "cc": null,
          "entity": ""
      }
  ],
  "client_correspondence": [],
  "client_billing": [],
  "client_renewal_correspondence": [],
  "client_renewal_billing": [],
  "associate": [],
  "otherside_solicitor": [],
  "otherside_client": []
}
]

** **

 

Matter – Find mattercodes

DESCRIPTION

This endpoint searches for potential Equinox mattercodes in a given string.

Send a GET request to “matter/find-mattercodes/” followed by a string with a mattercode within it (e.g., an email subject line), containing a basic authentication header of email/key combination. If the key is valid a JSON formatted response will be returned containing just the mattercode from the original match string.

 If the string contains a \ or a /, please replace these with the respective bits of text below:   - {BACKSLASH} {FORWARDSLASH} 

URL STRUCTURE

https://[hostname]/matter/find-mattercodes/{matchString}

METHOD

      GET

HEADERS

**Authorization:**    string Base64       [email]:[key]

PARAMETERS

**matchString**             string             A string containing an mattercode

RETURNS

Sample response 

[
[
    "00002"
]
]

** **

 

Matter – Get family matters

DESCRIPTION

This endpoint fetches all the details of family members of the specified case.

Send a GET request to “matter/get-family-matters/” followed by the internal ID of a case in Equinox, containing a basic authentication header of email/key combination. If the key is valid a JSON formatted response will be returned containing the details of other cases in the same family.

 

URL STRUCTURE

https://[hostname]/matter/get-family-matters/{matterId:[0-9]+}

METHOD

      GET

HEADERS

**Authorization:**    string Base64       [email]:[key]

PARAMETERS

**matterId**                string             Equinox internal reference for the matter

RETURNS

Sample response: 

[
{
  "id": "62",
  "subscriberId": null,
  "name": null,
  "abstract": "",
  "members": [
      {
          "id": "300",
          "oldCode": null,
          "oldId": null,
          "country": "GB",
          "countryName": null,
          "status": {
              "id": "0",
              "name": ""
          },
          "matterCode": "000028GB",
          "shortTitle": "Solar Laser",
          "longTitle": null,
          "formalTitle": null,
          "clientRef": null,
          "parentage": null,
          "designatedCountries": null,
          "application": null,
          "publication": null,
          "natRegEntry": null,
          "natRegPublication": null,
          "grant": null,
          "priority": null,
          "applicants": [],
          "inventors": [],
          "licensees": [],
          "associates": [],
          "otherSideClients": [],
          "otherSideSolicitors": [],
          "clientKeyContactId": null,
          "category": {
              "id": 9,
              "definition": "patent",
              "name": "Patent"
          },
          "subCategory": null,
          "imageId": null,
          "typeOfMark": null,
          "businessUnit": null,
          "expiryDate": null,
          "client": null,
          "clientId": null,
          "billingAddress": null,
          "billingAddressId": null,
          "user": null,
          "user2": null,
          "user3": null,
          "user4": null,
          "family": null,
          "office": null,
          "notes": null,
          "familyId": null,
          "businessGroup": null,
          "internationalRegistrationId": null,
          "classes": null,
          "goods": null,
          "openDate": null,
          "designatedStates": null,
          "parentMatterId": null,
          "typeId": null,
          "correspondenceNotes": null,
          "renewalClient": null,
          "renewalClientId": null,
          "renewalBillingAddress": null,
          "renewalBillingAddressId": null,
          "entityType": "matter",
          "legalEntity": null,
          "allHistoryDates": null,
          "goodsAndClasses": null,
          "associatesLoaded": null,
          "budgets": null,
          "customFields": []
      }
  ],
  "memebers": [
      {
          "id": "300",
          "oldCode": null,
          "oldId": null,
          "country": "GB",
          "countryName": null,
          "status": {
              "id": "0",
              "name": ""
          },
          "matterCode": "000028GB",
          "shortTitle": " Solar Laser",
          "longTitle": null,
          "formalTitle": null,
          "clientRef": null,
          "parentage": null,
          "designatedCountries": null,
          "application": null,
          "publication": null,
          "natRegEntry": null,
          "natRegPublication": null,
          "grant": null,
          "priority": null,
          "applicants": [],
          "inventors": [],
          "licensees": [],
          "associates": [],
          "otherSideClients": [],
          "otherSideSolicitors": [],
          "clientKeyContactId": null,
          "category": {
              "id": 9,
              "definition": "patent",
              "name": "Patent"
          },
          "subCategory": null,
          "imageId": null,
          "typeOfMark": null,
          "businessUnit": null,
          "expiryDate": null,
          "client": null,
          "clientId": null,
          "billingAddress": null,
          "billingAddressId": null,
          "user": null,
          "user2": null,
          "user3": null,
          "user4": null,
          "family": null,
          "office": null,
          "notes": null,
          "familyId": null,
          "businessGroup": null,
          "internationalRegistrationId": null,
          "classes": null,
          "goods": null,
          "openDate": null,
          "designatedStates": null,
          "parentMatterId": null,
          "typeId": null,
          "correspondenceNotes": null,
          "renewalClient": null,
          "renewalClientId": null,
          "renewalBillingAddress": null,
          "renewalBillingAddressId": null,
          "entityType": "matter",
          "legalEntity": null,
          "allHistoryDates": null,
          "goodsAndClasses": null,
          "associatesLoaded": null,
          "budgets": null,
          "customFields": []
      }
  ]
}
]

** **

 

Matter – Get linked matters

DESCRIPTION

This endpoint fetches all matters that have been linked with a specific matter.

Send a GET request to “matter/get-linked-matters/” followed the internal ID of a matter in Equinox, containing a basic authentication header of email/key combination. If the key is valid a JSON formatted response will be returned containing the details of other cases that have been linked to the specified one.

 

URL STRUCTURE

https://[hostname]/matter/get-linked-matters/{matterId:[0-9]+}

METHOD

      GET

HEADERS

**Authorization:**    string Base64       [email]:[key]

PARAMETERS

**matterId**                string             Equinox internal reference for the matter

RETURNS

Sample response 

[
  {
      "id": "65",
      "oldCode": null,
      "oldId": null,
      "country": "GB",
      "countryName": null,
      "status": {
          "id": "8",
          "name": ""
      },
      "matterCode": "000014GB",
      "shortTitle": "Back scratcher",
      "longTitle": null,
      "formalTitle": null,
      "clientRef": null,
      "parentage": null,
      "designatedCountries": null,
      "application": null,
      "publication": null,
      "natRegEntry": null,
      "natRegPublication": null,
      "grant": null,
      "priority": null,
      "applicants": [],
      "inventors": [],
      "licensees": [],
      "associates": [],
      "otherSideClients": [],
      "otherSideSolicitors": [],
      "clientKeyContactId": null,
      "category": {
          "id": 9,
          "definition": "patent",
          "name": "Patent"
      },
      "subCategory": null,
      "imageId": null,
      "typeOfMark": null,
      "businessUnit": null,
      "expiryDate": null,
      "client": null,
      "clientId": null,
      "billingAddress": null,
      "billingAddressId": null,
      "user": null,
      "user2": null,
      "user3": null,
      "user4": null,
      "family": null,
      "office": null,
      "notes": null,
      "familyId": null,
      "businessGroup": null,
      "internationalRegistrationId": null,
      "classes": null,
      "goods": null,
      "openDate": null,
      "designatedStates": null,
      "parentMatterId": null,
      "typeId": null,
      "correspondenceNotes": null,
      "renewalClient": null,
      "renewalClientId": null,
      "renewalBillingAddress": null,
      "renewalBillingAddressId": null,
      "entityType": "matter",
      "legalEntity": null,
      "allHistoryDates": null,
      "goodsAndClasses": null,
      "associatesLoaded": null,
      "budgets": null,
      "customFields": []
  }
]

Document

Document – Get primary classifications

DESCRIPTION

This endpoint fetches all primary classifications for the organisation.

Send a GET request to “/document-classifications” containing a basic authentication header of email/key combination. If the key is valid a JSON formatted response will be returned containing the primary classifications for the organisation.

 

URL STRUCTURE

https://[hostname]/document-classifications

METHOD

      GET

HEADERS

**Authorization:**    string Base64       [email]:[key]

RETURNS

Sample response 

[
{
  "15": "Opposition",
  "2": "Authority",
  "1": "Client",
  "4": "Foreign associate",
  "3": "Internal",
  "7": "Other associate",
  "5": "Other side / third party client",
  "6": "Other side / third party solicitor",
  "8": "Renewals"
}
]

** **

 

Document – Get primary classifications for matter

DESCRIPTION

This endpoint fetches all primary classifications that are applicable to the specified matter.

Send a GET request to “/document-classifications-for-matter/” followed by the Equinox’s internal ID of a matter, containing a basic authentication header of email/key combination. If the key is valid a JSON formatted response will be returned containing the primary classifications that are applicable to the matter specified.

 

URL STRUCTURE

https://[hostname]/document-classifications-for-matter/{matterId:[0-9]+}

METHOD

      GET

HEADERS

**Authorization:**    string Base64       [email]:[key]

PARAMETERS

**matterId**                string             Equinox internal reference for the matter

RETURNS

Sample response 

[
{
  "2": "Authority",
  "1": "Client",
  "4": "Foreign associate",
  "3": "Internal",
}
]

** **

 

Document – Get secondary classifications for matter

DESCRIPTION

This endpoint fetches all secondary classifications that are applicable to the specified matter and its current primary classification.

Send a GET request to “/document-classifications-for-matter/” followed by a primary classification ID and Equinox’s internal ID of a matter, containing a basic authentication header of email/key combination. Additionally the results can optionally be filtered to incoming or outgoing specific secondary classifications. If the key is valid a JSON formatted response will be returned containing the primary classifications that are applicable to the matter specified.

 

URL STRUCTURE

https://[hostname]/document-classifications/secondary/{classificationId} [/{filterFor}]

METHOD

      GET

HEADERS

**Authorization:**    string Base64       [email]:[key]

PARAMETERS

**classificationId**        string             Primary doc classification ID 

**matterId**                string             Equinox internal reference for the matter

**filterFor**               string             “incoming” or ”outgoing” (optional)

RETURNS

Sample response 

[
{
  "2": "Authority",
  "1": "Client"
}
]

** **

 

Document – Get by ID

DESCRIPTION

This endpoint fetches a document by its internal ID in Equinox.

Send a GET request to “/document/” followed by the Equinox’s internal ID of the document containing a basic authentication header of email/key combination. If the key is valid a JSON formatted response will be returned containing the requested document.

 

URL STRUCTURE

https://[hostname]/document/{documentId:[0-9]+}

METHOD

      GET

HEADERS

**Authorization:**    string Base64       [email]:[key]

PARAMETERS

**classificationId**        string             Primary doc classification ID 

RETURNS

Sample response 

[
{
  "id": "268",
  "matterId": "296",
  "title": "User Signature Test",
  "filename": "User Signature Test.docx",
  "date": "2019-12-05 00:00:00",
  "fileSize": "22613",
  "setupBy": null,
  "setupDate": null,
  "fileContent": null,
  "incomingDocId": null,
  "publishedStatus": {
      "id": "2"
  },
  "primaryClassification": {
      "id": null,
      "name": "",
      "documentNameString": null,
      "outgoing": null,
      "incoming": null
  },
  "secondaryClassification": {
      "id": null,
      "primaryClassificationId": null,
      "name": null,
      "country": null,
      "category": null,
      "subCategory": null,
      "doubleCheckRequired": null,
      "showInClientPortal": null,
      "documentNameString": null,
      "primaryClassification": null,
      "incoming": null,
      "outgoing": null,
      "epoImportString": null
  },
  "status": "C",
  "instanceId": "0",
  "lockedFromClientAccess": "1",
  "notes": null,
  "templateId": "74",
  "attentionOf": "0",
  "usersForInformation": null,
  "entity": null,
  "entityType": "document",
  "titleAddendum": "",
  "oldId": "0",
  "renewalBatchNumber": null,
  "sender": "",
  "recipient": "",
  "folder": "0",
  "filingStatus": null,
  "modifiedDate": "2019-12-05 17:22:49",
  "modifiedUserId": null,
  "modifiedUser": null,
  "createDate": null,
  "createUserId": null,
  "createUser": null,
  "customFields": [],
  "isCheckedOut": true
}
]

** **

 

Document – Get content by ID

DESCRIPTION

This endpoint retrieves the specified document by its ID.

Send a GET request to “/document/content/” followed by the internal ID of a document in Equinox, containing a basic authentication header of email/key combination. If the key is valid a JSON formatted response will be returned containing the document details. 

 

URL STRUCTURE

https://[hostname]/document/content/{documentId:[0-9]+}

METHOD

      GET

HEADERS

**Authorization:**    string Base64       [email]:[key]

PARAMETERS

**documentId**              string             Equinox internal reference for the doc

RETURNS

            Document download.



Document – Get all documents for matter ID

DESCRIPTION

This endpoint retrieves all documents for matter ID.

Send a GET request to “/document/matter/” followed by the matter ID of a matter in Equinox, containing a basic authentication header of email/key combination. If the key is valid a document will be downloaded as a response.

 

URL STRUCTURE

https://[hostname]/document/matter/{matterId:[0-9]+}

METHOD

      GET

HEADERS

**Authorization:**    string Base64       [email]:[key]

PARAMETERS

**matterId**                string             Equinox internal reference for the matter

RETURNS

Returns all documents for matter. Documents comma separated. This example shows two documents.

{
      "id": "281",
      "matterId": "307",
      "title": "Content Notes Special Characters",
      "filename": "Content Notes Special Characters.pdf",
      "date": "2019-11-12 00:00:00",
      "fileSize": "14373",
      "setupBy": null,
      "setupDate": null,
      "fileContent": null,
      "incomingDocId": null,
      "publishedStatus": {
          "id": "3"
      },
      "primaryClassification": {
          "id": null,
          "name": "",
          "documentNameString": null,
          "outgoing": null,
          "incoming": null
      },
      "secondaryClassification": {
          "id": null,
          "primaryClassificationId": null,
          "name": null,
          "country": null,
          "category": null,
          "subCategory": null,
          "doubleCheckRequired": null,
          "showInClientPortal": null,
          "documentNameString": null,
          "primaryClassification": null,
          "incoming": null,
          "outgoing": null,
          "epoImportString": null
      },
      "status": "C",
      "instanceId": "0",
      "lockedFromClientAccess": "1",
      "notes": null,
      "templateId": "83",
      "attentionOf": "0",
      "usersForInformation": null,
      "entity": null,
      "entityType": "document",
      "titleAddendum": "",
      "oldId": "0",
      "renewalBatchNumber": null,
      "sender": "",
      "recipient": "",
      "folder": "0",
      "filingStatus": null,
      "modifiedDate": "2019-11-12 12:56:29",
      "modifiedUserId": null,
      "modifiedUser": null,
      "createDate": null,
      "createUserId": null,
      "createUser": null,
      "customFields": [],
      "isCheckedOut": false
  },
  {
      "id": "267",
      "matterId": "307",
      "title": "Content Notes Special Characters",
      "filename": "Content Notes Special Characters.pdf",
      "date": "2019-11-01 00:00:00",
      "fileSize": "14350",
      "setupBy": null,
      "setupDate": null,
      "fileContent": null,
      "incomingDocId": null,
      "publishedStatus": {
          "id": "3"
      },
      "primaryClassification": {
          "id": null,
          "name": "",
          "documentNameString": null,
          "outgoing": null,
          "incoming": null
      },
      "secondaryClassification": {
          "id": null,
          "primaryClassificationId": null,
          "name": null,
          "country": null,
          "category": null,
          "subCategory": null,
          "doubleCheckRequired": null,
          "showInClientPortal": null,
          "documentNameString": null,
          "primaryClassification": null,
          "incoming": null,
          "outgoing": null,
          "epoImportString": null
      },
      "status": "C",
      "instanceId": "0",
      "lockedFromClientAccess": "1",
      "notes": null,
      "templateId": "83",
      "attentionOf": "0",
      "usersForInformation": null,
      "entity": null,
      "entityType": "document",
      "titleAddendum": "",
      "oldId": "0",
      "renewalBatchNumber": null,
      "sender": "",
      "recipient": "",
      "folder": "0",
      "filingStatus": null,
      "modifiedDate": "2019-11-01 11:27:51",
      "modifiedUserId": null,
      "modifiedUser": null,
      "createDate": null,
      "createUserId": null,
      "createUser": null,
      "customFields": [],
      "isCheckedOut": false
  }

** **

 

Document – Get all documents for matter ID with extension

DESCRIPTION

This endpoint retrieves all documents for matter ID of a specified extension.

Send a GET request to “/document/matter/” followed by the matter ID of a matter in Equinox, a slash, then the extension. This extension must not be in quotes. A basic authentication header of email/key combination is required. If the key is valid a document will be downloaded as a response

 

URL STRUCTURE

https://[hostname]/document/matter/{matterId:[0-9]+}/{extension}

METHOD

      GET

HEADERS

**Authorization:**    string Base64       [email]:[key]

PARAMETERS

**matterId**                string             Equinox internal reference for the matter

**extension**string File extension (doc, pdf, txt)

RETURNS

Returns all documents for matter. Documents comma separated. This example shows two documents.

{
      "id": "281",
      "matterId": "307",
      "title": "Content Notes Special Characters",
      "filename": "Content Notes Special Characters.pdf",
      "date": "2019-11-12 00:00:00",
      "fileSize": "14373",
      "setupBy": null,
      "setupDate": null,
      "fileContent": null,
      "incomingDocId": null,
      "publishedStatus": {
          "id": "3"
      },
      "primaryClassification": {
          "id": null,
          "name": "",
          "documentNameString": null,
          "outgoing": null,
          "incoming": null
      },
      "secondaryClassification": {
          "id": null,
          "primaryClassificationId": null,
          "name": null,
          "country": null,
          "category": null,
          "subCategory": null,
          "doubleCheckRequired": null,
          "showInClientPortal": null,
          "documentNameString": null,
          "primaryClassification": null,
          "incoming": null,
          "outgoing": null,
          "epoImportString": null
      },
      "status": "C",
      "instanceId": "0",
      "lockedFromClientAccess": "1",
      "notes": null,
      "templateId": "83",
      "attentionOf": "0",
      "usersForInformation": null,
      "entity": null,
      "entityType": "document",
      "titleAddendum": "",
      "oldId": "0",
      "renewalBatchNumber": null,
      "sender": "",
      "recipient": "",
      "folder": "0",
      "filingStatus": null,
      "modifiedDate": "2019-11-12 12:56:29",
      "modifiedUserId": null,
      "modifiedUser": null,
      "createDate": null,
      "createUserId": null,
      "createUser": null,
      "customFields": [],
      "isCheckedOut": false
  },
  {
      "id": "267",
      "matterId": "307",
      "title": "Content Notes Special Characters",
      "filename": "Content Notes Special Characters.pdf",
      "date": "2019-11-01 00:00:00",
      "fileSize": "14350",
      "setupBy": null,
      "setupDate": null,
      "fileContent": null,
      "incomingDocId": null,
      "publishedStatus": {
          "id": "3"
      },
      "primaryClassification": {
          "id": null,
          "name": "",
          "documentNameString": null,
          "outgoing": null,
          "incoming": null
      },
      "secondaryClassification": {
          "id": null,
          "primaryClassificationId": null,
          "name": null,
          "country": null,
          "category": null,
          "subCategory": null,
          "doubleCheckRequired": null,
          "showInClientPortal": null,
          "documentNameString": null,
          "primaryClassification": null,
          "incoming": null,
          "outgoing": null,
          "epoImportString": null
      },
      "status": "C",
      "instanceId": "0",
      "lockedFromClientAccess": "1",
      "notes": null,
      "templateId": "83",
      "attentionOf": "0",
      "usersForInformation": null,
      "entity": null,
      "entityType": "document",
      "titleAddendum": "",
      "oldId": "0",
      "renewalBatchNumber": null,
      "sender": "",
      "recipient": "",
      "folder": "0",
      "filingStatus": null,
      "modifiedDate": "2019-11-01 11:27:51",
      "modifiedUserId": null,
      "modifiedUser": null,
      "createDate": null,
      "createUserId": null,
      "createUser": null,
      "customFields": [],
      "isCheckedOut": false
  }

** **

 

Document – Update document

DESCRIPTION

This endpoint retrieves all documents for matter ID of a specified extension.

Send a GET request to “/document/update/” followed by the document ID and basic authentication header of email/key combination. If the key is valid a document will be downloaded as a response.

 

URL STRUCTURE

https://[hostname]/document/update/{documentId}

METHOD

      POST

HEADERS

**Authorization:**    string Base64       [email]:[key]

PARAMETERS

**documentId**              string       GET - Equinox internal document reference

**file**                    binary       *File to be uploaded (Required)

**title**                   string       Title of the document

**addendum**                string       String to add to a pre-determined classification 

**primary-classification**  int          Primary Classification Id

**secondary-classification** int         Secondary Classification Id

**notes**                   string       Notes field

**status**                  string        (U =Unread, O = Outstanding, C = Complete)

**attention-of**            int          User ID of document for attention of

**matter-id**               string        Matter ID document belongs to

**date**                    string        Date of the document

**published-status**        string        Published status of the document

**filing-status**           string        Filing status of the document

**sender**                  string        Name of the sender 

**recipient**               string        Name of the recipient

RETURNS

Returns Document ID as string if successful.

“282”

 

 

Document – Add document

DESCRIPTION

This endpoint adds a new document to the matter Id specified

Send a POST request to “/document/new” and basic authentication header of email/key combination is required. If the key is valid a document will be downloaded as a response. A binary header including the file to be uploaded is required.

 

URL STRUCTURE

https://[hostname]/document/new

METHOD

      POST

HEADERS

**Authorization:**    string Base64       [email]:[key]

PARAMETERS

**file**                    binary       File to be uploaded* (Required)

**title**                   string       Title of the document**

**addendum**                string       String to add to pre-determined classification** 

**primary-classification**  int          Primary Classification Id**

**secondary-classification** int         Secondary Classification Id**

**notes**                   string       Notes field

**status**                  string        (U =Unread, O = Outstanding, C = Complete)

**attention-of**            int          User ID of document for attention of

**matter-id**               string        Matter ID document belongs to*

**date**                    string        Date of the document

**published-status**        string        Published status of the document

**filing-status**           string        Filing status of the document

**sender**                  string        Name of the sender 

**recipient**               string        Name of the recipient

      *These fields are mandatory

      **Under certain system configurations these fields are mandatory.

RETURNS

Returns the new Document ID as string if successful.

“286”

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Document – Check-out

DESCRIPTION

This endpoint checks out the document with the ID specified.

Send a GET request to “/document/check-out/” with the document ID. A basic authentication header of email/key combination is required. If the key is valid a document will be downloaded as a response. A binary header including the file to be uploaded is required.

 

URL STRUCTURE

https://[hostname]/document/check-out/{documentId:[0-9]+}

METHOD

      GET

HEADERS

**Authorization:**    string Base64       [email]:[key]

PARAMETERS

**documentId**              int          Document ID to be checked out

      *These fields are mandatory

      **Under certain system configurations these fields are mandatory.

RETURNS

Returns the new document checked-out

{
  "id": "281",
  "matterId": "307",
  "title": "Content Notes Special Characters",
  "filename": "Content Notes Special Characters.docx",
  "date": "2019-11-12 00:00:00",
  "fileSize": "14373",
  "setupBy": null,
  "setupDate": null,
  "fileContent": null,
  "incomingDocId": null,
  "publishedStatus": {
      "id": "2"
  },
  "primaryClassification": {
      "id": "0",
      "name": "",
      "documentNameString": null,
      "outgoing": null,
      "incoming": null
  },
  "secondaryClassification": {
      "id": "0",
      "primaryClassificationId": null,
      "name": null,
      "country": null,
      "category": null,
      "subCategory": null,
      "doubleCheckRequired": null,
      "showInClientPortal": null,
      "documentNameString": null,
      "primaryClassification": null,
      "incoming": null,
      "outgoing": null,
      "epoImportString": null
  },
  "status": "C",
  "instanceId": "0",
  "lockedFromClientAccess": "1",
  "notes": "",
  "templateId": "83",
  "attentionOf": "0",
  "usersForInformation": null,
  "entity": null,
  "entityType": "document",
  "titleAddendum": "",
  "oldId": "0",
  "renewalBatchNumber": "0",
  "sender": "jea",
  "recipient": "",
  "folder": "0",
  "filingStatus": "0",
  "modifiedDate": "2019-12-10 13:49:34",
  "modifiedUserId": null,
  "modifiedUser": null,
  "createDate": null,
  "createUserId": null,
  "createUser": null,
  "customFields": [
      {
          "id": "1",
          "name": "I'm hungry",
          "type": "date",
          "value": "",
          "entityType": "document",
          "required": "0",
          "possibleValues": []
      }
  ],
  "isCheckedOut": true
}

Document – Check-in

DESCRIPTION

This endpoint checks in the document with the ID specified.

Send a GET request to “/document/check-in/” with the document ID. A basic authentication header of email/key combination is required. If the key is valid a document will be downloaded as a response. A binary header including the file to be uploaded is required.

 

URL STRUCTURE

https://[hostname]/document/check-out/{documentId:[0-9]+}

METHOD

      GET

HEADERS

**Authorization:**    string Base64       [email]:[key]

PARAMETERS

**documentId**              int          Document ID to be checked out

RETURNS

Returns the new document checked-in.

{
  "id": "281",
  "matterId": "307",
  "title": "Content Notes Special Characters",
  "filename": "Content Notes Special Characters.docx",
  "date": "2019-11-12 00:00:00",
  "fileSize": "14373",
  "setupBy": null,
  "setupDate": null,
  "fileContent": null,
  "incomingDocId": null,
  "publishedStatus": {
      "id": "2"
  },
  "primaryClassification": {
      "id": "0",
      "name": "",
      "documentNameString": null,
      "outgoing": null,
      "incoming": null
  },
  "secondaryClassification": {
      "id": "0",
      "primaryClassificationId": null,
      "name": null,
      "country": null,
      "category": null,
      "subCategory": null,
      "doubleCheckRequired": null,
      "showInClientPortal": null,
      "documentNameString": null,
      "primaryClassification": null,
      "incoming": null,
      "outgoing": null,
      "epoImportString": null
  },
  "status": "C",
  "instanceId": "0",
  "lockedFromClientAccess": "1",
  "notes": "",
  "templateId": "83",
  "attentionOf": "0",
  "usersForInformation": null,
  "entity": null,
  "entityType": "document",
  "titleAddendum": "",
  "oldId": "0",
  "renewalBatchNumber": "0",
  "sender": "jea",
  "recipient": "",
  "folder": "0",
  "filingStatus": "0",
  "modifiedDate": "2019-12-10 13:49:34",
  "modifiedUserId": null,
  "modifiedUser": null,
  "createDate": null,
  "createUserId": null,
  "createUser": null,
  "customFields": [
      {
          "id": "1",
          "name": "I'm hungry",
          "type": "date",
          "value": "",
          "entityType": "document",
          "required": "0",
          "possibleValues": []
      }
  ],
  "isCheckedOut": false
}

 

 

 

Document – Search by title

DESCRIPTION

This endpoint searches the database for documents on a particular matter ID, with a title of string specified. This string has to be exact to the title of the document being searched. Quotes around supplied string are not necessary.

Send a GET request to “/document/check-in/” with the document ID. A basic authentication header of email/key combination is required. If the key is valid a document will be downloaded as a response. A binary header including the file to be uploaded is required.

 

URL STRUCTURE

https://[hostname]/document/get-by-title/{matterId:[0-9]+}/{documentTitle}

METHOD

      GET

HEADERS

**Authorization:**    string Base64       [email]:[key]

PARAMETERS

**matterId**                int          Matter to search for documents

**documentTitle**           string       Title of document to search

 

RETURNS

Returns a document, or an array of documents if string pattern is matched.

[
  {
      "id": "281",
      "matterId": "307",
      "title": "Content Notes Special Characters",
      "filename": "Content Notes Special Characters.docx",
      "date": "2019-11-12 00:00:00",
      "fileSize": "14373",
      "setupBy": null,
      "setupDate": null,
      "fileContent": null,
      "incomingDocId": null,
      "publishedStatus": {
          "id": "2"
      },
      "primaryClassification": {
          "id": "0",
          "name": "",
          "documentNameString": null,
          "outgoing": null,
          "incoming": null
      },
      "secondaryClassification": {
          "id": "0",
          "primaryClassificationId": null,
          "name": null,
          "country": null,
          "category": null,
          "subCategory": null,
          "doubleCheckRequired": null,
          "showInClientPortal": null,
          "documentNameString": null,
          "primaryClassification": null,
          "incoming": null,
          "outgoing": null,
          "epoImportString": null
      },
      "status": "C",
      "instanceId": "0",
      "lockedFromClientAccess": "1",
      "notes": "",
      "templateId": "83",
      "attentionOf": "0",
      "usersForInformation": null,
      "entity": null,
      "entityType": "document",
      "titleAddendum": "",
      "oldId": "0",
      "renewalBatchNumber": "0",
      "sender": "jea",
      "recipient": "",
      "folder": "0",
      "filingStatus": "0",
      "modifiedDate": "2019-12-10 13:49:34",
      "modifiedUserId": null,
      "modifiedUser": null,
      "createDate": null,
      "createUserId": null,
      "createUser": null,
      "customFields": [],
      "isCheckedOut": false
  },
  {
      "id": "267",
      "matterId": "307",
      "title": "Content Notes Special Characters",
      "filename": "Content Notes Special Characters.pdf",
      "date": "2019-11-01 00:00:00",
      "fileSize": "14350",
      "setupBy": null,
      "setupDate": null,
      "fileContent": null,
      "incomingDocId": null,
      "publishedStatus": {
          "id": "3"
      },
      "primaryClassification": {
          "id": null,
          "name": "",
          "documentNameString": null,
          "outgoing": null,
          "incoming": null
      },
      "secondaryClassification": {
          "id": null,
          "primaryClassificationId": null,
          "name": null,
          "country": null,
          "category": null,
          "subCategory": null,
          "doubleCheckRequired": null,
          "showInClientPortal": null,
          "documentNameString": null,
          "primaryClassification": null,
          "incoming": null,
          "outgoing": null,
          "epoImportString": null
      },
      "status": "C",
      "instanceId": "0",
      "lockedFromClientAccess": "1",
      "notes": null,
      "templateId": "83",
      "attentionOf": "0",
      "usersForInformation": null,
      "entity": null,
      "entityType": "document",
      "titleAddendum": "",
      "oldId": "0",
      "renewalBatchNumber": null,
      "sender": "",
      "recipient": "",
      "folder": "0",
      "filingStatus": null,
      "modifiedDate": "2019-11-01 11:27:51",
      "modifiedUserId": null,
      "modifiedUser": null,
      "createDate": null,
      "createUserId": null,
      "createUser": null,
      "customFields": [],
      "isCheckedOut": false
   
  }

]

Document –Get history for document

DESCRIPTION

This endpoint finds history actions for document ID.

Send a POST request to “/document/history/” with the document ID. A basic authentication header of email/key combination is required. If the key is valid a document will be downloaded as a response. A binary header including the file to be uploaded is required.

 

URL STRUCTURE

https://[hostname]/document/history/{documentId:[0-9]+}

METHOD

POST

HEADERS

**Authorization:**    string Base64       [email]:[key]

PARAMETERS

**documentId**              int          Document ID to return history of

RETURNS

Returns an array of events.

[
  {
      "entity": "document",
      "entityId": "281",
      "changeTime": "2019-12-10 14:14:07",
      "valueBefore": "",
      "valueAfter": "Josh",
      "userId": "1776",
      "field": "Checked In Document"
  },
  {
      "entity": "document",
      "entityId": "281",
      "changeTime": "2019-12-10 14:05:52",
      "valueBefore": "",
      "valueAfter": "Josh",
      "userId": "1776",
      "field": "Checked Out Document"
  },
  {
      "entity": "document",
      "entityId": "281",
      "changeTime": "2019-12-10 13:49:36",
      "valueBefore": "",
      "valueAfter": "Josh",
      "userId": "1776",
      "field": "Viewed By"
  },
  {
      "entity": "document",
      "entityId": "281",
      "changeTime": "2019-12-10 13:49:34",
      "valueBefore": "Content Notes Special Characters",
      "valueAfter": "Content Notes Special Characters",
      "userId": "1776",
      "field": "Title"
  },
  {
      "entity": "document",
      "entityId": "281",
      "changeTime": "2019-12-10 13:48:35",
      "valueBefore": "",
      "valueAfter": "Josh",
      "userId": "1776",
      "field": "Viewed By"
  },
  {
      "entity": "document",
      "entityId": "281",
      "changeTime": "2019-12-10 13:48:34",
      "valueBefore": "",
      "valueAfter": "Draft",
      "userId": "1776",
      "field": "Reverted to draft"
  },
  {
      "entity": "document",
      "entityId": "281",
      "changeTime": "2019-12-10 13:48:16",
      "valueBefore": "",
      "valueAfter": "Josh",
      "userId": "1776",
      "field": "Viewed By"
  }
]

 

Incoming correspondence

Incoming correspondence – Generate new incoming correspondence

DESCRIPTION

This endpoint creates a new incoming correspondence with supplied.

Send a POST request to “/incoming-correspondence/new”. A basic authentication header of email/key combination is required. If the key is valid a document will be downloaded as a response. A binary header including the file to be uploaded is required.

 

URL STRUCTURE

https://[hostname]/incoming-correspondence/new

METHOD

POST

HEADERS

**Authorization:**    string Base64       [email]:[key]

PARAMETERS

**title**                    string       Name of the incoming correspondence

**date**                     date        Date of the incoming correspondence

**source**                   int         Source id of the incoming correspondence

**urgent**                   tinyint       Boolean to determine whether IC is urgent

**assignedTo**              int          User ID IC is assigned to

**batchNumber**              int         Batch Number identifier

**physicallyRouted**         int         Boolean whether IC has been physical routed

**primary-classification**   int         Primary Classification ID

**secondary-classification**int         Secondary Classification ID

**notes**                    string       Notes field

**matterId**                 int         Matter ID the IC corresponds to

**documentInfoDocumentDate**date       Date

 

**documents[]**              binary      Binary file to upload to IC as a document

**documents_name[]**         string       Uploaded document name

**documents_date[]**         date        Uploaded document date

**documents_class[]**        int         Uploaded document primary classification

**documents_secclass[]**     int         Uploaded document secondary classification

**documents_notes[]**        string       Uploaded document notes

RETURNS

Returns ID of incoming correspondence added as an int.

36

 

Incoming correspondence – Find matching workflows

DESCRIPTION

This endpoint finds matching workflows for matter ID and primary and secondary classification. 

Send a GET request to “/incoming-correspondence/find-workflows-matching/”, followed by the MatterID, and primary and secondary classification separated by slashes. A basic authentication header of email/key combination is required. If the key is valid a document will be downloaded as a response. A binary header including the file to be uploaded is required.

 

URL STRUCTURE

https://[hostname]/incoming-correspondence/find-workflows-matching/{matterId:\d+}/{primaryClassification:\d+}/{secondaryClassification:\d+}

METHOD

GET

HEADERS

**Authorization:**    string Base64       [email]:[key]

PARAMETERS

**matterId**                int          Matter ID

**primaryClassification**   int          Primary Classification ID to filter Workflows

**secondaryClassification** int          Secondary Classification ID to filter Workflows

RETURNS

Returns matching workflows for new instances, or existing workflow instances.

{
  "existing": [],
  "new": {
      "21-82": "Invention - Office Action EP : Processing office action"
  }
}

 

 

 

 

Tasks

Tasks – Get Tasks due today

DESCRIPTION

This endpoint returns tasks that are due on the day requested.

Send a GET request to /task/next/”, followed by the number of tasks to return. A basic authentication header of email/key combination is required. If the key is valid a document will be downloaded as a response. A binary header including the file to be uploaded is required.

 

URL STRUCTURE

https://[hostname]/task/next/{count}

METHOD

GET

HEADERS

**Authorization:**    string Base64       [email]:[key]

PARAMETERS

**count**             int          Number of tasks to return

RETURNS

Returns a task or an array of tasks that are due today.

[
  {
      "parentTask": null,
      "id": "355",
      "description": "DG to check incoming item for docketing\t",
      "doneDate": {
          "date": "2019-12-10 16:14:01.000000",
          "timezone_type": 3,
          "timezone": "Europe/London"
      },
      "matterId": "66",
      "matterCode": "000015GB",
      "clientId": null,
      "client": "Seraphis Guitars",
      "presetItemId": "460",
      "dueDate": {
          "date": "1970-01-11 00:00:00.000000",
          "timezone_type": 3,
          "timezone": "Europe/London"
      },
      "status": "0",
      "statusName": "Live",
      "importance": "2",
      "importanceName": "Fatal",
      "formallyExtended": "0",
      "user": {
          "id": null,
          "oldId": null,
          "subscriberId": null,
          "username": "",
          "email": null,
          "secondaryEmail": [],
          "firstName": null,
          "secondName": null,
          "subscriberRef": null,
          "clientSQL": null,
          "loginCount": null,
          "lastLogin": null,
          "notes": null,
          "gender": null,
          "initials": null,
          "legalEntity": null
      },
      "type": "0",
      "typeName": null,
      "notes": null,
      "parentTaskId": null,
      "components": null,
      "workFlowLogId": null,
      "attachedTemplate": "0",
      "setupDate": null,
      "linkedDocuments": null,
      "outgoingDiscarded": null,
      "recipientId": null,
      "deliveryMethodOverride": null,
      "workflowPromptId": null,
      "originalDueDate": null,
      "invoiceId": null
  },
  {
      "parentTask": null,
      "id": "72",
      "description": "This the first task with custom date",
      "doneDate": {
          "date": "2019-12-10 16:14:01.000000",
          "timezone_type": 3,
          "timezone": "Europe/London"
      },
      "matterId": "10",
      "matterCode": "A000008GB",
      "clientId": null,
      "client": "Seraphis Guitars",
      "presetItemId": "692",
      "dueDate": {
          "date": "1980-07-04 00:00:00.000000",
          "timezone_type": 3,
          "timezone": "Europe/London"
      },
      "status": "0",
      "statusName": "Live",
      "importance": "0",
      "importanceName": "Standard",
      "formallyExtended": "0",
      "user": {
          "id": null,
          "oldId": null,
          "subscriberId": null,
          "username": "",
          "email": null,
          "secondaryEmail": [],
          "firstName": null,
          "secondName": null,
          "subscriberRef": null,
          "clientSQL": null,
          "loginCount": null,
          "lastLogin": null,
          "notes": null,
          "gender": null,
          "initials": null,
          "legalEntity": null
      },
      "type": "0",
      "typeName": null,
      "notes": "",
      "parentTaskId": null,
      "components": null,
      "workFlowLogId": "60",
      "attachedTemplate": "0",
      "setupDate": null,
      "linkedDocuments": null,
      "outgoingDiscarded": null,
      "recipientId": null,
      "deliveryMethodOverride": null,
      "workflowPromptId": null,
      "originalDueDate": "1980-07-04 00:00:00",
      "invoiceId": null
  }
]

 

 

Tasks – Mark task as complete

DESCRIPTION

This endpoint marks a task as complete.

Send a POST request to “/task/complete”. A basic authentication header of email/key combination is required. If the key is valid a document will be downloaded as a response. A binary header including the file to be uploaded is required.

 

URL STRUCTURE

https://[hostname]/task/complete

      

METHOD

POST

HEADERS

**Authorization:**    string Base64       [email]:[key]

PARAMETERS

**taskId**                  int          Task ID to mark as complete

RETURNS

Returns the task before it gets set to complete.

{
  "parentTask": null,
  "id": "472",
  "description": "Send Correspondence - NewContentJosh",
  "doneDate": {
      "date": "-0001-11-30 00:00:00.000000",
      "timezone_type": 3,
      "timezone": "Europe/London"
  },
  "matterId": "307",
  "matterCode": "D000025GB",
  "clientId": null,
  "client": "Seraphis Guitars",
  "presetItemId": "0",
  "dueDate": {
      "date": "2019-10-16 00:00:00.000000",
      "timezone_type": 3,
      "timezone": "Europe/London"
  },
  "status": "0",
  "statusName": "Live",
  "importance": "0",
  "importanceName": "Standard",
  "formallyExtended": "0",
  "user": {
      "id": "1776",
      "oldId": null,
      "subscriberId": null,
      "username": "Josh",
      "email": null,
      "secondaryEmail": [],
      "firstName": null,
      "secondName": null,
      "subscriberRef": null,
      "clientSQL": null,
      "loginCount": null,
      "lastLogin": null,
      "notes": null,
      "gender": null,
      "initials": null,
      "legalEntity": null
  },
  "type": "0",
  "typeName": null,
  "notes": "notes",
  "parentTaskId": null,
  "components": null,
  "workFlowLogId": null,
  "attachedTemplate": "81",
  "setupDate": null,
  "linkedDocuments": null,
  "outgoingDiscarded": "0",
  "recipientId": null,
  "deliveryMethodOverride": "0",
  "workflowPromptId": "0",
  "originalDueDate": null,
  "invoiceId": null
}

 

 

 

 

 

 

Report

Report – Get report by ID

DESCRIPTION

This endpoint returns a report associated with the given report ID.

Send a POST request to “/report/” followed by the report ID. A basic authentication header of email/key combination is required. If the key is valid a document will be downloaded as a response. A binary header including the file to be uploaded is required.

 

URL STRUCTURE

https://[hostname]/report/{reportId}?show_ids=false

METHOD

GET

HEADERS

**Authorization:**    string Base64       [email]:[key]

PARAMETERS

**reportId**                int          Report Id to return

**show_ids**bool        Show matter/task/document ids

RETURNS

Returns the report.

{
  "columns": [
      "IRN",
      " Country Code",
      " Status",
      " Category",
      " Long title"
  ],
  "data": [
      {
          "mattercode": "P000017USAL",
          "country": "AL",
          "description": "Granted (active)",
          "mattercategory": "Property (Invention)",
          "longtitle": "PCT Thing"
      },
      {
          "mattercode": "P000017USAT",
          "country": "AT",
          "description": "Granted (active)",
          "mattercategory": "Property (Invention)",
          "longtitle": "PCT Thing"
      },
      {
          "mattercode": "P000017USBA",
          "country": "BA",
          "description": "Granted (active)",
          "mattercategory": "Property (Invention)",
          "longtitle": "PCT Thing"
      }
  ]
}

 

Letter

Letters – Generate matter letter

DESCRIPTION

This endpoint generates a letter.

Send a POST request to “/matter/letter/”. A basic authentication header of email/key combination is required. If the key is valid a document will be downloaded as a response. A binary header including the file to be uploaded is required.

 

URL STRUCTURE

https://[hostname]/matter/letter

METHOD

POST

HEADERS

**Authorization:**    string Base64       [email]:[key]

PARAMETERS

**template**                binary       Template file to use

**matterId**                int          Matter ID template is associated with

**contactId**               int          Contact ID the letter is addressed to

**siteId**                  int          Address ID letter is addressed to

**taskId**                  int          Task ID template is associated with 

**language**                string       Language the letter is in 

 

RETURNS

Returns the downloadable letter.

 

 

 

Letters – Generate matter letter from master template

DESCRIPTION

This endpoint generates a letter from a master template.

Send a POST request to “/matter/letter/master-template/”. A basic authentication header of email/key combination is required. If the key is valid a document will be downloaded as a response. A binary header including the file to be uploaded is required.

 

URL STRUCTURE

https://[hostname]/matter/letter/master-template

METHOD

POST

HEADERS

**Authorization:**    string Base64       [email]:[key]

PARAMETERS

**master-template**         binary       Master template file to use

**matterId**                int          Matter ID template is associated with

**contactId**               int          Contact ID the letter is addressed to

**siteId**                  int          Address ID letter is addressed to

**taskId**                  int          Task ID template is associated with 

**template-header**         string       Header HTML to merge 

**template-content**        string       Content HTML to merge 

**template-sign-off**       string       Sign Off HTML to merge 

RETURNS

Returns the downloadable letter.

 

 

Letters – Generate HTML for letter

DESCRIPTION

This endpoint generates a HTML letter.

Send a POST request to “/matter/letter/html/”. A basic authentication header of email/key combination is required. If the key is valid a document will be downloaded as a response. A binary header including the file to be uploaded is required.

 

URL STRUCTURE

https://[hostname]/matter/letter/html

METHOD

POST

HEADERS

**Authorization:**    string Base64       [email]:[key]

PARAMETERS

**matterId**                int          Matter ID template is associated with

**contactId**               int          Contact ID the letter is addressed to

**siteId**                  int          Address ID letter is addressed to

**taskId**                  int          Task ID template is associated with 

**template-header**         string       Header HTML to merge 

**template-content**        string       Content HTML to merge 

**template-sign-off**       string       Sign Off HTML to merge 

RETURNS

Returns the merged downloadable letter from merged HTML.

 

Letters – Convert DOCX to PDF

DESCRIPTION

This endpoint generates a letter.

Send a POST request to “/matter/letter/convert-to-pdf”. A basic authentication header of email/key combination is required. If the key is valid a document will be downloaded as a response. A binary header including the file to be uploaded is required.

 

URL STRUCTURE

https://[hostname]/matter/letter/convert-to-pdf

METHOD

POST

HEADERS

**Authorization:**    string Base64       [email]:[key]

PARAMETERS

**document-to-convert**     binary       DOCX to convert

RETURNS

Returns the converted PDF.

 

Finance

Invoices – Generate invoice from master template

DESCRIPTION

This endpoint generates an invoice from a master template.

Send a POST request to “/invoice/merge”. A basic authentication header of email/key combination is required. If the key is valid a document will be downloaded as a response. A binary header including the file to be uploaded is required.

 

URL STRUCTURE

https://[hostname]/matter/invoice/merge

METHOD

POST

HEADERS

**Authorization:**    string Base64       [email]:[key]

PARAMETERS

**master-template**         binary       Master template file to use

**matterId**                int          Matter ID template is associated with

**contactId**               int          Contact ID the letter is addressed to

**siteId**                  int          Address ID letter is addressed to

**taskId**                  int          Task ID template is associated with 

**template-header**         string       Header HTML to merge 

**template-content**        string       Content HTML to merge 

**template-sign-off**       string       Sign Off HTML to merge 

RETURNS

Returns the merged downloadable invoice from merged HTML.

Finance interface incoming invoice

DESCRIPTION

An incoming invoice allows the creation of charges that are relevant against the incoming ledger. If a document is supplied the document also stored on the matter.

URL STRUCTURE

https://[hostname]/finance/interface/incoming

METHOD

      POST

HEADERS

**Authorization:**    string Base64       [email]:[key]

PARAMETERS

**incomingInvoice**         array        Array of variables for the incoming invoice

**incomingLedger**        string       The ledger to match against the charge sheet

**matterId**              int          Equinox matter ID

**matterCode**            string       Equinox matter code (IRN) (optional)

**amount**                double       Invoice amount, as a 2dp number, e.g. “123.40”

**currency**              string       Currency of the invoice in 3 chars, e.g. “EUR”

**invoiceNumber**         string       Invoice number of the incoming invoice

**paymentReference**      string       Reference to the invoice, for WIP matching (optional)

**document**              file          Invoice document (as a pdf?) (optional)

**date**                  datetime     Date and time for invoice, e.g. “2019-08-01 12:35:00”

RETURNS

Sample response: 

An array of created charges

[
  {
      "id": "252",
      "userId": "1703",
      "matterId": "10",
      "time": null,
      "date": {
          "date": "2019-09-25 12:07:00",
          "timezone_type": 3,
          "timezone": "Europe/London"
      },
      "description": "TEST1",
      "legalEntityId": "1",
      "category": "Fixed",
      "paymentReference": "Ref123",
      "supportingDocId": "5175",
      "notes": null,
      "status": {
          "statusValue": "pre-approval"
      },
      "amount": "123.40",
      "adjustment": null,
      "discount": null,
      "discountPercentage": null,
      "chargeRate": 0,
      "potentialForVAT": 1,
      "invoiceNumber": "INV123",
      "chargeSheetId": "6",
      "nonChargeable": "0",
      "isRenewalCharge": "0"
  }
]

 

EXAMPLE

      C#

using System.Net.Http;
using System.Net.Http.Headers;
using System.Security.Cryptography;

/// <summary>
/// Send an invoice to Equinox, basic example
/// </summary>
/// <param name="userEmail"></param>
/// <param name="password"></param>
/// <returns>charge object</returns>
public static async Task<object> SendInvoice(string userEmail, string password, Filestream document)
{
  dynamic obj = null;
  string url = "https://[hostname]/finance/interface/incoming";
  string incomingLedger = "123";
  int matterId = 10;
  string matterCode = "P000006EP";
  double amount = "123.40";
  string currency = "EUR";
  string invoiceNumber = "INV123";
  string paymentReference = "REF123";
  DateTime date = "2019-08-01 12:35:00";


  // Auth headers
  MD5 md5Hash = MD5.Create();
  string hashedPassword = Security.GetMd5Hash(md5Hash, password);
  var credentials = Convert.ToBase64String(
          Encoding.ASCII.GetBytes(userEmail + ":" + hashedPassword)
  );

  // Content
  var form = new MultipartFormDataContent();
  form.Add(new StreamContent(new MemoryStream(file)), "incomingInvoice[document]", "filename.pdf");
  form.Add(new StringContent(incomingLedger), "incomingInvoice[incomingLedger]");
  form.Add(new StringContent(matterId.toString()), "incomingInvoice[matterId]");
  form.Add(new StringContent(matterCode), "incomingInvoice[matterCode]");
  form.Add(new StringContent(amount.toString()), "incomingInvoice[amount]");
  form.Add(new StringContent(currency), "incomingInvoice[currency]");
  form.Add(new StringContent(invoiceNumber), "incomingInvoice[invoiceNumber]");
  form.Add(new StringContent(paymentReference), "incomingInvoice[paymentReference]");
  form.Add(new StringContent(date.toString()), "incomingInvoice[date]");

  using (HttpClient client = new HttpClient())
  {
      client.DefaultRequestHeaders.Accept.Clear();
      client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", credentials);

      // Response
      HttpResponseMessage res = await client.PostAsync(url, form);
      content = await res.Content.ReadAsStringAsync();

      // JSON Serialise
      obj = JsonConvert.DeserializeObject(content);

       
  }
  return obj;
}

 

Finance Interface Payment Status

DESCRIPTION

Update the payment status of an invoice. The possible values of Payment Status are:

·    0: Unpaid

·    1: Paid

·    2: Part Paid

·    3: Disputed

·    4: Written Off

·    5: Cancelled

 

URL STRUCTURE

https://[hostname]/finance/interface/payment-status

METHOD

      POST

HEADERS

**Authorization:**    string Base64       [email]:[key]

PARAMETERS

**invoiceStatus**     array              Array of variables for the payment status

**invoiceId**       int                Equinox Invoice ID

**status**          string/int          Either string or int of the payment status

**paymentDate**     datetime           Date the payment was made

**amount**          double             Amount of part paid (optional)

RETURNS

Sample response: Invoice data

{
  "id": "4544",
  "legalEntityId": "2",
  "locationId": "34",
  "invoiceDate": "2019-07-01",
  "paymentDate": "2019-09-03",
  "invoiceNumber": "INV123",
  "status": "2",
  "partPaid": null,
  "amount": "123.40",
  "amountCurrency": "EUR",
  "VATAmount": "25.91",
  "location": "343"
  "charges": [],
}

EXAMPLE

      C#

using System.Net.Http;
using System.Net.Http.Headers;
using System.Security.Cryptography;

/// <summary>
/// Send an invoice to Equinox, basic example
/// </summary>
/// <param name="userEmail"></param>
/// <param name="password"></param>
/// <returns>invoice object</returns>
public static async Task<object> SendPaymentStatus(string userEmail, string password, Filestream document)
{
  dynamic obj = null;
  string url = "https://[hostname]/finance/interface/payment-status";
  int invoiceId = 4544;
  string status = "Paid";
  double amount = "123.40";
  string currency = "EUR";
  string invoiceNumber = "INV123";
  string paymentReference = "REF123";
  DateTime date = "2019-08-01 12:35:00";


  // Auth headers
  MD5 md5Hash = MD5.Create();
  string hashedPassword = Security.GetMd5Hash(md5Hash, password);
  var credentials = Convert.ToBase64String(
          Encoding.ASCII.GetBytes(userEmail + ":" + hashedPassword)
  );

  // Content
  var form = new MultipartFormDataContent();
  form.Add(new StringContent(invoiceId.toString()), "invoiceStatus[invoiceId]");
  form.Add(new StringContent(status), "invoiceStatus[status]");
  form.Add(new StringContent(paymentDate), "invoiceStatus[paymentDate]");

  using (HttpClient client = new HttpClient())
  {
      client.DefaultRequestHeaders.Accept.Clear();
      client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", credentials);

      // Response
      HttpResponseMessage res = await client.PostAsync(url, form);
      content = await res.Content.ReadAsStringAsync();

      // JSON Serialise
      obj = JsonConvert.DeserializeObject(content);

       
  }
  return obj;
}