Search…
With our SDKs

Unauthenticated requests

Some resources do not require an authenticated request to be accessible, which means you can access them solely with a BuiltOn API Key.
If you were to list products, here is how you could do it:
Core SDK
Node SDK
Python SDK
HTTP
const BuiltOn = require('@builton.dev/core-sdk');
const builton = new BuiltOn({
apiKey: '<builton-api-key>'
});
builton.products.get({ size: 5 }).then((page) => {
const firstProduct = page.current[0];
console.log(firstProduct);
});
// The Node SDK, although similar to the Core SDK, is intended for server-to-server communication.
const BuiltOn = require('@builton.dev/node-sdk');
const builton = new BuiltOn({
apiKey: '<builton-api-key>'
});
builton.products.get({ size: 5 }).then((page) => {
const firstProduct = page.current[0];
console.log(firstProduct);
});
# The Python is intended for server-to-server communication.
from builton_sdk import Builton
builton = Builton(api_key="<builton-api-key>")
builton.product().get_all(size=5)
GET /products HTTP/1.1
Content-Type: application/json
X-Builton-Api-Key: <builton-api-key>
Host: api.builton.dev
For more information about the pagination, please visit the Pagination page.

Authenticated requests

Most resources require an authenticated user to be accessible. This is the case of order for example.
To authenticate a user, do the following:
Core SDK
HTTP
const BuiltOn = require('@builton.dev/core-sdk');
const builton = new BuiltOn({
bearerToken: '<jwt>',
apiKey: '<builton-api-key>'
});
const userData = {
first_name: 'foo',
last_name: 'bar',
};
builton.users.authenticate(userData).then((user) => {
console.log(user);
});
POST /users HTTP/1.1
Content-Type: application/json
Authorization: Bearer <jwt>
X-Builton-Api-Key: <builton-api-key>
Host: api.builton.dev
{
"first_name": "foo",
"last_name": "bar",
"email": "[email protected]",
}
For more information about the service accounts, please visit the Service account page.
Copy link
On this page
Unauthenticated requests
Authenticated requests