PHPackages                             mavericks-lab/bigcommerce - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. mavericks-lab/bigcommerce

ActiveLibrary[API Development](/categories/api)

mavericks-lab/bigcommerce
=========================

021PHP

Since Feb 1Pushed 8y ago2 watchersCompare

[ Source](https://github.com/mavericks-lab/bigcommerce)[ Packagist](https://packagist.org/packages/mavericks-lab/bigcommerce)[ RSS](/packages/mavericks-lab-bigcommerce/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

BIGCOMMERCE REQUESTS PACKAGE
----------------------------

[](#bigcommerce-requests-package)

### Description

[](#description)

This package serves as a request mapper for BigCommerce products, orders, customers, and merchant end points.

### Installation

[](#installation)

```
    composer require mavericks-lab/bigcommerce

```

### Initialization

[](#initialization)

```
use Maverickslab\BigCommerce\Http\Client\BigCommerceHttpClient;
use Maverickslab\BigCommerce\Http\Request\{
    ProductRequest, CategoryRequest, OrderRequest, MerchantRequest, CustomerRequest
};

$authToken = 'h5wm9usftmq7zkmn1bggaj6cr8h3ml3';
$clientId = 'nbioblf5th4u4y9iqhtbwbjyl6qb6jt';
$clientSecret = '';
$storeId = '9ma06';

$httpClient = new BigCommerceHttpClient($authToken, $clientId, $clientSecret, $storeId);

//Create an instance of a product request
$productRequest = new ProductRequest($httpClient);

//Create an instance of a category request
$categoryRequest = new CategoryRequest($httpClient);

//Create an instance of an order request
$orderRequest = new OrderRequest($httpClient);

//Create an instance of a merchant request
$merchantRequest = new MerchantRequest($httpClient);

//Create an instance of a customer request
$customerRequest = new CustomerRequest($httpClient);

```

You can also create an instance of `Maverickslab\BigCommerce\BigCommerce`, which combines all the above request into one object.

```
use Maverickslab\BigCommerce\BigCommerce;

$bigCommerce = new BigCommerce($httpClient);

//Get instance of a ProductRequest
$bigCommerce->product();

//Get instance of a CategoryRequest
$bigCommerce->category();

//Get instance of an OrderRequest
$bigCommerce->order();

//Get instance of a CustomerRequest
$bigCommerce->customer();

Get instance of a MerchantRequest
$bigCommerce->merchant();

```

**NOTE: All publicly accessible methods in these repositories return instances of `Psr\Http\Message\ResponseInterface`, so you must resolve them to get their actual return values.**

### Working with product requests

[](#working-with-product-requests)

#### Creating a product

[](#creating-a-product)

```

$product = array(
    'name' => 'Dell XPS 15',
    'weight' => 10.5,
    'price' => 1500,
    'sku' => 'DELL-XPS-15'
);

$promise = $productRequest->create($product);

```

#### Updating a product

[](#updating-a-product)

```
$id = 1;
$productInfo = array(
    'name' => 'Dell XPS 13'
);

$promise = $productRequest->update($id, $productInfo);

```

#### Fetching a collection of products

[](#fetching-a-collection-of-products)

```
$page = 1;
$limit = 1000;
$includes = ['images', 'variants'];

$promise = $productRequest->fetch($page, $limit, $includes);

```

#### Fetching a single product

[](#fetching-a-single-product)

```
$id = 1;
$promise = $productRequest->fetchById($id);

```

#### Deleting products

[](#deleting-products)

```
$id = 1;
$promise = $productRequest->deleteById($id);

```

#### Fetch images for a product

[](#fetch-images-for-a-product)

```
$productId = 1;

$promise = $productRequest->fetchProductImages($productId);

```

#### Upload an image for a product

[](#upload-an-image-for-a-product)

```
$productId = 1;

//External image
$imageFile = 'http://www.somedomain.com/images/product1.jpeg';

//Or
//Local image
$imageFile = 'images/product1.png';

$promise = $productRequest->uploadProductImage($productId, $imageFile);

```

**See `Maverickslab\BigCommerce\Http\Request\ProductRequest` for more information on how to perform other product related requests.**

### Working with categories requests

[](#working-with-categories-requests)

#### Creating a category

[](#creating-a-category)

```
$category = array(
    'name' => 'Cars',
    'parent_id' => 0
);

$promise = $categoryRequest->create($category);

```

#### Updating a category

[](#updating-a-category)

```
$categoryId = 1;
$categoryInfo = array(
    'name' => 'Bikes',
    'parent_id' => 1
);

$promise = $categoryRequest->update($categoryId, $categoryInfo);

```

#### Fetching a collection categories

[](#fetching-a-collection-categories)

```
$page = 1;
$limit = 500;

$promise = $categoryRequest->fetch($page, $limit);

```

**See `Maverickslab\BigCommerce\Http\Request\CategoryRequest` for more on how to perform other category related requests.**

### Working with orders requests

[](#working-with-orders-requests)

#### Fetching a collection of orders

[](#fetching-a-collection-of-orders)

```
$page = 1;
$limit = 500;
$filters = [];

$promise = $orderRequest->fetch($page, $limit, $filters);

```

#### Updating orders

[](#updating-orders)

```
$orderId = 1;
$orderInfo = array(
    'status_id' => 10
);

$promise = $orderRequest->update($orderId, $orderInfo);

```

#### Fetching ordered products

[](#fetching-ordered-products)

```
$orderId = 1;
$page = 1;
$limit = 250;

$promise = $orderRequest->fetchOrderedProducts($orderId, $page, $limit);

```

**See `Maverickslab\BigCommerce\Http\Request\OrderRequest` for more on how to perform other order related requests.**

### Working with customers requests

[](#working-with-customers-requests)

#### Fetching a collection of customers

[](#fetching-a-collection-of-customers)

```
$page = 1;
$limit = 250;
$filters = [];
$promise = $customerRequest->fetch($page, $limit, $filters);

```

### Fetching a single customer

[](#fetching-a-single-customer)

```
$customerId = 2;

$promise = $customerRequest->fetchById($customerId);

```

#### Creating a customer

[](#creating-a-customer)

```
$customer = array(
    'first_name' => 'John',
    'last_name' => 'Smith',
    'email' => 'johnsmith@somedomain.com',
    'phone' => '+2335457487484'
);

$promise = $customerRequest->create($customer);

```

**See `Maverickslab\BigCommerce\Http\Request\CustomerRequest` for more on how to perform other customer related requests.**

### Working with merchant requests

[](#working-with-merchant-requests)

#### Fetching merchant information

[](#fetching-merchant-information)

```
$promise = $merchantRequest->fetchDetails();

```

### Resolving a promise

[](#resolving-a-promise)

```
use Psr\Http\Message\ResponseInterface;
use GuzzleHttp\Exception\RequestException;

$promise->then(function(ResponseInterface $response){
    //Do something wih the response
}, function(RequestException $e){
    echo $e->getMessage();
});

```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/5f695cede213ece9f3d82ba0a59e59c1f929726b02882b0cac291fda0a9c6616?d=identicon)[maverickslab](/maintainers/maverickslab)

---

Top Contributors

[![mavericks-lab](https://avatars.githubusercontent.com/u/11646865?v=4)](https://github.com/mavericks-lab "mavericks-lab (1 commits)")

### Embed Badge

![Health badge](/badges/mavericks-lab-bigcommerce/health.svg)

```
[![Health](https://phpackages.com/badges/mavericks-lab-bigcommerce/health.svg)](https://phpackages.com/packages/mavericks-lab-bigcommerce)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M478](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M271](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
