Example of using BigCommerce REST API V2 for fetching data.
- PHP >= 7.0
- cUrl extension enabled
Run following command to install:
composer installMain configuration file .env should contain following properties:
CLIENT_ID- BigCommerce Client ID (for created App)ACCESS_TOKEN- BigCommerce App Auth token (for created App)STORE_HASH- API Path in the url of the api site
To find your store hash Login to your BigCommerce Store -> Go to Advanced Settings -> Click API Accounts -> Create API Account (V2/V3 Token)
To generate an OAuth API token, follow this guide.
Below run example to log [customers, products, orders, pages, coupons, product options, categories, currencies, brands] from BigCommerce site:
php get_customers.php
php get_products.php
php get_orders.php
php get_pages.php
php get_coupons.php
php get_product_options.php
php get_categories.php
php get_currencies.php
php get_brands.phpIt will log accordingly:
- All customers data to
log/customers.logfile - All products to
log/products.logfile - All orders to
log/orders.logfile - All pages to
log/pages.logfile - All coupons to
log/coupons.logfile - All product options to
log/product_options.logfile - All categories to
log/get_categories.logfile - All currencies to
log/currencies.logfile - All brands to
log/brands.logfile
To find more specific information please see official GitHub repo:
Official APi Reference: