# bigcommerce-store-api

> BigCommerce Store API Client

Latest version **0.0.6** (published 2026-09-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install bigcommerce-store-api
pnpm add bigcommerce-store-api
yarn add bigcommerce-store-api
bun add bigcommerce-store-api
```

## Health

**Score 55/100 (C)** — status: active.

Positive: no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads; no types; no esm support; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.0.6 |
| Published | 2026-09-24 |
| First published | 2025-01-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Brat Vu |
| Maintainers | iceleo-com |
| Keywords | bigcommerce, api, client, store, remote, management, catalog |

## Links

- npm: https://www.npmjs.com/package/bigcommerce-store-api
- Repository: https://github.com/iceleo-com/bigcommerce-store-api
- Homepage: https://github.com/iceleo-com/bigcommerce-store-api#readme
- Issues: https://github.com/iceleo-com/bigcommerce-store-api/issues
- npm.io page: https://npm.io/package/bigcommerce-store-api

## Alternatives

- [launchdarkly-js-client-sdk](https://npm.io/package/launchdarkly-js-client-sdk.md) — 2.5M weekly downloads
- [@elastic/elasticsearch](https://npm.io/package/@elastic/elasticsearch.md) — 2.1M weekly downloads
- [@c8y/client](https://npm.io/package/@c8y/client.md) — 15.3K weekly downloads
- [@signaldb/maverickjs](https://npm.io/package/@signaldb/maverickjs.md) — 1.7K weekly downloads
- [@bbc/http-transport-cache](https://npm.io/package/@bbc/http-transport-cache.md) — 1.2K weekly downloads

## Recent versions

- 0.0.6 (latest) — 2026-09-24
- 0.0.5 — 2026-09-24
- 0.0.4 — 2025-11-07
- 0.0.3 — 2025-10-14
- 0.0.2 — 2025-01-02
- 0.0.1 — 2025-01-01
- 0.0.0 — 2025-01-01

## README

# bigcommerce-store-api

This is a simple BigCommerce API client library written in Typescript, it allows developers to interact with the BigCommerce platform. By using this library, developers can easily integrate their applications with BigCommerce stores, enabling them to access and manipulate store data such as products, orders, customers, and more.

## Getting Started
- [Installation](#installation)
- [Basic Usage](#basic-usage)

## Installation

```sh
npm install bigcommerce-store-api
```

## Basic Usage

```typescript
import BigCommerceStoreApi from 'bigcommerce-store-api';

const apiClient = new BigCommerceStoreApi({
    storeHash: 'storeHash',
    accessToken: 'accessToken',
    // optional, only needed by the Current Customer API
    storeDomain: 'store.example.com',
    // optional, only needed by the Shipping Provider and Tax Provider APIs
    appDomain: 'app.example.com',
});

const response = await apiClient.v3.products.getProducts({
    limit: 10,
});

if (response.status === 'success') {
    console.log(response.data);
} else {
    console.log(response.errors);
}

const responseProduct = await apiClient.v3.products.getProduct(1234);

if (responseProduct.status === 'success') {
    console.log(responseProduct.data);
} else {
    console.log(responseProduct.errors);
}
```

### Low level API

If you need to directly call the `get`, `post` `put` `delete` methods with a custom URL and custom parameter, you can get the `apiClient.request` object and call the corresponding method. For example:

```typescript
apiClient.request.put({
    path: 'v3/catalog/products',
    contentType: 'application/json',
    body: [
        { id: 123, name: 'New Product Name' },
        { id: 456, name: 'New Product Name' }
    ],
    query: {
        include_fields: ['name'],
    },
});
```

## Error Handling

bigcommerce-store-api will not throw an error, instead it return error details in response

```typescript
const response = await apiClient.v3.products.getProduct(1234);

if (response.status === 'error') {
    console.log(response.errors);
}
```

Every response, success or error, also includes the response `headers` and the raw `response_text` to help with debugging:

```typescript
const response = await apiClient.v3.products.getProducts();

console.log(response.http_status);
console.log(response.headers['x-rate-limit-requests-left']);
console.log(response.response_text);
```

But for program safety, I recommend implementing a try catch to ensure your code is not interrupted by a library bug. For example:

```typescript
const response = await productApi
    .getProducts()
    .catch(error => {
        console.log(error);
    });

if (response) {
    console.log(response);
}

// or
try {
    const response = await productApi.getProducts();
    console.log(response);
} catch (error) {
    console.log(error);
}
```

---
_Source: https://npm.io/package/bigcommerce-store-api · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
