The commercetools JavaScript SDK

Build e-commerce applications easily with JavaScript

About the JS SDK

The JavaScript SDK provides an easy interface for interacting with the commercetools platform. Supports all HTTP methods and endpoints exposed in the CTP platform.

Official documentation of the SDK can be found here

Link list to JavaScript SDK resources:

Features

Middlewares

The JS-SDK has a middleware architecture. Allowing plugins or middlewares to be connected to the request. Middlewares allows for easy extensibility of the SDK. More information about the architecture here

List of middlewares that we currently support

Authentication

The JS-SDK supports all authentication flow. Listed here

If the SDK is used to generate the token, it stores a refresh token which is used to fetch a valid token if the old token expires.

Helper Libraries

These are libraries that help in building the final request.

api-request-builder

Helps to construct the URI for the HTTP API endpoints in a declarative approach. More documentation here

sync-actions

Helps in generating update actions required to update an entity from an old state to a new state. More documentation here

get-credentials

Helps to retrieve project credentials from the environment or file system. More documentation here

http-user-agent

Creates a HTTP user-agent that can be added to the request. More documentation here

Node SDK

There is currently an old Node SDK written in JavaScript which is no longer maintained. This should not be confused with the JS SDK. If you’re still using the Node SDK, a migration is available here