Modules@robinpath/bigcommerce
bigcommerce

@robinpath/bigcommerce

0.1.2Node.jsPublic

BigCommerce module for RobinPath.

BigCommerce

BigCommerce module for RobinPath.

Package: @robinpath/bigcommerce | Category: Ecommerce | Type: Integration

Authentication

bigcommerce.setCredentials "your-credentials"

Call this once at the start of your script before using any other function. Credentials persist for the duration of the script execution.

Use Cases

Use the bigcommerce module when you need to:

  • listProducts -- Use bigcommerce.listProducts to perform this operation
  • getProduct -- Use bigcommerce.getProduct to perform this operation
  • createProduct -- Use bigcommerce.createProduct to perform this operation
  • updateProduct -- Use bigcommerce.updateProduct to perform this operation
  • deleteProduct -- Use bigcommerce.deleteProduct to perform this operation

Quick Reference

FunctionDescriptionReturns
setCredentialsConfigure bigcommerce credentials.object
listProductslistProductsobject
getProductgetProductobject
createProductcreateProductobject
updateProductupdateProductobject
deleteProductdeleteProductobject
listOrderslistOrdersobject
getOrdergetOrderobject
updateOrderupdateOrderobject
listCustomerslistCustomersobject
getCustomergetCustomerobject
createCustomercreateCustomerobject
updateCustomerupdateCustomerobject
listCategorieslistCategoriesobject
createCategorycreateCategoryobject
listBrandslistBrandsobject
createBrandcreateBrandobject
getOrderProductsgetOrderProductsobject
getStoreInfogetStoreInfoobject
listChannelslistChannelsobject
getOrderShipmentsgetOrderShipmentsobject

Functions

setCredentials

Configure bigcommerce credentials.

Module: bigcommerce | Returns: object -- API response.

bigcommerce.setCredentials
ParameterTypeRequiredDescription
storeHashstringYesstoreHash
accessTokenstringYesaccessToken

listProducts

listProducts

Module: bigcommerce | Returns: object -- API response.

bigcommerce.listProducts
ParameterTypeRequiredDescription
inputstringNoInput parameter

getProduct

getProduct

Module: bigcommerce | Returns: object -- API response.

bigcommerce.getProduct
ParameterTypeRequiredDescription
inputstringNoInput parameter

createProduct

createProduct

Module: bigcommerce | Returns: object -- API response.

bigcommerce.createProduct
ParameterTypeRequiredDescription
inputstringNoInput parameter

updateProduct

updateProduct

Module: bigcommerce | Returns: object -- API response.

bigcommerce.updateProduct
ParameterTypeRequiredDescription
inputstringNoInput parameter

deleteProduct

deleteProduct

Module: bigcommerce | Returns: object -- API response.

bigcommerce.deleteProduct
ParameterTypeRequiredDescription
inputstringNoInput parameter

listOrders

listOrders

Module: bigcommerce | Returns: object -- API response.

bigcommerce.listOrders
ParameterTypeRequiredDescription
inputstringNoInput parameter

getOrder

getOrder

Module: bigcommerce | Returns: object -- API response.

bigcommerce.getOrder
ParameterTypeRequiredDescription
inputstringNoInput parameter

updateOrder

updateOrder

Module: bigcommerce | Returns: object -- API response.

bigcommerce.updateOrder
ParameterTypeRequiredDescription
inputstringNoInput parameter

listCustomers

listCustomers

Module: bigcommerce | Returns: object -- API response.

bigcommerce.listCustomers
ParameterTypeRequiredDescription
inputstringNoInput parameter

getCustomer

getCustomer

Module: bigcommerce | Returns: object -- API response.

bigcommerce.getCustomer
ParameterTypeRequiredDescription
inputstringNoInput parameter

createCustomer

createCustomer

Module: bigcommerce | Returns: object -- API response.

bigcommerce.createCustomer
ParameterTypeRequiredDescription
inputstringNoInput parameter

updateCustomer

updateCustomer

Module: bigcommerce | Returns: object -- API response.

bigcommerce.updateCustomer
ParameterTypeRequiredDescription
inputstringNoInput parameter

listCategories

listCategories

Module: bigcommerce | Returns: object -- API response.

bigcommerce.listCategories
ParameterTypeRequiredDescription
inputstringNoInput parameter

createCategory

createCategory

Module: bigcommerce | Returns: object -- API response.

bigcommerce.createCategory
ParameterTypeRequiredDescription
inputstringNoInput parameter

listBrands

listBrands

Module: bigcommerce | Returns: object -- API response.

bigcommerce.listBrands
ParameterTypeRequiredDescription
inputstringNoInput parameter

createBrand

createBrand

Module: bigcommerce | Returns: object -- API response.

bigcommerce.createBrand
ParameterTypeRequiredDescription
inputstringNoInput parameter

getOrderProducts

getOrderProducts

Module: bigcommerce | Returns: object -- API response.

bigcommerce.getOrderProducts
ParameterTypeRequiredDescription
inputstringNoInput parameter

getStoreInfo

getStoreInfo

Module: bigcommerce | Returns: object -- API response.

bigcommerce.getStoreInfo
ParameterTypeRequiredDescription
inputstringNoInput parameter

listChannels

listChannels

Module: bigcommerce | Returns: object -- API response.

bigcommerce.listChannels
ParameterTypeRequiredDescription
inputstringNoInput parameter

getOrderShipments

getOrderShipments

Module: bigcommerce | Returns: object -- API response.

bigcommerce.getOrderShipments
ParameterTypeRequiredDescription
inputstringNoInput parameter

Error Handling

All functions throw on failure. Common errors:

ErrorCause
Bigcommerce API error (${res.status}): ${t}Check the error message for details
bigcommerce.setCredentials requires storeHash, accessToken.Check the error message for details
bigcommerce.updateProduct requires an ID.Check the error message for details
bigcommerce.deleteProduct requires an ID.Check the error message for details
bigcommerce.updateOrder requires an ID.Check the error message for details
bigcommerce.updateCustomer requires an ID.Check the error message for details
Bigcommerce: "..." not configured. Call bigcommerce.setCredentials first.Check the error message for details
@desc "List products and validate result"
do
  set $result as bigcommerce.listProducts
  if $result != null
    print "Success"
  else
    print "No result"
  end
enddo

Recipes

1. List and iterate Products

Retrieve all items and loop through them.

@desc "Setup authentication"
do
  bigcommerce.setCredentials $token
enddo

@desc "List products and iterate results"
do
  set $result as bigcommerce.listProducts
  each $item in $result
    print $item
  end
enddo

2. Create a new item with createProduct

Create a new resource and capture the result.

@desc "Setup authentication"
do
  bigcommerce.setCredentials $token
enddo

@desc "Create product"
do
  set $result as bigcommerce.createProduct
  print "Created: " + $result
enddo

3. Create and update workflow

Create an item and then update it.

@desc "Setup authentication"
do
  bigcommerce.setCredentials $token
enddo

@desc "Create product and update product"
do
  set $created as bigcommerce.createProduct
  # Update the created item
  bigcommerce.updateProduct
enddo

4. Check before creating

List existing items and only create if needed.

@desc "Setup authentication"
do
  bigcommerce.setCredentials $token
enddo

@desc "List products and create product"
do
  set $existing as bigcommerce.listProducts
  if $existing == null
    bigcommerce.createProduct
    print "Item created"
  else
    print "Item already exists"
  end
enddo

5. Multi-step BigCommerce workflow

Chain multiple bigcommerce operations together.

@desc "Setup authentication"
do
  bigcommerce.setCredentials $token
enddo

@desc "List products, get product, and more"
do
  set $r_listProducts as bigcommerce.listProducts
  set $r_getProduct as bigcommerce.getProduct
  set $r_createProduct as bigcommerce.createProduct
  print "All operations complete"
enddo

6. Safe listProducts with validation

Check results before proceeding.

@desc "Setup authentication"
do
  bigcommerce.setCredentials $token
enddo

@desc "List products and validate result"
do
  set $result as bigcommerce.listProducts
  if $result != null
    print "Success: " + $result
  else
    print "Operation returned no data"
  end
enddo

Related Modules

  • shopify -- Shopify module for complementary functionality
  • woocommerce -- WooCommerce module for complementary functionality
  • square -- Square module for complementary functionality
  • json -- JSON module for complementary functionality

Versions (1)

VersionTagPublished
0.1.2latest1 months ago
Install
$ robinpath add @robinpath/bigcommerce

Collaborators

Dumitru Balaban
Dumitru Balaban
@dumitru
View all @robinpath modules
Version0.1.2
LicenseMIT
Unpacked Size4.9 KB
Versions1
Weekly Downloads26
Total Downloads26
Stars0
Last Publish1 months ago
Created1 months ago

Category

sales