Skip to content

sam-ecomdev/bigcommerce-swaggerclient-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SwaggerClient-php

Manage products, brands and categories. To learn more about catalog resources see Catalog Overview. - Authentication - Differentiating Variants & Modifiers - Available Endpoints - Resources ## Authentication Requests can be authenticated by sending an access_token via X-Auth-Token HTTP header: http GET /stores/{$$.env.store_hash}/v3/catalog/summary host: api.bigcommerce.com Accept: application/json X-Auth-Token: {access_token} |Header|Parameter|Description| |-|-|-| |X-Auth-Token|access_token |Obtained by creating an API account or installing an app in a BigCommerce control panel.| ### OAuth Scopes | UI Name | Permission | Parameter | |----------|------------|-------------------------------| | Products | modify | store_v2_products | | Products | read-only | store_v2_products_read_only | For more information on OAuth Scopes, see: Authentication. For more information on Authenticating BigCommerce APIs, see: Authentication. ## Differentiating Variants and Modifiers Variants represent a physical product made up of Product Option choices, i.e. a large blue t-shirt. Each variant can have a unique SKU. Modifiers represent a choice a customer makes about a product that doesn't represent a physical item, i.e. text to be printed on a t-shirt. Assigning a SKU to a modifier will turn it into a variant. See Variant Options and Modifier Options for more information. ## Available Endpoints | Resource / Endpoint | Description | |-----------------------------------------|-------------------------------------------------------------------------| | Brand Images | Create and manage brand images | | Brand Metafields | Create and manage brand metafields | | Brands | Create and manage brands | | Catalog | Create and manage store categories, products, and brands | | Categories | Create and manage categorties | | Category Images | Create and manage category images | | Category Metafields | Create and manage category metafields | | Product Bulk Pricing Rules | Create and manage product bulk pricing rules | | Product Complex Rules | Create and manage product complex rules | | Product Custom Fields | Create and manage product custom fields | | Product Images | Create and manage product images | | Product Metafields | Create and manage product meta fields | | Product Modifier Images | Create and manage product modifer images | | Product Modifier Values | Create and manage product modifier values | | Product Modifiers | Create and manage product midifiers | | Product Reviews | Create and manage product reviews | | Product Variant Option Values | Create and manage product variant option values | | Product Variant Options | Create and manage product variant options | | Product Variants | Create and manage product variants | | Product Videos | Create and manage product videos | | Products | Create and manage products | | ProductVariant Metafields | Create and manage product meta flields | | Variants | Get and update all variants | ## Resources ### Webhooks * Products * Categories * SKU ### Related Endpoints * Catalog API

This PHP package is automatically generated by the Swagger Codegen project:

  • API version:
  • Build package: io.swagger.codegen.languages.PhpClientCodegen For more information, please visit

Requirements

PHP 5.5 and later

Installation & Usage

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "git",
      "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
    }
  ],
  "require": {
    "GIT_USER_ID/GIT_REPO_ID": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

    require_once('/path/to/SwaggerClient-php/vendor/autoload.php');

Tests

To run the unit tests:

composer install
./vendor/bin/phpunit

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: X-Auth-Token
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');

$apiInstance = new Swagger\Client\Api\BrandImagesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$brand_id = 56; // int | The ID of the `Brand` to which the resource belongs.
$accept = "application/json"; // string | 
$content_type = "application/json"; // string | 
$image_file = "/path/to/file.txt"; // \SplFileObject | 

try {
    $result = $apiInstance->createBrandImage($brand_id, $accept, $content_type, $image_file);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BrandImagesApi->createBrandImage: ', $e->getMessage(), PHP_EOL;
}

?>

Documentation for API Endpoints

All URIs are relative to https://api.bigcommerce.com/stores/{$$.env.store_hash}/v3

Class Method HTTP request Description
BrandImagesApi createBrandImage POST /catalog/brands/{brand_id}/image Create a Brand Image
BrandImagesApi deleteBrandImage DELETE /catalog/brands/{brand_id}/image Delete a Brand Image
BrandMetafieldsApi createBrandMetafield POST /catalog/brands/{brand_id}/metafields Create a Brand Metafield
BrandMetafieldsApi deleteBrandMetafieldById DELETE /catalog/brands/{brand_id}/metafields/{metafield_id} Delete a Brand Metafield
BrandMetafieldsApi getBrandMetafieldByBrandId GET /catalog/brands/{brand_id}/metafields/{metafield_id} Get a Brand Metafields
BrandMetafieldsApi getBrandMetafieldsByBrandId GET /catalog/brands/{brand_id}/metafields Get All Brand Metafields
BrandMetafieldsApi updateBrandMetafield PUT /catalog/brands/{brand_id}/metafields/{metafield_id} Update a Brand Metafield
BrandsApi createBrand POST /catalog/brands Create a Brand
BrandsApi deleteBrandById DELETE /catalog/brands/{brand_id} Delete a Brand
BrandsApi deleteBrands DELETE /catalog/brands Delete Brands
BrandsApi getBrandById GET /catalog/brands/{brand_id} Get a Brand
BrandsApi getBrands GET /catalog/brands Get All Brands
BrandsApi updateBrand PUT /catalog/brands/{brand_id} Update a Brand
CatalogApi deleteBrands DELETE /catalog/brands Delete Brands
CatalogApi deleteProducts DELETE /catalog/products Delete Products
CatalogApi updateVariantsBatch PUT /catalog/variants Update Variants (Batch)
CategoryApi createCategory POST /catalog/categories Create a Category
CategoryApi deleteCategories DELETE /catalog/categories Delete Categories
CategoryApi deleteCategoryById DELETE /catalog/categories/{category_id} Delete a Category
CategoryApi getCategories GET /catalog/categories Get All Categories
CategoryApi getCategoryById GET /catalog/categories/{category_id} Get a Category
CategoryApi getCategoryTree GET /catalog/categories/tree Get Category Tree
CategoryApi updateCategory PUT /catalog/categories/{category_id} Update a Category
CategoryImagesApi createCategoryImage POST /catalog/categories/{category_id}/image Create a Category Image
CategoryImagesApi deleteCategoryImage DELETE /catalog/categories/{category_id}/image Delete a Category Image
CategoryMetafieldsApi createCategoryMetafield POST /catalog/categories/{category_id}/metafields Create a Category Metafield
CategoryMetafieldsApi deleteCategoryMetafieldById DELETE /catalog/categories/{category_id}/metafields/{metafield_id} Delete a Category Metafield
CategoryMetafieldsApi getCategoryMetafieldByCategoryId GET /catalog/categories/{category_id}/metafields/{metafield_id} Get a Category Metafield
CategoryMetafieldsApi getCategoryMetafieldsByCategoryId GET /catalog/categories/{category_id}/metafields Get All Category Metafields
CategoryMetafieldsApi updateCategoryMetafield PUT /catalog/categories/{category_id}/metafields/{metafield_id} Update a Category Metafield
ProductBulkPricingRulesApi createBulkPricingRule POST /catalog/products/{product_id}/bulk-pricing-rules Creates a Bulk Pricing Rule
ProductBulkPricingRulesApi deleteBulkPricingRuleById DELETE /catalog/products/{product_id}/bulk-pricing-rules/{bulk_pricing_rule_id} Delete a Bulk Pricing Rule
ProductBulkPricingRulesApi getBulkPricingRuleById GET /catalog/products/{product_id}/bulk-pricing-rules/{bulk_pricing_rule_id} Get a Bulk Pricing Rule
ProductBulkPricingRulesApi getBulkPricingRules GET /catalog/products/{product_id}/bulk-pricing-rules Get All Bulk Pricing Rules
ProductBulkPricingRulesApi updateBulkPricingRule PUT /catalog/products/{product_id}/bulk-pricing-rules/{bulk_pricing_rule_id} Update a Bulk Pricing Rule
ProductComplexRulesApi createComplexRule POST /catalog/products/{product_id}/complex-rules Create a Complex Rule
ProductComplexRulesApi deleteComplexRuleById DELETE /catalog/products/{product_id}/complex-rules/{complex_rule_id} Delete a Complex Rule
ProductComplexRulesApi getComplexRuleById GET /catalog/products/{product_id}/complex-rules/{complex_rule_id} Get a Complex Rule
ProductComplexRulesApi getComplexRules GET /catalog/products/{product_id}/complex-rules Get Complex Rules
ProductComplexRulesApi updateComplexRule PUT /catalog/products/{product_id}/complex-rules/{complex_rule_id} Update a Complex Rule
ProductCustomFieldsApi createCustomField POST /catalog/products/{product_id}/custom-fields Create a Custom Fields
ProductCustomFieldsApi deleteCustomFieldById DELETE /catalog/products/{product_id}/custom-fields/{custom_field_id} Delete a Custom Field
ProductCustomFieldsApi getCustomFieldById GET /catalog/products/{product_id}/custom-fields/{custom_field_id} Get a Custom Field
ProductCustomFieldsApi getCustomFields GET /catalog/products/{product_id}/custom-fields Get Custom Fields
ProductCustomFieldsApi updateCustomField PUT /catalog/products/{product_id}/custom-fields/{custom_field_id} Update a Custom Field
ProductImagesApi createProductImage POST /catalog/products/{product_id}/images Create a Product Image
ProductImagesApi deleteProductImage DELETE /catalog/products/{product_id}/images/{image_id} Delete a Product Image
ProductImagesApi getProductImageById GET /catalog/products/{product_id}/images/{image_id} Get a Product Image
ProductImagesApi getProductImages GET /catalog/products/{product_id}/images Get All Product Images
ProductImagesApi updateProductImage PUT /catalog/products/{product_id}/images/{image_id} Update a Product Image
ProductMetafieldsApi createProductMetafield POST /catalog/products/{product_id}/metafields Create a Product Metafield
ProductMetafieldsApi deleteProductMetafieldById DELETE /catalog/products/{product_id}/metafields/{metafield_id} Delete a Product Metafield
ProductMetafieldsApi getProductMetafieldByProductId GET /catalog/products/{product_id}/metafields/{metafield_id} Get a Product Metafield
ProductMetafieldsApi getProductMetafieldsByProductId GET /catalog/products/{product_id}/metafields Get All Product Metafields
ProductMetafieldsApi updateProductMetafield PUT /catalog/products/{product_id}/metafields/{metafield_id} Update a Product Metafield
ProductModifierImagesApi createModifierImage POST /catalog/products/{product_id}/modifiers/{modifier_id}/values/{value_id}/image Create Modifier Image
ProductModifierImagesApi deleteModifierImage DELETE /catalog/products/{product_id}/modifiers/{modifier_id}/values/{value_id}/image Delete Modifier Image
ProductModifierValuesApi createModifierValue POST /catalog/products/{product_id}/modifiers/{modifier_id}/values Create Modifier Value
ProductModifierValuesApi deleteModifierValueById DELETE /catalog/products/{product_id}/modifiers/{modifier_id}/values/{value_id} Delete Modifier Value
ProductModifierValuesApi getModifierValueById GET /catalog/products/{product_id}/modifiers/{modifier_id}/values/{value_id} Get a Modifier Value
ProductModifierValuesApi getModifierValues GET /catalog/products/{product_id}/modifiers/{modifier_id}/values Get All Modifier Values
ProductModifierValuesApi updateModifierValue PUT /catalog/products/{product_id}/modifiers/{modifier_id}/values/{value_id} Update a Modifier Value
ProductModifiersApi createModifier POST /catalog/products/{product_id}/modifiers Create a Product Modifier
ProductModifiersApi deleteModifierById DELETE /catalog/products/{product_id}/modifiers/{modifier_id} Delete a Modifier
ProductModifiersApi getModifierById GET /catalog/products/{product_id}/modifiers/{modifier_id} Get a Modifier
ProductModifiersApi getModifiers GET /catalog/products/{product_id}/modifiers Get All Product Modifiers
ProductModifiersApi updateModifier PUT /catalog/products/{product_id}/modifiers/{modifier_id} Update a Modifier
ProductOptionValuesApi createOptionValue POST /catalog/products/{product_id}/options/{option_id}/values Create Product Option Values
ProductOptionValuesApi deleteOptionValueById DELETE /catalog/products/{product_id}/options/{option_id}/values/{value_id} Delete a Product Option Value
ProductOptionValuesApi getOptionValueById GET /catalog/products/{product_id}/options/{option_id}/values/{value_id} Get a Product Option Value
ProductOptionValuesApi getOptionValues GET /catalog/products/{product_id}/options/{option_id}/values Get all Product Option Values
ProductOptionValuesApi updateOptionValue PUT /catalog/products/{product_id}/options/{option_id}/values/{value_id} Update a Product Option Value
ProductOptionsApi createOption POST /catalog/products/{product_id}/options Create a Product Option
ProductOptionsApi deleteOptionById DELETE /catalog/products/{product_id}/options/{option_id} Delete a Product Option
ProductOptionsApi getOptionById GET /catalog/products/{product_id}/options/{option_id} Get a Product Option
ProductOptionsApi getOptions GET /catalog/products/{product_id}/options Get all Product Options
ProductOptionsApi updateOption PUT /catalog/products/{product_id}/options/{option_id} Update a Product Option
ProductReviewsApi createProductReview POST /catalog/products/{product_id}/reviews Create a Product Review
ProductReviewsApi deleteProductReview DELETE /catalog/products/{product_id}/reviews/{review_id} Delete a Product Review
ProductReviewsApi getProductReviewById GET /catalog/products/{product_id}/reviews/{review_id} Get a Product Review
ProductReviewsApi getProductReviews GET /catalog/products/{product_id}/reviews Get Product Reviews
ProductReviewsApi updateProductReview PUT /catalog/products/{product_id}/reviews/{review_id} Update a Product Review
ProductVariantsApi createVariant POST /catalog/products/{product_id}/variants Create a Product Variant
ProductVariantsApi createVariantImage POST /catalog/products/{product_id}/variants/{variant_id}/image Create a Variant Image
ProductVariantsApi deleteVariantById DELETE /catalog/products/{product_id}/variants/{variant_id} Delete a Product Variant
ProductVariantsApi getVariantById GET /catalog/products/{product_id}/variants/{variant_id} Get a Product Variant
ProductVariantsApi getVariantsByProductId GET /catalog/products/{product_id}/variants Get All Product Variants
ProductVariantsApi updateVariant PUT /catalog/products/{product_id}/variants/{variant_id} Update a Product Variant
ProductVariantsMetafieldsApi createVariantMetafield POST /catalog/products/{product_id}/variants/{variant_id}/metafields Create a Product Variant Metafield
ProductVariantsMetafieldsApi deleteVariantMetafieldById DELETE /catalog/products/{product_id}/variants/{variant_id}/metafields/{metafield_id} Delete a Variant Metafield
ProductVariantsMetafieldsApi getVariantMetafieldByProductIdAndVariantId GET /catalog/products/{product_id}/variants/{variant_id}/metafields/{metafield_id} Get Product Variant Metafields
ProductVariantsMetafieldsApi getVariantMetafieldsByProductIdAndVariantId GET /catalog/products/{product_id}/variants/{variant_id}/metafields Get Product Variant Metafields
ProductVariantsMetafieldsApi updateVariantMetafield PUT /catalog/products/{product_id}/variants/{variant_id}/metafields/{metafield_id} Update Product Variant Metafields
ProductVideosApi createProductVideo POST /catalog/products/{product_id}/videos Create a Product Video
ProductVideosApi deleteProductVideo DELETE /catalog/products/{product_id}/videos/{id} Delete a Product Video
ProductVideosApi getProductVideoById GET /catalog/products/{product_id}/videos/{id} Get a Product Video
ProductVideosApi getProductVideos GET /catalog/products/{product_id}/videos Get All Product Videos
ProductVideosApi updateProductVideo PUT /catalog/products/{product_id}/videos/{id} Update a Product Video
ProductsApi createProduct POST /catalog/products Create a Product
ProductsApi deleteProductById DELETE /catalog/products/{product_id} Delete a Product
ProductsApi deleteProducts DELETE /catalog/products Delete Products
ProductsApi getProductById GET /catalog/products/{product_id} Get a Product
ProductsApi getProducts GET /catalog/products Get All Products
ProductsApi updateProduct PUT /catalog/products/{product_id} Update a Product
ProductsApi updateProducts PUT /catalog/products Update Products (Batch)
SummaryApi getCatalogSummary GET /catalog/summary Get a Catalog Summary
VariantsApi getVariants GET /catalog/variants Get All Variants
VariantsApi updateVariantsBatch PUT /catalog/variants Update Variants (Batch)

Documentation For Models

Documentation For Authorization

X-Auth-Token

  • Type: API key
  • API key parameter name: X-Auth-Token
  • Location: HTTP header

Author

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages