All URIs are relative to https://api.keap.com/crm, except if the operation defines another base path.
| Method | HTTP request | Description |
|---|---|---|
| createCategoryDiscount() | POST /rest/v2/discounts/productCategories | Create a Category Discount |
| deleteCategoryDiscount() | DELETE /rest/v2/discounts/productCategories/{discount_id} | Delete a Category Discount |
| getCategoryDiscount() | GET /rest/v2/discounts/productCategories/{discount_id} | Retrieve a Category Discount |
| listCategoryDiscounts() | GET /rest/v2/discounts/productCategories | List Category Discounts |
| updateCategoryDiscount() | PATCH /rest/v2/discounts/productCategories/{discount_id} | Update a Category Discount |
createCategoryDiscount($create_category_discount_request): \Keap\Core\V2\Model\CategoryDiscountCreate a Category Discount
Creates a Category Discount
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: oauth2
$config = Keap\Core\V2\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Keap\Core\V2\Api\CategoryDiscountsApi(
// 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
);
$create_category_discount_request = new \Keap\Core\V2\Model\CreateCategoryDiscountRequest(); // \Keap\Core\V2\Model\CreateCategoryDiscountRequest
try {
$result = $apiInstance->createCategoryDiscount($create_category_discount_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CategoryDiscountsApi->createCategoryDiscount: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| create_category_discount_request | \Keap\Core\V2\Model\CreateCategoryDiscountRequest |
\Keap\Core\V2\Model\CategoryDiscount
- Content-Type:
application/json - Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteCategoryDiscount($discount_id)Delete a Category Discount
Deletes a specified Category Discount
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: oauth2
$config = Keap\Core\V2\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Keap\Core\V2\Api\CategoryDiscountsApi(
// 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
);
$discount_id = 'discount_id_example'; // string
try {
$apiInstance->deleteCategoryDiscount($discount_id);
} catch (Exception $e) {
echo 'Exception when calling CategoryDiscountsApi->deleteCategoryDiscount: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| discount_id | string |
void (empty response body)
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getCategoryDiscount($discount_id): \Keap\Core\V2\Model\CategoryDiscountRetrieve a Category Discount
Retrieves a single Category Discount
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: oauth2
$config = Keap\Core\V2\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Keap\Core\V2\Api\CategoryDiscountsApi(
// 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
);
$discount_id = 'discount_id_example'; // string
try {
$result = $apiInstance->getCategoryDiscount($discount_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CategoryDiscountsApi->getCategoryDiscount: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| discount_id | string |
\Keap\Core\V2\Model\CategoryDiscount
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
listCategoryDiscounts($filter, $order_by, $page_size, $page_token): \Keap\Core\V2\Model\ListCategoryDiscountsResponseList Category Discounts
Retrieves a list of Category Discounts
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: oauth2
$config = Keap\Core\V2\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Keap\Core\V2\Api\CategoryDiscountsApi(
// 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
);
$filter = 'filter_example'; // string | Filter to apply, the allowed field is: - (String) `product_category_id` You will need to apply the `==` operator to check the equality of the filter with your searched word, in the encoded form `%3D%3D`. For the filters listed above, here are some examples: - `filter=product_category_id%3D%3D4`
$order_by = 'order_by_example'; // string | Attribute and direction to order items. One of the following fields: - `id` - `name` One of the following directions: - `asc` - `desc`
$page_size = 0; // int | Total number of items to return per page
$page_token = 'page_token_example'; // string | Page token
try {
$result = $apiInstance->listCategoryDiscounts($filter, $order_by, $page_size, $page_token);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CategoryDiscountsApi->listCategoryDiscounts: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| filter | string | Filter to apply, the allowed field is: - (String) `product_category_id` You will need to apply the `==` operator to check the equality of the filter with your searched word, in the encoded form `%3D%3D`. For the filters listed above, here are some examples: - `filter=product_category_id%3D%3D4` | [optional] |
| order_by | string | Attribute and direction to order items. One of the following fields: - `id` - `name` One of the following directions: - `asc` - `desc` | [optional] |
| page_size | int | Total number of items to return per page | [optional] |
| page_token | string | Page token | [optional] |
\Keap\Core\V2\Model\ListCategoryDiscountsResponse
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
updateCategoryDiscount($discount_id, $update_category_discount_request, $update_mask): \Keap\Core\V2\Model\CategoryDiscountUpdate a Category Discount
Updates a Category Discount
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: oauth2
$config = Keap\Core\V2\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Keap\Core\V2\Api\CategoryDiscountsApi(
// 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
);
$discount_id = 'discount_id_example'; // string
$update_category_discount_request = new \Keap\Core\V2\Model\UpdateCategoryDiscountRequest(); // \Keap\Core\V2\Model\UpdateCategoryDiscountRequest
$update_mask = NULL; // mixed | An optional list of properties to be updated. If set, only the provided properties will be updated and others will be skipped.
try {
$result = $apiInstance->updateCategoryDiscount($discount_id, $update_category_discount_request, $update_mask);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CategoryDiscountsApi->updateCategoryDiscount: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| discount_id | string | ||
| update_category_discount_request | \Keap\Core\V2\Model\UpdateCategoryDiscountRequest | ||
| update_mask | mixed | An optional list of properties to be updated. If set, only the provided properties will be updated and others will be skipped. | [optional] |
\Keap\Core\V2\Model\CategoryDiscount
- Content-Type:
application/json - Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]