Index



Introduction

The LawPanel API is REST based and uses built-in HTTP features like HTTP authenticationn and HTTP verbs.

JSON is returned by all API responses including errors.

If you are doing special development for our API please contact for us access to the development/test enviroment.


Authentication

Authentication consists of two separated identification levels:

  • Firm level: Identify your firm account when using the API by including your secret API key in the request with the parameter name: subscription-key. Please do not share this key as it's for your company only. You can find your API key on your settings page. This level is required to perform simple tasks where is not necessary to identify the user.

    For example, to read registries you can perform a GET HTTP call:

    https://api.lawpanel.com/v1/firms/registries?subscription-key=[Your subscription key]

  • User level: This authentication level is required by the most methods where the action nature needs to know the identity of the user performing it.

    For example, to create a trademark search, you will need to be identified at user level.

    The authentication at this level is performed via a HTTP cookie called .LawPanel.AuthCookie and you should include it into all requests.

    To identify as user and obtain the cookie you should call the user identify method.

All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.


Pagination

All top-level API resources have support for bulk fetches and ordering via "read" API methods and share a common structure taking these three parameters: skip, take and order.

For instance you can read registries, read clients, and read invoices.

  • LawPanel syntax

    These list API methods share a common structure, taking at least these three parameters: skip, take and order:

    Name Type Description Default Required
    skip int

    The skip parameter omits the specified number of returned records, starting always from the first record.

    0 Optional
    take int

    The take parameter controls how many records the API returns.

    If you use it with the skip parameter, the first record returned will be at the position skip+1.

    If the skip parameter does not exists, it returns the first records.

    If you do not specify this value, the default value is 10.

    Max value allowed for take is 100.

    10 Optional
    order string

    An string used to define the order for the entities returned.

    The syntax is an json array of arrays: [ [ORDER 1], [ORDER 2], ... [ORDER n] ].

    Each order component is composed by: [field_name,direction]. Both, field_name and direction are string values.

    Possible values for direction:

    • asc: Ascending
    • desc: Descending

    By example, if you want to order by a field called first_name in ascending direction, and then by another field called last_name in descending, your order string would be like this:

    [["first_name","asc"],["last_name","desc"]]

    The orders priorities are evaluated from left to right, similar to SQL sentences.

    null Optional

All responses of read actions, will contain the following values in the HTTP headers:

Name Type Description
Total int

Contains the total of entities without any kind of filters.

Taken int

Shows how many entities in the current response.

Skipped string

Shows the amount of entities skipped for this reponse.


Libraries

We have official libraries for different programming languages:


A C# portable Class Library containing a typed .NET client gateway.

Install it using NuGet:

PM> Install-Package LawPanel.ApiClient.DotNet

For more details, check out the source on GitHub.