Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
101 lines (71 sloc) 3.97 KB

Bigcommerce

Gem Version Build Status Dependency Status Code Climate Coverage Status

This is the official Bigcommerce API client to support our Rest API. You can find more information about becoming a Bigcommerce developer here: developer.bigcommerce.com.

⚠️ A note about the current client: ⚠️

This is a preview release of the 1.0.0 version of the Bigcommerce API Client. Please report issues if they come up.

We have introduced a new major version of the API client and it is a complete rewrite (for the better). If you want to see the old version of the API client, please view it here: Bigcommerce API client v0.x. We recommend that developers upgrade to the latest client, but we will still support our developers who are unable to upgrade.

Installation

Bigcommerce is available on Rubygems:

gem install bigcommerce --pre

You can also add it to your Gemfile.

gem 'bigcommerce', '>= 1.0.0.beta'

Getting Started

In order to make requests to our API, you must register as a developer and have your credentials ready.

We currently have two different authentication schemes you can use depending on your use-case.

Public Apps

Public apps can be submitted to Bigcommerce App Store, allowing other businesses to install it in their Bigcommerce stores.

More Information

Private Apps

To develop a custom integration for one store, your app needs to use Basic Authentication.

More Information

Usage

For full examples on using the API client, please see the examples folder.

Configuration

In order to authenticate the API client, you will need to configure the client like this:

Single Click (Public Apps):

  • client_id: Obtained from the "My Apps" section on the developer portal.
  • access_token: Obtained after a token exchange in the auth callback.
  • store_hash: Also obtained after the token exchange.
Bigcommerce.configure do |config|
  config.store_hash = 'store_hash'
  config.client_id = 'client_id'
  config.access_token = 'access_token'
end

Private Apps:

To get all the private app credentials, simply visit your store admin page and navigate to the Settings > Legacy API Settings. Once there, you can create a new username to authenticate with.

Bigcommerce.configure do |config|
  config.auth = 'legacy'
  config.url = 'https://api_path.com'
  config.username = 'username'
  config.api_key = 'api_key'
end

SSL Configuration:

If you are using your own self-signed certificate, you can pass SSL options to Faraday. This is not required, but may be useful in special edge cases.

Bigcommerce.configure do |config|
  config.auth = 'legacy'
  config.url = 'https://api_path.com'
  config.username = 'username'
  config.api_key = 'api_key'
  config.ssl = {
    # Faraday options here
  }
end

For more information about configuring SSL with Faraday, please see the following:

Contributing

See CONTRIBUTING.md

Something went wrong with that request. Please try again.