Skip to content

Latest commit

 

History

History
194 lines (130 loc) · 5.57 KB

BundlesApi.md

File metadata and controls

194 lines (130 loc) · 5.57 KB

KinowJavascriptSdk.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(bundleId, productId, position)

Add product to bundle

Example

var KinowJavascriptSdk = require('kinow-javascript-sdk');
var defaultClient = KinowJavascriptSdk.ApiClient.instance;

// Configure API key authorization: ApiClientId
var ApiClientId = defaultClient.authentications['ApiClientId'];
ApiClientId.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiClientId.apiKeyPrefix = 'Token';

// Configure API key authorization: ApiClientSecret
var ApiClientSecret = defaultClient.authentications['ApiClientSecret'];
ApiClientSecret.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiClientSecret.apiKeyPrefix = 'Token';

var apiInstance = new KinowJavascriptSdk.BundlesApi();

var bundleId = 789; // Integer | Bundle ID to fetch

var productId = 789; // Integer | Product ID to add

var position = 789; // Integer | Product position

apiInstance.addProductToBundle(bundleId, productId, position).then(function() {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
bundleId Integer Bundle ID to fetch
productId Integer Product ID to add
position Integer Product position

Return type

null (empty response body)

Authorization

ApiClientId, ApiClientSecret

HTTP request headers

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

getBundleProducts

BlogPageProductsResponse getBundleProducts(bundleId, opts)

Get products from bundle

Example

var KinowJavascriptSdk = require('kinow-javascript-sdk');
var defaultClient = KinowJavascriptSdk.ApiClient.instance;

// Configure API key authorization: ApiClientId
var ApiClientId = defaultClient.authentications['ApiClientId'];
ApiClientId.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiClientId.apiKeyPrefix = 'Token';

// Configure API key authorization: ApiClientSecret
var ApiClientSecret = defaultClient.authentications['ApiClientSecret'];
ApiClientSecret.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiClientSecret.apiKeyPrefix = 'Token';

var apiInstance = new KinowJavascriptSdk.BundlesApi();

var bundleId = 789; // Integer | Bundle ID to fetch

var opts = { 
  'page': 789, // Integer | 
  'perPage': 789 // Integer | 
};
apiInstance.getBundleProducts(bundleId, opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
bundleId Integer Bundle ID to fetch
page Integer [optional]
perPage Integer [optional]

Return type

BlogPageProductsResponse

Authorization

ApiClientId, ApiClientSecret

HTTP request headers

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

removeProductFromBundle

removeProductFromBundle(bundleId, productId)

Remove product from bundle

Example

var KinowJavascriptSdk = require('kinow-javascript-sdk');
var defaultClient = KinowJavascriptSdk.ApiClient.instance;

// Configure API key authorization: ApiClientId
var ApiClientId = defaultClient.authentications['ApiClientId'];
ApiClientId.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiClientId.apiKeyPrefix = 'Token';

// Configure API key authorization: ApiClientSecret
var ApiClientSecret = defaultClient.authentications['ApiClientSecret'];
ApiClientSecret.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiClientSecret.apiKeyPrefix = 'Token';

var apiInstance = new KinowJavascriptSdk.BundlesApi();

var bundleId = 789; // Integer | Bundle ID to fetch

var productId = 789; // Integer | Product ID to remove

apiInstance.removeProductFromBundle(bundleId, productId).then(function() {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
bundleId Integer Bundle ID to fetch
productId Integer Product ID to remove

Return type

null (empty response body)

Authorization

ApiClientId, ApiClientSecret

HTTP request headers

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