Introduction
Getting Started
This is the reference for the Legalinc REST API which provides a convenient way to create web and desktop applications that integrate with the services your business provides online. The API will allow you to submit orders, upload documents, and receive update notifications. HTTP response codes are used to indicate API errors. JSON is returned for all responses, and headers must be in JSON format for any methods used.
Authentication
User authentication is implemented via OAuth 2.0 with an access token that gets passed in the request. You will need to enter a client_secret key as part of setting up your authentication which you can generate in your dashboard under Developer Settings. You will also need to enter your username and password when creating the access token. If at any time you feel this information has been compromised, you have the ability to change the password of the API User.
After you receive your access token you must pass it with any API requests that are not public.
Pagination and Sorting
Pagination is available for the Orders object and the following parameters can be used with pagination.
Parameter | |
---|---|
length | Defines the number of orders to be passed |
start | Starting point in the index |
sortColumn | Possible values:
|
sortOrder | Possible values:
|
Status codes
The Legalinc REST API uses standard HTTP status codes including the following:
Status code | Message |
---|---|
200 | OK Standard response for successful HTTP requests. |
400 | Bad Request Possible reason: the request cannot be fulfilled due to bad syntax or the access token is missing. |
401 | Unauthorized Possible reason: user is not authorized or token is expired. |
404 | Not Found Possible reason: incorrect URL. |
500 | Internal Server Error Server has encountered a situation it doesn't know how to handle. |
Responses that return an error status code (ex. 400 status code) will also return a response body, similar to the following: