Public API Introduction
Luscii is slowly opening up endpoints for public use that allow third parties to programmatically interact with the Luscii platforn.
The luscii API is accessible through the following base url:
https://api.luscii.com/v1/
To use the API you should authenticate your requests, see Authentication
General endpoint design
The Public API returns json responses in a general format.
{
"meta": {
},
"data": {
},
"errors": [
{
"code": "<error_code>",
"message": "<error_message>"
}
]
}
The response body will contain a json object in the body optionally containing the following parts:
Meta
If the response has relevant meta information it will be encapsulated within the meta
key. Examples are optional success messages
{
"meta": {
"message": "Resource succesfully created",
}
}
or linked resources (pagination).
{
"meta": {
"prevCursor": "<cursor_token>",
"nextCursor": "<cursor_token>"
}
}
Pagination
Cursor based pagination is used for large responses containing multiple resources of the same type. The API will return a prevCursor
and nextCursor
value when needed in the meta information containing a token. This token can be added to the request as a query parameter to fetch the previous or next page.
v1/patients?cursor=<cursor_token>
Data
When requesting resources the API will return a data
key in the response, the value of this can be either an object or an array depending on the type of resource that was requested (multiple or single entities).
{
"data": [
{
"email": "[email protected]",
...
},
...
]
}
Errors
If the request results in errors these will be returned under the errors
key. Errors are optional but if present will always be in the form of an array containing one or more errors.
{
"errors": [
{
"code": "validation",
"message": "Start date must be ISO8601 formatted",
"attribute": "startDate"
},
{
"code": "account_inactive",
"message": "Your account is not active"
}
]
}
Error objects will always contain a code
which is a string in a machine friendly format which you can use to identify and handle specific errors. A human readable message
will also be present in the error object.
Technical reference
A full list of endpoints can be found in our Technical reference
Updated 27 days ago