Productlane API
Welcome to the extended Productlane API! This API lets you control Productlane and make it your own.
Get your API key
You don't need your API key for all requests. Some requests don't require authentication.
If you do need it, however:
Let's start off by getting your API key. Get your API key here ->
Got it? Awesome.
Save the key in a secure place (make sure not to leak it!) and you're good to go.
What requests should look like
Our request format goes by the Blitz RPC spec. Here's what a request should look like:
POST https://productlane.io/api/rpc/{method} HTTP/1.1
Authorization: Bearer {token}
Content-Type: application/json
{
"params": {}
}
Note that the token is not the API key. See Auth
-
The URL of every request is
https://productlane.io/api/rpc, followed by the name of the method you're calling.For example: The full URL of the getPortalProjects method is
https://productlane.io/api/rpc/getPortalProjects -
Requests always have to be in JSON, and every request needs to have a params object.
Even if an endpoint doesn't take any arguments, an empty object needs to be sent. -
There is an access token that needs to be sent as an
Authorization: Bearerheader.
See Auth
What responses look like
The response's body always has a result and an error.
Here's a successful response:
{
"result": {
"foo": "bar"
},
"error": null
}
And here's a response with an error:
{
"result": null,
"error": {
"name": "InternalServerError",
"statusCode": 500
}
}
resultcan be anything. A string, an object, an array. You name it!erroralways is eithernull, or an object that looks like this
Auth
There are some endpoints you can call without authenticating.
Instead, your requests need to have an Authorization: None header.
These endpoints are (mostly) the ones related to the Public Roadmap and Changelog. In the docs, these are marked with OPEN.
For all other endpoints, however, you need to routinely create an access token. Currently, access tokens are valid for 24 hours at a time. Once 24 hours are up, the token expires and needs to be replaced with a new one.
Errors
Responses that have an error look like this:
{
"result": null,
"error": {
"name": "BadRequestError",
"message": "User eimen@productlane.io already upvoted this project",
"code": "ALREADY_UPVOTED", // Not always there, please see below
"statusCode": 400
}
}
If there is an error, the response's status code will still be 200 OK
- All errors have a name and message.
- Some errors have a code, to give you more control over handling errors programmatically.
- Some errors have a status code. If the error can be represented as an HTTP status (like "Customer Not Found") it has a status code.