All URIs are relative to https://api.kinow.com/api
Method | HTTP request | Description |
---|---|---|
attachCartRuleToCart | POST /carts/{cart_id}/cart-rules | |
createCartRule | POST /cart-rules | |
deleteCartRule | DELETE /cart-rules/{cart_rule_id} | |
detachCartRuleFromCart | DELETE /carts/{cart_id}/cart-rules/{cart_rule_id} | |
getCartRule | GET /cart-rules/{cart_rule_id} | |
getCartRules | GET /cart-rules | |
updateCartRule | PUT /cart-rules/{cart_rule_id} |
attachCartRuleToCart($cart_id, $code, $ip)
Attach cart rule to cart
<?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\CartRulesApi();
$cart_id = 789; // int | Cart ID to fetch
$code = "code_example"; // string | Code of the cart rule to attach
$ip = "ip_example"; // string | Filter by user IP
try {
$api_instance->attachCartRuleToCart($cart_id, $code, $ip);
} catch (Exception $e) {
echo 'Exception when calling CartRulesApi->attachCartRuleToCart: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
cart_id | int | Cart ID to fetch | |
code | string | Code of the cart rule to attach | |
ip | string | Filter by user IP | [optional] |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
createCartRule($body)
Create new cart rule
<?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\CartRulesApi();
$body = new \Kinow\Client\Model\CreateCartRuleRequest(); // \Kinow\Client\Model\CreateCartRuleRequest |
try {
$api_instance->createCartRule($body);
} catch (Exception $e) {
echo 'Exception when calling CartRulesApi->createCartRule: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \Kinow\Client\Model\CreateCartRuleRequest |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
deleteCartRule($cart_rule_id)
Delete cart rule
<?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\CartRulesApi();
$cart_rule_id = 56; // int |
try {
$api_instance->deleteCartRule($cart_rule_id);
} catch (Exception $e) {
echo 'Exception when calling CartRulesApi->deleteCartRule: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
cart_rule_id | int |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
detachCartRuleFromCart($cart_id, $cart_rule_id)
Detach Cart rule from Cart
<?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\CartRulesApi();
$cart_id = 789; // int | Cart ID to fetch
$cart_rule_id = 789; // int | Cart rule ID to detach
try {
$api_instance->detachCartRuleFromCart($cart_id, $cart_rule_id);
} catch (Exception $e) {
echo 'Exception when calling CartRulesApi->detachCartRuleFromCart: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
cart_id | int | Cart ID to fetch | |
cart_rule_id | int | Cart rule ID to detach |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
\Kinow\Client\Model\CartRuleResponse getCartRule($cart_rule_id)
Get cart rule by id
<?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\CartRulesApi();
$cart_rule_id = 789; // int | Cart rule ID to fetch
try {
$result = $api_instance->getCartRule($cart_rule_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CartRulesApi->getCartRule: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
cart_rule_id | int | Cart rule ID to fetch |
\Kinow\Client\Model\CartRuleResponse
- Content-Type: Not defined
- Accept: Not defined
\Kinow\Client\Model\CartRuleListResponse getCartRules($page, $per_page, $filters)
Get cart rules list
<?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\CartRulesApi();
$page = 789; // int |
$per_page = 789; // int |
$filters = "filters_example"; // string | ``` name[value]=string&name[operator]=contains&date_add[value]=string&date_add[operator]=lt _______________ { \"name\": { \"value\": \"string\", \"operator\": \"contains\" }, \"date_add\": { \"value\": \"string\", \"operator\": \"lt\" } } ``` Operator can be: strict, contains, between, in, gt (greater than), lt (lower than).
try {
$result = $api_instance->getCartRules($page, $per_page, $filters);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CartRulesApi->getCartRules: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
page | int | [optional] | |
per_page | int | [optional] | |
filters | string | ``` name[value]=string&name[operator]=contains&date_add[value]=string&date_add[operator]=lt _______________ { "name": { "value": "string", "operator": "contains" }, "date_add": { "value": "string", "operator": "lt" } } ``` Operator can be: strict, contains, between, in, gt (greater than), lt (lower than). | [optional] |
\Kinow\Client\Model\CartRuleListResponse
- Content-Type: Not defined
- Accept: Not defined
updateCartRule($cart_rule_id, $body)
Update cart rule
<?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\CartRulesApi();
$cart_rule_id = 56; // int |
$body = new \Kinow\Client\Model\UpdateCartRuleRequest(); // \Kinow\Client\Model\UpdateCartRuleRequest |
try {
$api_instance->updateCartRule($cart_rule_id, $body);
} catch (Exception $e) {
echo 'Exception when calling CartRulesApi->updateCartRule: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
cart_rule_id | int | ||
body | \Kinow\Client\Model\UpdateCartRuleRequest |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined