Skip to content

Latest commit

 

History

History
175 lines (123 loc) · 5.37 KB

BundlesApi.md

File metadata and controls

175 lines (123 loc) · 5.37 KB

BundlesApi

All URIs are relative to https://api.kinow.com/api

Method HTTP request Description
addProductToBundle PUT /bundles/{bundle_id}
getBundleProducts GET /bundles/{bundle_id}/products
removeProductFromBundle DELETE /bundles/{bundle_id}/{product_id}

addProductToBundle

addProductToBundle($bundle_id, $product_id, $position)

Add product to bundle

Example

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

// Configure API key authorization: ApiClientId
Kinow\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Client-Id', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Kinow\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Client-Id', 'Bearer');
// Configure API key authorization: ApiClientSecret
Kinow\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Client-Secret', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Kinow\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Client-Secret', 'Bearer');

$api_instance = new Kinow\Client\Api\BundlesApi();
$bundle_id = 789; // int | Bundle ID to fetch
$product_id = 789; // int | Product ID to add
$position = 789; // int | Product position

try {
    $api_instance->addProductToBundle($bundle_id, $product_id, $position);
} catch (Exception $e) {
    echo 'Exception when calling BundlesApi->addProductToBundle: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
bundle_id int Bundle ID to fetch
product_id int Product ID to add
position int Product position

Return type

void (empty response body)

Authorization

ApiClientId, ApiClientSecret

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

getBundleProducts

\Kinow\Client\Model\BlogPageProductsResponse getBundleProducts($bundle_id, $page, $per_page)

Get products from bundle

Example

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

// Configure API key authorization: ApiClientId
Kinow\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Client-Id', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Kinow\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Client-Id', 'Bearer');
// Configure API key authorization: ApiClientSecret
Kinow\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Client-Secret', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Kinow\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Client-Secret', 'Bearer');

$api_instance = new Kinow\Client\Api\BundlesApi();
$bundle_id = 789; // int | Bundle ID to fetch
$page = 789; // int | 
$per_page = 789; // int | 

try {
    $result = $api_instance->getBundleProducts($bundle_id, $page, $per_page);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BundlesApi->getBundleProducts: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
bundle_id int Bundle ID to fetch
page int [optional]
per_page int [optional]

Return type

\Kinow\Client\Model\BlogPageProductsResponse

Authorization

ApiClientId, ApiClientSecret

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

removeProductFromBundle

removeProductFromBundle($bundle_id, $product_id)

Remove product from bundle

Example

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

// Configure API key authorization: ApiClientId
Kinow\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Client-Id', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Kinow\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Client-Id', 'Bearer');
// Configure API key authorization: ApiClientSecret
Kinow\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Client-Secret', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Kinow\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Client-Secret', 'Bearer');

$api_instance = new Kinow\Client\Api\BundlesApi();
$bundle_id = 789; // int | Bundle ID to fetch
$product_id = 789; // int | Product ID to remove

try {
    $api_instance->removeProductFromBundle($bundle_id, $product_id);
} catch (Exception $e) {
    echo 'Exception when calling BundlesApi->removeProductFromBundle: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
bundle_id int Bundle ID to fetch
product_id int Product ID to remove

Return type

void (empty response body)

Authorization

ApiClientId, ApiClientSecret

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined