Request schema
General API Principles
The Liner API is built on REST principles and uses standard HTTP methods and response status codes.
- All requests are made over HTTPS
- Responses return appropriate HTTP status codes
- All responses are in JSON format, regardless of request type
- Errors are also returned in JSON format with a description of the cause
HTTP Methods
Requests to the Liner API use standard HTTP methods:
- GET — retrieve a list of entities or information about a specific entity
- POST — create an entity
- PUT — update an entity’s values
- DELETE — archive an entity
Resources
A resource address in a request includes: the host address, the API version, and the method path.
Note
v1 is the current version where all updates are available.
Example
https://YOUR_LINER_API_HOST/v1/health/check/
Authorization
All requests must include the integration token, passed in an HTTP header:
X-Api-Key:
The integration token is issued when you create an integration in Liner. Detailed instructions are available in the Getting started section.
Request Body Format
The request body is sent in JSON format.
Note
Be sure to set the header: Content-Type: application/json.
The content of the request body depends on the operation type:
- for filtering — a JSON object with filters
- for create/update — a JSON object with the entity values
Note
If a field is optional but you need to clear it, pass one of the following values:
- an empty string:
"" null
Response Format
Any API method call returns a JSON object with the following structure and a valid HTTP response code.
Response Fields
success— request execution status:trueorfalsemessage— error message (ifsuccess = false), otherwise an empty stringdata— the response payload
For example: the ID of a created entity, a list of entities, an operation result, etc.