All URIs are relative to https://api.voucherify.io, except if the operation defines another base path.
Method | HTTP request | Description |
---|---|---|
createPromotionStack() | POST /v1/promotions/{campaignId}/stacks | Create Promotion Stack |
deletePromotionStack() | DELETE /v1/promotions/{campaignId}/stacks/{stackId} | Delete Promotion Stack |
deletePromotionTier() | DELETE /v1/promotions/tiers/{promotionTierId} | Delete Promotion Tier |
disablePromotionTier() | POST /v1/promotions/tiers/{promotionTierId}/disable | Disable Promotion Tier |
enablePromotionTier() | POST /v1/promotions/tiers/{promotionTierId}/enable | Enable Promotion Tier |
getPromotionStack() | GET /v1/promotions/{campaignId}/stacks/{stackId} | Get Promotion Stack |
getPromotionTier() | GET /v1/promotions/tiers/{promotionTierId} | Get Promotion Tier |
listAllPromotionStacks() | GET /v1/promotions/stacks | List Promotion Stacks |
listPromotionStacksInCampaign() | GET /v1/promotions/{campaignId}/stacks | List Promotion Stacks in Campaign |
listPromotionTiers() | GET /v1/promotions/tiers | List Promotion Tiers |
listPromotionTiersFromCampaign() | GET /v1/promotions/{campaignId}/tiers | List Promotion Tiers from Campaign |
updatePromotionStack() | PUT /v1/promotions/{campaignId}/stacks/{stackId} | Update Promotion Stack |
createPromotionStack($campaign_id, $promotions_stacks_create_request_body): \OpenAPI\Client\Model\PromotionsStacksCreateResponseBody
Create Promotion Stack
This method creates one promotion stack. The sequence of promotion tier IDs will determine the promotion stacking order.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: X-App-Id
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-App-Id', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-App-Id', 'Bearer');
// Configure API key authorization: X-App-Token
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-App-Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-App-Token', 'Bearer');
$apiInstance = new OpenAPI\Client\Api\PromotionsApi(
// 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
);
$campaign_id = 'campaign_id_example'; // string | Unique campaign ID.
$promotions_stacks_create_request_body = {"name":"Fifth Stack","tiers":{"ids":["promo_aaAF8mVAzA0PF1igia2OC63d","promo_t9zdL6XMFk7B8fQ23zxELtdE","promo_dJNhAEeV5sR5oPQq1UrUdnMC"],"hierarchy_mode":"MANUAL"}}; // \OpenAPI\Client\Model\PromotionsStacksCreateRequestBody | Specify the order of promotion tiers for the promotion stack.
try {
$result = $apiInstance->createPromotionStack($campaign_id, $promotions_stacks_create_request_body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PromotionsApi->createPromotionStack: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
campaign_id | string | Unique campaign ID. | |
promotions_stacks_create_request_body | \OpenAPI\Client\Model\PromotionsStacksCreateRequestBody | Specify the order of promotion tiers for the promotion stack. | [optional] |
\OpenAPI\Client\Model\PromotionsStacksCreateResponseBody
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deletePromotionStack($campaign_id, $stack_id)
Delete Promotion Stack
This method deletes a promotion stack.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: X-App-Id
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-App-Id', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-App-Id', 'Bearer');
// Configure API key authorization: X-App-Token
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-App-Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-App-Token', 'Bearer');
$apiInstance = new OpenAPI\Client\Api\PromotionsApi(
// 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
);
$campaign_id = 'campaign_id_example'; // string | ID of the promotion campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the `name` of the campaign as the path parameter value, e.g., `Loyalty Campaign`.
$stack_id = 'stack_id_example'; // string | Promotion stack ID.
try {
$apiInstance->deletePromotionStack($campaign_id, $stack_id);
} catch (Exception $e) {
echo 'Exception when calling PromotionsApi->deletePromotionStack: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
campaign_id | string | ID of the promotion campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the `name` of the campaign as the path parameter value, e.g., `Loyalty Campaign`. | |
stack_id | string | Promotion stack ID. |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deletePromotionTier($promotion_tier_id)
Delete Promotion Tier
This method deletes a promotion tier.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: X-App-Id
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-App-Id', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-App-Id', 'Bearer');
// Configure API key authorization: X-App-Token
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-App-Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-App-Token', 'Bearer');
$apiInstance = new OpenAPI\Client\Api\PromotionsApi(
// 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
);
$promotion_tier_id = 'promotion_tier_id_example'; // string | Unique promotion tier ID.
try {
$apiInstance->deletePromotionTier($promotion_tier_id);
} catch (Exception $e) {
echo 'Exception when calling PromotionsApi->deletePromotionTier: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
promotion_tier_id | string | Unique promotion tier ID. |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
disablePromotionTier($promotion_tier_id): \OpenAPI\Client\Model\PromotionsTiersDisableResponseBody
Disable Promotion Tier
This method disables a promotion tier, i.e. makes the active
parameter = false
.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: X-App-Id
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-App-Id', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-App-Id', 'Bearer');
// Configure API key authorization: X-App-Token
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-App-Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-App-Token', 'Bearer');
$apiInstance = new OpenAPI\Client\Api\PromotionsApi(
// 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
);
$promotion_tier_id = 'promotion_tier_id_example'; // string | Unique promotion tier ID.
try {
$result = $apiInstance->disablePromotionTier($promotion_tier_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PromotionsApi->disablePromotionTier: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
promotion_tier_id | string | Unique promotion tier ID. |
\OpenAPI\Client\Model\PromotionsTiersDisableResponseBody
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
enablePromotionTier($promotion_tier_id): \OpenAPI\Client\Model\PromotionsTiersEnableResponseBody
Enable Promotion Tier
This method enables a promotion tier, i.e. makes the active
parameter = true
.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: X-App-Id
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-App-Id', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-App-Id', 'Bearer');
// Configure API key authorization: X-App-Token
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-App-Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-App-Token', 'Bearer');
$apiInstance = new OpenAPI\Client\Api\PromotionsApi(
// 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
);
$promotion_tier_id = 'promotion_tier_id_example'; // string | Unique promotion tier ID.
try {
$result = $apiInstance->enablePromotionTier($promotion_tier_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PromotionsApi->enablePromotionTier: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
promotion_tier_id | string | Unique promotion tier ID. |
\OpenAPI\Client\Model\PromotionsTiersEnableResponseBody
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getPromotionStack($campaign_id, $stack_id): \OpenAPI\Client\Model\PromotionsStacksGetResponseBody
Get Promotion Stack
This method returns the details of a promotion stack, including the promotion tiers grouped within the stack.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: X-App-Id
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-App-Id', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-App-Id', 'Bearer');
// Configure API key authorization: X-App-Token
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-App-Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-App-Token', 'Bearer');
$apiInstance = new OpenAPI\Client\Api\PromotionsApi(
// 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
);
$campaign_id = 'campaign_id_example'; // string | ID of the promotion campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the `name` of the campaign as the path parameter value, e.g., `Loyalty Campaign`.
$stack_id = 'stack_id_example'; // string | Promotion stack ID.
try {
$result = $apiInstance->getPromotionStack($campaign_id, $stack_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PromotionsApi->getPromotionStack: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
campaign_id | string | ID of the promotion campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the `name` of the campaign as the path parameter value, e.g., `Loyalty Campaign`. | |
stack_id | string | Promotion stack ID. |
\OpenAPI\Client\Model\PromotionsStacksGetResponseBody
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getPromotionTier($promotion_tier_id): \OpenAPI\Client\Model\PromotionsTiersGetResponseBody
Get Promotion Tier
This method enables you to retrieve a specific promotion tier.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: X-App-Id
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-App-Id', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-App-Id', 'Bearer');
// Configure API key authorization: X-App-Token
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-App-Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-App-Token', 'Bearer');
$apiInstance = new OpenAPI\Client\Api\PromotionsApi(
// 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
);
$promotion_tier_id = 'promotion_tier_id_example'; // string | Unique promotion tier ID.
try {
$result = $apiInstance->getPromotionTier($promotion_tier_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PromotionsApi->getPromotionTier: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
promotion_tier_id | string | Unique promotion tier ID. |
\OpenAPI\Client\Model\PromotionsTiersGetResponseBody
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
listAllPromotionStacks($limit, $page, $order, $created_at, $updated_at): \OpenAPI\Client\Model\PromotionsStacksListResponseBody
List Promotion Stacks
This method enables you to list promotion stacks irrespective of the campaign they are associated with. You can use filters in the query parameters to specify the stacks to be returned in the response. ## Advanced filters for fetching promotion stacks | Filters | Examples | | :--- | :--- | | Created Before | - [created_at][before]=2021-12-30T13:52:18.227Z
- [filters][created_at][conditions][$before][0]=2021-12-30T13:52:18.227Z
| | Created After | - [created_at][after]=2021-12-30T13:52:18.227Z
- [filters][created_at][conditions][$after][0]=2021-12-30T13:52:18.227Z
| | Updated Before | - [updated_at][before]=2021-12-30T13:52:18.227Z
- [filters][updated_at][conditions][$before][0]=2021-12-30T13:52:18.227Z
| | Updated After | - [updated_at][after]=2021-12-30T13:52:18.227Z
- [filters][updated_at][conditions][$after][0]=2021-12-30T13:52:18.227Z
|
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: X-App-Id
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-App-Id', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-App-Id', 'Bearer');
// Configure API key authorization: X-App-Token
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-App-Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-App-Token', 'Bearer');
$apiInstance = new OpenAPI\Client\Api\PromotionsApi(
// 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
);
$limit = 56; // int | A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
$page = 56; // int | Which page of results to return.
$order = new \OpenAPI\Client\Model\ParameterOrderListAllPromotionStacks(); // ParameterOrderListAllPromotionStacks | Sorts the results using one of the filtering options, where the dash `-` preceding a sorting option means sorting in a descending order.
$created_at = new \OpenAPI\Client\Model\ParameterCreatedBeforeAfter(); // ParameterCreatedBeforeAfter | A filter on the list based on the object `created_at` field. The value is a dictionary with the following options: `before`, `after`. A date value must be presented in ISO 8601 format (`2016-11-16T14:14:31Z` or `2016-11-16`). An example: `[created_at][before]=2017-09-08T13:52:18.227Z`
$updated_at = new \OpenAPI\Client\Model\ParameterUpdatedBeforeAfter(); // ParameterUpdatedBeforeAfter | A filter on the list based on the object `updated_at` field. The value is a dictionary with the following options: `before`, `after`. A date value must be presented in ISO 8601 format (`2016-11-16T14:14:31Z` or `2016-11-16`). An example: `[updated_at][before]=2017-09-08T13:52:18.227Z`
try {
$result = $apiInstance->listAllPromotionStacks($limit, $page, $order, $created_at, $updated_at);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PromotionsApi->listAllPromotionStacks: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
limit | int | A limit on the number of objects to be returned. Limit can range between 1 and 100 items. | [optional] |
page | int | Which page of results to return. | [optional] |
order | ParameterOrderListAllPromotionStacks | Sorts the results using one of the filtering options, where the dash `-` preceding a sorting option means sorting in a descending order. | [optional] |
created_at | ParameterCreatedBeforeAfter | A filter on the list based on the object `created_at` field. The value is a dictionary with the following options: `before`, `after`. A date value must be presented in ISO 8601 format (`2016-11-16T14:14:31Z` or `2016-11-16`). An example: `[created_at][before]=2017-09-08T13:52:18.227Z` | [optional] |
updated_at | ParameterUpdatedBeforeAfter | A filter on the list based on the object `updated_at` field. The value is a dictionary with the following options: `before`, `after`. A date value must be presented in ISO 8601 format (`2016-11-16T14:14:31Z` or `2016-11-16`). An example: `[updated_at][before]=2017-09-08T13:52:18.227Z` | [optional] |
\OpenAPI\Client\Model\PromotionsStacksListResponseBody
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
listPromotionStacksInCampaign($campaign_id): \OpenAPI\Client\Model\PromotionsStacksListResponseBody
List Promotion Stacks in Campaign
This method enables you to list promotion stacks from a specified campaign.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: X-App-Id
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-App-Id', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-App-Id', 'Bearer');
// Configure API key authorization: X-App-Token
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-App-Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-App-Token', 'Bearer');
$apiInstance = new OpenAPI\Client\Api\PromotionsApi(
// 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
);
$campaign_id = 'campaign_id_example'; // string | Unique campaign ID.
try {
$result = $apiInstance->listPromotionStacksInCampaign($campaign_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PromotionsApi->listPromotionStacksInCampaign: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
campaign_id | string | Unique campaign ID. |
\OpenAPI\Client\Model\PromotionsStacksListResponseBody
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
listPromotionTiers($is_available, $limit, $page, $order): \OpenAPI\Client\Model\PromotionsTiersListResponseBody
List Promotion Tiers
This method enables you to list promotion tiers.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: X-App-Id
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-App-Id', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-App-Id', 'Bearer');
// Configure API key authorization: X-App-Token
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-App-Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-App-Token', 'Bearer');
$apiInstance = new OpenAPI\Client\Api\PromotionsApi(
// 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
);
$is_available = True; // bool | This parameter allows filtering promotions that are only available at the moment. When set to true, it selects only non-expired and active promotions.
$limit = 56; // int | Limits the number of objects to be returned. The limit can range between 1 and 100 items.
$page = 56; // int | Which page of results to return. The lowest value is 1.
$order = new \OpenAPI\Client\Model\ParameterOrderListPromotionTiers(); // ParameterOrderListPromotionTiers | Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
try {
$result = $apiInstance->listPromotionTiers($is_available, $limit, $page, $order);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PromotionsApi->listPromotionTiers: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
is_available | bool | This parameter allows filtering promotions that are only available at the moment. When set to true, it selects only non-expired and active promotions. | [optional] |
limit | int | Limits the number of objects to be returned. The limit can range between 1 and 100 items. | [optional] |
page | int | Which page of results to return. The lowest value is 1. | [optional] |
order | ParameterOrderListPromotionTiers | Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. | [optional] |
\OpenAPI\Client\Model\PromotionsTiersListResponseBody
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
listPromotionTiersFromCampaign($campaign_id): \OpenAPI\Client\Model\PromotionsTiersListResponseBody
List Promotion Tiers from Campaign
This method enables you to list promotion tiers from a specified campaign.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: X-App-Id
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-App-Id', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-App-Id', 'Bearer');
// Configure API key authorization: X-App-Token
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-App-Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-App-Token', 'Bearer');
$apiInstance = new OpenAPI\Client\Api\PromotionsApi(
// 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
);
$campaign_id = 'campaign_id_example'; // string | Unique campaign ID assigned by Voucherify.
try {
$result = $apiInstance->listPromotionTiersFromCampaign($campaign_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PromotionsApi->listPromotionTiersFromCampaign: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
campaign_id | string | Unique campaign ID assigned by Voucherify. |
\OpenAPI\Client\Model\PromotionsTiersListResponseBody
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
updatePromotionStack($campaign_id, $stack_id, $promotions_stacks_update_request_body): \OpenAPI\Client\Model\PromotionsStacksUpdateResponseBody
Update Promotion Stack
This methods allows for editing an existing stack.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: X-App-Id
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-App-Id', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-App-Id', 'Bearer');
// Configure API key authorization: X-App-Token
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('X-App-Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-App-Token', 'Bearer');
$apiInstance = new OpenAPI\Client\Api\PromotionsApi(
// 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
);
$campaign_id = 'campaign_id_example'; // string | ID of the promotion campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the `name` of the campaign as the path parameter value, e.g., `Loyalty Campaign`.
$stack_id = 'stack_id_example'; // string | Promotion stack ID.
$promotions_stacks_update_request_body = {"name":"Fifth Stack Modified","tiers":{"ids":["promo_aaAF8mVAzA0PF1igia2OC63d","promo_t9zdL6XMFk7B8fQ23zxELtdE"],"hierarchy_mode":"MANUAL"}}; // \OpenAPI\Client\Model\PromotionsStacksUpdateRequestBody | Specify the promotion stack parameters that you would like to update.
try {
$result = $apiInstance->updatePromotionStack($campaign_id, $stack_id, $promotions_stacks_update_request_body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PromotionsApi->updatePromotionStack: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
campaign_id | string | ID of the promotion campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the `name` of the campaign as the path parameter value, e.g., `Loyalty Campaign`. | |
stack_id | string | Promotion stack ID. | |
promotions_stacks_update_request_body | \OpenAPI\Client\Model\PromotionsStacksUpdateRequestBody | Specify the promotion stack parameters that you would like to update. | [optional] |
\OpenAPI\Client\Model\PromotionsStacksUpdateResponseBody
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]