BlueShell exposes REST APIs that can be used after authentication.
The APIs follow the REST paradigm for reading (GET), creating (POST), updating (PUT) and deleting (DELETE).
Authentication
You sign in with the username of a technical user and one of its API keys, using HTTP Basic Authentication: the username goes in the username part of the header and the key in the password part. Alternatively you can use the X-REST-USERNAME and X-REST-PASSWORD headers.
The technical user and its keys are created by the marina, in Settings → Users and access → API keys: everything about how to create them, the roles and the key is in Technical users and API keys: connecting an integration. The username looks like name@bs123.serviceaccount.blueshell.app, and the key starts with bsk_. On the same page, How to connect gives the integrator the address, the first call and ready-made examples in several languages.
Most HTTP client libraries already implement HTTP Basic authentication. More information about HTTP Basic authentication and how the header must be built is here: https://en.wikipedia.org/wiki/Basic_access_authentication
The key is a secret, like a password: the program reads it from an environment variable or from a server secrets manager, and never writes it in the code. It must never be used from the JavaScript of a web page, where anyone who opens the page would read it: the page calls your server, and your server calls BlueShell. From 30 November 2026, calls made from a web page of another site are refused.
Keys that the marina has moved from a person to a technical user work until 31 January 2027, and until then they also accept the old way of connecting (the key alone, or with the person's username). From 1 February 2027 they no longer work: the integration uses the technical user's username and a new key. From the same date the APIs no longer accept a person's username and password.
Production and test
Instance | Starting URL | Key |
|---|---|---|
Production |
| LIVE |
Test and development |
| TEST |
A LIVE key works only in production, a TEST key only on the test instance. The test environment and its keys work only on request and after a technical intervention from us.
The first call
The starting URL tells you who is calling (the technical user, the marina, the key, the instance) and gives you the addresses of the resources that technical user can read. There is no separate list to look up: the list is this response (/rest/v1/default/index), and it changes with the technical user's roles: a resource you do not see is a resource you lack permission for. Every response also contains the addresses of the related resources, following the HATEOAS guidelines of the REST paradigm. The fields of a resource can be seen by reading one row.
All API responses are in JSON. All requests that contain a body must be sent as a JSON string directly in the body of the HTTP POST/PUT.
Following the links
Every row has a _links key with the addresses of what surrounds it: for a customer, self (the row itself), invoices (their invoices), vectors (their boats), contracts (their contracts), orders (their shipyard orders) and others. You do not need to know the right address in advance: read the value of the link you want and call it, with the same key.
"_links": {
"self": {
"href": "https://my.blueshell.it/rest/v1/customer/102"
},
"invoices": {
"href": "https://my.blueshell.it/rest/v1/invoice?filter=%5B%7B%22property%22%3A%22customer_id%22%2C%22value%22%3A%22102%22%2C%22operator%22%3A%22%3D%22%7D%5D"
},
...
}Lists, filters and sorting
A list returns at most 30 rows at a time. With the limit parameter you can ask for more, up to 100: a higher value still counts as 100. For the next rows use offset.
To search and sort, the filter and sort parameters accept a JSON list, for example:
GET /rest/v1/customer?limit=50&filter=[{"property":"name","value":"Rossi","operator":"like"}]&sort=[{"property":"update_time","direction":"DESC"}]propertyis the name of a column of the resource, orrelation.column;directionis onlyASCorDESC. Anything else gets a 400 error.operatorcan be=,!=(or<>),<,<=,>,>=,like(the value is contained in the field) andin/not in(with a list of values).Without
operator, a text field is compared withlikeand the other fields with=.
What a response looks like
A successful read has success set to true, a message and, in data, the total number of rows matching the filter (totalCount, even if the page shows fewer) and the rows under the resource's name:
{
"success": true,
"message": "Record(s) Found",
"data": {
"totalCount": 168,
"customer": [
{...},
{...},
...
]
}
}A read with no results answers with "message": "No Record(s) Found" and totalCount at 0. Reading a single row (/rest/v1/customer/102) gives the row as an object, not as a list. A successful write answers with "message": "Record Created" and the row just created.
Errors
An error has the HTTP code and a JSON body with success set to false, a message and, in data, errorCode and message. The ones you will meet first:
Code | What it means |
|---|---|
400 | a filter or a sort that does not name a column of the resource, or data that does not pass validation (the body lists the errors) |
406 | in a write, a field that the resource does not know or does not let you write |
401 | invalid username or key, or a person's password after 31 January 2027 |
403 | the call comes from a web page of another site (from 30 November 2026) |
If a resource does not appear in the list or does not respond, check the technical user's roles: in API keys, See what each role allows lists them.
