# @amitechgrp/bigcommerce-api-sdk

> ## Using Management API ```typescript import { config, products } from '@amitechgrp/bigcommerce-api-sdk'

Latest version **1.0.0-beta.7** (published 2022-12-27) · ISC license · 0 weekly downloads

## Install

```sh
npm install @amitechgrp/bigcommerce-api-sdk
pnpm add @amitechgrp/bigcommerce-api-sdk
yarn add @amitechgrp/bigcommerce-api-sdk
bun add @amitechgrp/bigcommerce-api-sdk
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0-beta.7 |
| Published | 2022-12-27 |
| First published | 2022-12-12 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 1.6 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | alexey-amitech, asimonok |

## Links

- npm: https://www.npmjs.com/package/@amitechgrp/bigcommerce-api-sdk
- npm.io page: https://npm.io/package/@amitechgrp/bigcommerce-api-sdk

## Recent versions

- 1.0.0-beta.7 (latest) — 2022-12-27
- 1.0.0-beta.6 — 2022-12-26
- 1.0.0-beta.5 — 2022-12-13
- 1.0.0-beta.4 — 2022-12-13
- 1.0.0-beta.3 — 2022-12-12
- 1.0.0-beta.2 — 2022-12-12

## README

# API SDK for BigCommerce

## Using Management API
```typescript
import { config, products } from '@amitechgrp/bigcommerce-api-sdk'

// setup configuration
config.set({
  storeHash: 'storeHash',
  apiClientId: 'clientId',
  apiToken: 'apiToken',
})

// getting product name
const getProductName = async (id: number) => {
  const product = await products.get(id)
  
  return product?.name
}
```

## Using Graphql
```typescript
import { graphqlApi } from '@amitechgrp/bigcommerce-api-sdk'

// setup configuration
graphqlApi.config.set({
  storeHash: 'storeHash',
  bearerJWT: 'jwt token',
})

// run graphql query
const getRouteQuery = /* GraphQL */ `
  query getRoute($urlPath: String!) {
    site {
      route(path: $urlPath) {
        ...
      }
    }
  }
`
graphqlApi.client.request({
  data: {
    query: getStoreNameQuery,
    variables: {
      urlPath: '/category-url'
    },
  },
  cookie: 'SHOP_TOKEN=123'
})
```

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