Skip to content

Latest commit

 

History

History
2176 lines (1508 loc) · 75.7 KB

File metadata and controls

2176 lines (1508 loc) · 75.7 KB

Keap\Core\V2\AffiliateApi

All URIs are relative to https://api.keap.com/crm, except if the operation defines another base path.

Method HTTP request Description
addAffiliate() POST /rest/v2/affiliates Create an Affiliate
addAffiliateToProgram() POST /rest/v2/affiliates/{id}:assignToProgram Assign Affiliate to Commission program
addCommissionProgram() POST /rest/v2/affiliates/commissionPrograms Create an Affiliate Commission Program
assignProductCommissionProgram() POST /rest/v2/affiliates/commissionPrograms/productCommissionPrograms/{commission_program_id} Assign a Product Commission Program
assignSubscriptionCommissionProgram() POST /rest/v2/affiliates/commissionPrograms/subscriptionCommissionPrograms/{commission_program_id} Assign a Subscription Commission Program
createAffiliateCustomField() POST /rest/v2/affiliates/model/customFields Create an Affiliate Custom Field
createDefaultCommissionProgram() POST /rest/v2/affiliates/commissionPrograms/defaultCommissionPrograms/{commission_program_id} Create a Default Commission Program
createRedirectLink() POST /rest/v2/affiliates/redirects Create an Affiliate Link
deleteAffiliate() DELETE /rest/v2/affiliates/{id} Delete Affiliate
deleteAffiliateCommissionProgram() DELETE /rest/v2/affiliates/commissionPrograms/{commission_program_id} Delete a Commission Program
deleteAffiliateCustomField() DELETE /rest/v2/affiliates/model/customFields/{custom_field_id} Delete a Custom Field
deleteRedirectLink() DELETE /rest/v2/affiliates/redirects/{redirect_id} Delete an Affiliate Link
getAffiliate() GET /rest/v2/affiliates/{id} Retrieve an Affiliate
getAffiliateCommissionTotal() GET /rest/v2/affiliates/{affiliate_id}/commissionTotal Retrieve Affiliate Commission Earned and View LedgerURl for portal
getAffiliateCommissions() GET /rest/v2/affiliates/{affiliate_id}:commissions Retrieve Affiliate Commissions
getAffiliateCustomFields() GET /rest/v2/affiliates/model Retrieve Affiliate Model
getCommissionProgram() GET /rest/v2/affiliates/commissionPrograms/{commission_program_id} Retrieve a Commission Program
getRedirectLink() GET /rest/v2/affiliates/redirects/{redirect_id} Retrieve an Affiliate Link
getReferralsByAffiliateId() GET /rest/v2/affiliates/{affiliate_id}/referrals Retrieve Affiliate Referrals
listAffiliate() GET /rest/v2/affiliates List Affiliates
listAffiliateCommissionPrograms() GET /rest/v2/affiliates/commissionPrograms List Affiliate Commission Programs
listAffiliateLinks() GET /rest/v2/affiliates/redirects List Affiliate Links
listAffiliatePayments() GET /rest/v2/affiliates/{affiliate_id}/payments List Affiliate Payments
listCommissionProgramResources() GET /rest/v2/affiliates/commissionPrograms/{commission_program_id}/resources Retrieve Commission Program Resources
listSummaries() GET /rest/v2/affiliates/summaries List Affiliate Summaries
removeAffiliateFromProgram() POST /rest/v2/affiliates/{id}:removeFromProgram Remove an Affiliate from a Commission Program
removeProductCommissionFromCommissions() POST /rest/v2/affiliates/commissionPrograms/{commission_id}:removeProductCommission Remove a Product from a Commission Program
removeSubscriptionPlanCommissionFromCommissions() POST /rest/v2/affiliates/commissionPrograms/{commission_id}:removeSubscriptionCommission Remove a Subscription from a Commission Program
updateAffiliate() PATCH /rest/v2/affiliates/{id} Update an Affiliate
updateAffiliateCustomField() PATCH /rest/v2/affiliates/model/customFields/{custom_field_id} Update a Custom Field
updateCommissionProgram() PATCH /rest/v2/affiliates/commissionPrograms/{commission_program_id} Update an Affiliate Commission Program
updateDefaultCommissionProgram() PATCH /rest/v2/affiliates/commissionPrograms/defaultCommissionPrograms/{commission_program_id} Update a Default Commission Program
updateProductCommissionProgram() PATCH /rest/v2/affiliates/commissionPrograms/productCommissionPrograms/{commission_program_id} Update a Product Commission Program
updateRedirectLink() PATCH /rest/v2/affiliates/redirects/{redirect_id} Update an Affiliate Link
updateSubscriptionCommissionProgram() PATCH /rest/v2/affiliates/commissionPrograms/subscriptionCommissionPrograms/{commission_program_id} Update a Subscription Commission Program

addAffiliate()

addAffiliate($create_affiliate_request): \Keap\Core\V2\Model\RestAffiliate

Create an Affiliate

Creates a single Affiliate

Example

<?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\AffiliateApi(
    // 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_affiliate_request = new \Keap\Core\V2\Model\CreateAffiliateRequest(); // \Keap\Core\V2\Model\CreateAffiliateRequest

try {
    $result = $apiInstance->addAffiliate($create_affiliate_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AffiliateApi->addAffiliate: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
create_affiliate_request \Keap\Core\V2\Model\CreateAffiliateRequest

Return type

\Keap\Core\V2\Model\RestAffiliate

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

addAffiliateToProgram()

addAffiliateToProgram($id, $affiliate_add_to_program_request)

Assign Affiliate to Commission program

Assigns an Affiliate to Commission Program

Example

<?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\AffiliateApi(
    // 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
);
$id = 'id_example'; // string
$affiliate_add_to_program_request = new \Keap\Core\V2\Model\AffiliateAddToProgramRequest(); // \Keap\Core\V2\Model\AffiliateAddToProgramRequest

try {
    $apiInstance->addAffiliateToProgram($id, $affiliate_add_to_program_request);
} catch (Exception $e) {
    echo 'Exception when calling AffiliateApi->addAffiliateToProgram: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id string
affiliate_add_to_program_request \Keap\Core\V2\Model\AffiliateAddToProgramRequest

Return type

void (empty response body)

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

addCommissionProgram()

addCommissionProgram($create_commission_program_request): \Keap\Core\V2\Model\AffiliateCommissionProgramResponse

Create an Affiliate Commission Program

Creates an Affiliate Commission Program

Example

<?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\AffiliateApi(
    // 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_commission_program_request = new \Keap\Core\V2\Model\CreateCommissionProgramRequest(); // \Keap\Core\V2\Model\CreateCommissionProgramRequest

try {
    $result = $apiInstance->addCommissionProgram($create_commission_program_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AffiliateApi->addCommissionProgram: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
create_commission_program_request \Keap\Core\V2\Model\CreateCommissionProgramRequest

Return type

\Keap\Core\V2\Model\AffiliateCommissionProgramResponse

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

assignProductCommissionProgram()

assignProductCommissionProgram($commission_program_id, $create_product_commission_program_request): \Keap\Core\V2\Model\ProductCommissionProgram

Assign a Product Commission Program

Assigns a Product Commission Program to a Product

Example

<?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\AffiliateApi(
    // 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
);
$commission_program_id = 'commission_program_id_example'; // string
$create_product_commission_program_request = new \Keap\Core\V2\Model\CreateProductCommissionProgramRequest(); // \Keap\Core\V2\Model\CreateProductCommissionProgramRequest

try {
    $result = $apiInstance->assignProductCommissionProgram($commission_program_id, $create_product_commission_program_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AffiliateApi->assignProductCommissionProgram: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
commission_program_id string
create_product_commission_program_request \Keap\Core\V2\Model\CreateProductCommissionProgramRequest

Return type

\Keap\Core\V2\Model\ProductCommissionProgram

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

assignSubscriptionCommissionProgram()

assignSubscriptionCommissionProgram($commission_program_id, $create_subscription_commission_program_request): \Keap\Core\V2\Model\SubscriptionCommissionProgram

Assign a Subscription Commission Program

Assigns a Subscription Commission Program to a Subscription

Example

<?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\AffiliateApi(
    // 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
);
$commission_program_id = 'commission_program_id_example'; // string
$create_subscription_commission_program_request = new \Keap\Core\V2\Model\CreateSubscriptionCommissionProgramRequest(); // \Keap\Core\V2\Model\CreateSubscriptionCommissionProgramRequest

try {
    $result = $apiInstance->assignSubscriptionCommissionProgram($commission_program_id, $create_subscription_commission_program_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AffiliateApi->assignSubscriptionCommissionProgram: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
commission_program_id string
create_subscription_commission_program_request \Keap\Core\V2\Model\CreateSubscriptionCommissionProgramRequest

Return type

\Keap\Core\V2\Model\SubscriptionCommissionProgram

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

createAffiliateCustomField()

createAffiliateCustomField($create_custom_field_request): \Keap\Core\V2\Model\CustomFieldMetaData

Create an Affiliate Custom Field

Creates a single Affiliate Custom Field

Example

<?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\AffiliateApi(
    // 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_custom_field_request = new \Keap\Core\V2\Model\CreateCustomFieldRequest(); // \Keap\Core\V2\Model\CreateCustomFieldRequest

try {
    $result = $apiInstance->createAffiliateCustomField($create_custom_field_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AffiliateApi->createAffiliateCustomField: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
create_custom_field_request \Keap\Core\V2\Model\CreateCustomFieldRequest

Return type

\Keap\Core\V2\Model\CustomFieldMetaData

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

createDefaultCommissionProgram()

createDefaultCommissionProgram($commission_program_id, $create_default_commission_program_request): \Keap\Core\V2\Model\SetDefaultCommissionProgramResponse

Create a Default Commission Program

Creates a Default Commission Program

Example

<?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\AffiliateApi(
    // 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
);
$commission_program_id = 'commission_program_id_example'; // string
$create_default_commission_program_request = new \Keap\Core\V2\Model\CreateDefaultCommissionProgramRequest(); // \Keap\Core\V2\Model\CreateDefaultCommissionProgramRequest

try {
    $result = $apiInstance->createDefaultCommissionProgram($commission_program_id, $create_default_commission_program_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AffiliateApi->createDefaultCommissionProgram: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
commission_program_id string
create_default_commission_program_request \Keap\Core\V2\Model\CreateDefaultCommissionProgramRequest

Return type

\Keap\Core\V2\Model\SetDefaultCommissionProgramResponse

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

createRedirectLink()

createRedirectLink($create_or_update_affiliate_link_request): \Keap\Core\V2\Model\AffiliateLink

Create an Affiliate Link

Creates a single Affiliate Link

Example

<?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\AffiliateApi(
    // 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_or_update_affiliate_link_request = new \Keap\Core\V2\Model\CreateOrUpdateAffiliateLinkRequest(); // \Keap\Core\V2\Model\CreateOrUpdateAffiliateLinkRequest

try {
    $result = $apiInstance->createRedirectLink($create_or_update_affiliate_link_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AffiliateApi->createRedirectLink: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
create_or_update_affiliate_link_request \Keap\Core\V2\Model\CreateOrUpdateAffiliateLinkRequest

Return type

\Keap\Core\V2\Model\AffiliateLink

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteAffiliate()

deleteAffiliate($id)

Delete Affiliate

Deletes the specified Affiliate

Example

<?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\AffiliateApi(
    // 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
);
$id = 'id_example'; // string

try {
    $apiInstance->deleteAffiliate($id);
} catch (Exception $e) {
    echo 'Exception when calling AffiliateApi->deleteAffiliate: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id string

Return type

void (empty response body)

Authorization

oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteAffiliateCommissionProgram()

deleteAffiliateCommissionProgram($commission_program_id)

Delete a Commission Program

Deletes a Commission Program

Example

<?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\AffiliateApi(
    // 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
);
$commission_program_id = 'commission_program_id_example'; // string

try {
    $apiInstance->deleteAffiliateCommissionProgram($commission_program_id);
} catch (Exception $e) {
    echo 'Exception when calling AffiliateApi->deleteAffiliateCommissionProgram: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
commission_program_id string

Return type

void (empty response body)

Authorization

oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteAffiliateCustomField()

deleteAffiliateCustomField($custom_field_id)

Delete a Custom Field

Deletes a Custom Field from Affiliate.

Example

<?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\AffiliateApi(
    // 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
);
$custom_field_id = 'custom_field_id_example'; // string

try {
    $apiInstance->deleteAffiliateCustomField($custom_field_id);
} catch (Exception $e) {
    echo 'Exception when calling AffiliateApi->deleteAffiliateCustomField: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
custom_field_id string

Return type

void (empty response body)

Authorization

oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteRedirectLink()

deleteRedirectLink($redirect_id)

Delete an Affiliate Link

Deletes an Affiliate Link

Example

<?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\AffiliateApi(
    // 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
);
$redirect_id = 'redirect_id_example'; // string

try {
    $apiInstance->deleteRedirectLink($redirect_id);
} catch (Exception $e) {
    echo 'Exception when calling AffiliateApi->deleteRedirectLink: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
redirect_id string

Return type

void (empty response body)

Authorization

oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getAffiliate()

getAffiliate($id): \Keap\Core\V2\Model\RestAffiliate

Retrieve an Affiliate

Retrieves a single Affiliate

Example

<?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\AffiliateApi(
    // 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
);
$id = 'id_example'; // string

try {
    $result = $apiInstance->getAffiliate($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AffiliateApi->getAffiliate: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id string

Return type

\Keap\Core\V2\Model\RestAffiliate

Authorization

oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getAffiliateCommissionTotal()

getAffiliateCommissionTotal($affiliate_id): \Keap\Core\V2\Model\AffiliateCommissionEarned

Retrieve Affiliate Commission Earned and View LedgerURl for portal

Get the Affiliate Commission Earned and View LedgerURl for portal

Example

<?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\AffiliateApi(
    // 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
);
$affiliate_id = 'affiliate_id_example'; // string

try {
    $result = $apiInstance->getAffiliateCommissionTotal($affiliate_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AffiliateApi->getAffiliateCommissionTotal: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
affiliate_id string

Return type

\Keap\Core\V2\Model\AffiliateCommissionEarned

Authorization

oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getAffiliateCommissions()

getAffiliateCommissions($affiliate_id, $filter, $order_by, $page_size, $page_token): \Keap\Core\V2\Model\ListAffiliateCommissionsResponse

Retrieve Affiliate Commissions

Retrieve a list of Affiliate's Commissions

Example

<?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\AffiliateApi(
    // 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
);
$affiliate_id = 'affiliate_id_example'; // string
$filter = 'filter_example'; // string | Filter to apply, allowed fields are: - (String) `since_time` - (String) `until_time`  You will need to apply the `==` operator to check the equality of one of the filters with your searched word, in the encoded form `%3D%3D`. For the filters listed above, here are some examples: - `filter=since_time%3D%3D2024-05-21T23:00:00Z%3Buntil_time%3D%3D2025-05-21T23:00:00Z` - `filter=until_time%3D%3D2025-05-21T23:00:00Z`
$order_by = 'order_by_example'; // string | Attribute and direction to order items. One of the following fields: - `invoice_id` - `time_earned`  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->getAffiliateCommissions($affiliate_id, $filter, $order_by, $page_size, $page_token);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AffiliateApi->getAffiliateCommissions: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
affiliate_id string
filter string Filter to apply, allowed fields are: - (String) `since_time` - (String) `until_time` You will need to apply the `==` operator to check the equality of one of the filters with your searched word, in the encoded form `%3D%3D`. For the filters listed above, here are some examples: - `filter=since_time%3D%3D2024-05-21T23:00:00Z%3Buntil_time%3D%3D2025-05-21T23:00:00Z` - `filter=until_time%3D%3D2025-05-21T23:00:00Z` [optional]
order_by string Attribute and direction to order items. One of the following fields: - `invoice_id` - `time_earned` 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]

Return type

\Keap\Core\V2\Model\ListAffiliateCommissionsResponse

Authorization

oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getAffiliateCustomFields()

getAffiliateCustomFields(): \Keap\Core\V2\Model\ObjectModel

Retrieve Affiliate Model

Get the custom fields and optional properties for the Affiliate object

Example

<?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\AffiliateApi(
    // 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
);

try {
    $result = $apiInstance->getAffiliateCustomFields();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AffiliateApi->getAffiliateCustomFields: ', $e->getMessage(), PHP_EOL;
}

Parameters

This endpoint does not need any parameter.

Return type

\Keap\Core\V2\Model\ObjectModel

Authorization

oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getCommissionProgram()

getCommissionProgram($commission_program_id): \Keap\Core\V2\Model\GetRestCommissionProgram

Retrieve a Commission Program

Retrieves a single Commission Program

Example

<?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\AffiliateApi(
    // 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
);
$commission_program_id = 'commission_program_id_example'; // string

try {
    $result = $apiInstance->getCommissionProgram($commission_program_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AffiliateApi->getCommissionProgram: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
commission_program_id string

Return type

\Keap\Core\V2\Model\GetRestCommissionProgram

Authorization

oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getRedirectLink()

getRedirectLink($redirect_id): \Keap\Core\V2\Model\AffiliateLink

Retrieve an Affiliate Link

Retrieves information about a single Affiliate Link

Example

<?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\AffiliateApi(
    // 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
);
$redirect_id = 'redirect_id_example'; // string

try {
    $result = $apiInstance->getRedirectLink($redirect_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AffiliateApi->getRedirectLink: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
redirect_id string

Return type

\Keap\Core\V2\Model\AffiliateLink

Authorization

oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getReferralsByAffiliateId()

getReferralsByAffiliateId($affiliate_id): \Keap\Core\V2\Model\ListAffiliateReferralsResponse

Retrieve Affiliate Referrals

Retrieves all referrals belonging to the given affiliate

Example

<?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\AffiliateApi(
    // 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
);
$affiliate_id = 'affiliate_id_example'; // string

try {
    $result = $apiInstance->getReferralsByAffiliateId($affiliate_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AffiliateApi->getReferralsByAffiliateId: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
affiliate_id string

Return type

\Keap\Core\V2\Model\ListAffiliateReferralsResponse

Authorization

oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

listAffiliate()

listAffiliate($filter, $order_by, $page_size, $page_token): \Keap\Core\V2\Model\ListAffiliatesResponse

List Affiliates

Retrieves a list of Affiliates

Example

<?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\AffiliateApi(
    // 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, allowed fields are: - (String) `affiliate_name` - (String) `contact_id` - (String) `referral_contact_id` - (String) `status` - (String) `code`  You will need to apply the `==` operator to check the equality of one of the filters with the value you want to match, in the encoded form `%3D%3D`. For the filters listed above, here are some examples: - `filter=affiliate_name%3D%3DBob` - `filter=contact_id%3D%3D567` - `filter=contact_id%3D%3D123%3Bcode%3D%3D567`
$order_by = 'order_by_example'; // string | Attribute and direction to order items. One of the following fields: - `id` - `create_time` - `name` - `status` - `code`  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->listAffiliate($filter, $order_by, $page_size, $page_token);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AffiliateApi->listAffiliate: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
filter string Filter to apply, allowed fields are: - (String) `affiliate_name` - (String) `contact_id` - (String) `referral_contact_id` - (String) `status` - (String) `code` You will need to apply the `==` operator to check the equality of one of the filters with the value you want to match, in the encoded form `%3D%3D`. For the filters listed above, here are some examples: - `filter=affiliate_name%3D%3DBob` - `filter=contact_id%3D%3D567` - `filter=contact_id%3D%3D123%3Bcode%3D%3D567` [optional]
order_by string Attribute and direction to order items. One of the following fields: - `id` - `create_time` - `name` - `status` - `code` 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]

Return type

\Keap\Core\V2\Model\ListAffiliatesResponse

Authorization

oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

listAffiliateCommissionPrograms()

listAffiliateCommissionPrograms($filter, $order_by, $page_size, $page_token): \Keap\Core\V2\Model\ListAffiliateCommissionProgramsResponse

List Affiliate Commission Programs

Retrieves a list of Affiliate Commission Programs

Example

<?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\AffiliateApi(
    // 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, allowed fields are: - (String) `name` - (String) `affiliate_id`
$order_by = 'order_by_example'; // string | Attribute and direction to order items. One of the following fields: - `name` - `date_created`  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->listAffiliateCommissionPrograms($filter, $order_by, $page_size, $page_token);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AffiliateApi->listAffiliateCommissionPrograms: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
filter string Filter to apply, allowed fields are: - (String) `name` - (String) `affiliate_id` [optional]
order_by string Attribute and direction to order items. One of the following fields: - `name` - `date_created` 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]

Return type

\Keap\Core\V2\Model\ListAffiliateCommissionProgramsResponse

Authorization

oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

listAffiliateLinks()

listAffiliateLinks($filter, $order_by, $page_size, $page_token): \Keap\Core\V2\Model\ListAffiliateLinksResponse

List Affiliate Links

Retrieves a list of Affiliate Links

Example

<?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\AffiliateApi(
    // 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, allowed fields are: - (String) `name` - (String) `affiliate_id`
$order_by = 'order_by_example'; // string | Attribute and direction to order items. One of the following fields: - `name` - `date_created`  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->listAffiliateLinks($filter, $order_by, $page_size, $page_token);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AffiliateApi->listAffiliateLinks: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
filter string Filter to apply, allowed fields are: - (String) `name` - (String) `affiliate_id` [optional]
order_by string Attribute and direction to order items. One of the following fields: - `name` - `date_created` 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]

Return type

\Keap\Core\V2\Model\ListAffiliateLinksResponse

Authorization

oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

listAffiliatePayments()

listAffiliatePayments($affiliate_id, $filter, $order_by, $page_size, $page_token): \Keap\Core\V2\Model\ListAffiliatePaymentsResponse

List Affiliate Payments

Retrieves a list of affiliate payments

Example

<?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\AffiliateApi(
    // 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
);
$affiliate_id = 'affiliate_id_example'; // string
$filter = 'filter_example'; // string | Filter to apply, allowed fields are: - (String) `since_time` - (String) `until_time`  You will need to apply the `==` operator to check the equality of one of the filters with your searched word, in the encoded form `%3D%3D`. For the filters listed above, here are some examples: - `filter=since_time%3D%3D2024-09-17T-15:50+00` - `filter=until_time%3D%3D2024-09-17T-15:50+00`
$order_by = 'order_by_example'; // string | Attribute and direction to order items. One of the following fields: - `create_time` - `pay_date` - `pay_amount`  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->listAffiliatePayments($affiliate_id, $filter, $order_by, $page_size, $page_token);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AffiliateApi->listAffiliatePayments: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
affiliate_id string
filter string Filter to apply, allowed fields are: - (String) `since_time` - (String) `until_time` You will need to apply the `==` operator to check the equality of one of the filters with your searched word, in the encoded form `%3D%3D`. For the filters listed above, here are some examples: - `filter=since_time%3D%3D2024-09-17T-15:50+00` - `filter=until_time%3D%3D2024-09-17T-15:50+00` [optional]
order_by string Attribute and direction to order items. One of the following fields: - `create_time` - `pay_date` - `pay_amount` 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]

Return type

\Keap\Core\V2\Model\ListAffiliatePaymentsResponse

Authorization

oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

listCommissionProgramResources()

listCommissionProgramResources($commission_program_id): \Keap\Core\V2\Model\ListProgramResourcesResponse

Retrieve Commission Program Resources

Retrieves resources for a commission program

Example

<?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\AffiliateApi(
    // 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
);
$commission_program_id = 'commission_program_id_example'; // string

try {
    $result = $apiInstance->listCommissionProgramResources($commission_program_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AffiliateApi->listCommissionProgramResources: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
commission_program_id string

Return type

\Keap\Core\V2\Model\ListProgramResourcesResponse

Authorization

oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

listSummaries()

listSummaries($filter, $order_by, $page_size, $page_token): \Keap\Core\V2\Model\ListAffiliateSummariesResponse

List Affiliate Summaries

Retrieves a list of Affiliate Summaries

Example

<?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\AffiliateApi(
    // 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, allowed fields are: - (List[String]) `affiliate_ids` - (String) `since_time` - (String) `until_time`  You will need to apply the `==` operator to check the equality of one of the filters with your searched  word, in the encoded form `%3D%3D`. For the filters listed above, here are some examples:  - `filter=since_time%3D%3D2024-09-17T-15:50+00`  - `filter=until_time%3D%3D2024-09-17T-15:50+00`  - `filter=affiliate_ids%3D%3D123,456,789`
$order_by = 'order_by_example'; // string | Attribute and direction to order items. One of the following fields: - `affiliate_id` - `amount_earned` - `balance` - `clawbacks`  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->listSummaries($filter, $order_by, $page_size, $page_token);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AffiliateApi->listSummaries: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
filter string Filter to apply, allowed fields are: - (List[String]) `affiliate_ids` - (String) `since_time` - (String) `until_time` You will need to apply the `==` operator to check the equality of one of the filters with your searched word, in the encoded form `%3D%3D`. For the filters listed above, here are some examples: - `filter=since_time%3D%3D2024-09-17T-15:50+00` - `filter=until_time%3D%3D2024-09-17T-15:50+00` - `filter=affiliate_ids%3D%3D123,456,789` [optional]
order_by string Attribute and direction to order items. One of the following fields: - `affiliate_id` - `amount_earned` - `balance` - `clawbacks` 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]

Return type

\Keap\Core\V2\Model\ListAffiliateSummariesResponse

Authorization

oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

removeAffiliateFromProgram()

removeAffiliateFromProgram($id, $affiliate_remove_from_program_request)

Remove an Affiliate from a Commission Program

Removes an Affiliate from a Commission Program

Example

<?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\AffiliateApi(
    // 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
);
$id = 'id_example'; // string
$affiliate_remove_from_program_request = new \Keap\Core\V2\Model\AffiliateRemoveFromProgramRequest(); // \Keap\Core\V2\Model\AffiliateRemoveFromProgramRequest

try {
    $apiInstance->removeAffiliateFromProgram($id, $affiliate_remove_from_program_request);
} catch (Exception $e) {
    echo 'Exception when calling AffiliateApi->removeAffiliateFromProgram: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id string
affiliate_remove_from_program_request \Keap\Core\V2\Model\AffiliateRemoveFromProgramRequest

Return type

void (empty response body)

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

removeProductCommissionFromCommissions()

removeProductCommissionFromCommissions($commission_id, $delete_program_commission_request)

Remove a Product from a Commission Program

Removes a Product from a Commission Program

Example

<?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\AffiliateApi(
    // 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
);
$commission_id = 'commission_id_example'; // string
$delete_program_commission_request = new \Keap\Core\V2\Model\DeleteProgramCommissionRequest(); // \Keap\Core\V2\Model\DeleteProgramCommissionRequest

try {
    $apiInstance->removeProductCommissionFromCommissions($commission_id, $delete_program_commission_request);
} catch (Exception $e) {
    echo 'Exception when calling AffiliateApi->removeProductCommissionFromCommissions: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
commission_id string
delete_program_commission_request \Keap\Core\V2\Model\DeleteProgramCommissionRequest

Return type

void (empty response body)

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

removeSubscriptionPlanCommissionFromCommissions()

removeSubscriptionPlanCommissionFromCommissions($commission_id, $delete_subscription_plan_commission_request)

Remove a Subscription from a Commission Program

Removes a Subscription from a Commission Program

Example

<?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\AffiliateApi(
    // 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
);
$commission_id = 'commission_id_example'; // string
$delete_subscription_plan_commission_request = new \Keap\Core\V2\Model\DeleteSubscriptionPlanCommissionRequest(); // \Keap\Core\V2\Model\DeleteSubscriptionPlanCommissionRequest

try {
    $apiInstance->removeSubscriptionPlanCommissionFromCommissions($commission_id, $delete_subscription_plan_commission_request);
} catch (Exception $e) {
    echo 'Exception when calling AffiliateApi->removeSubscriptionPlanCommissionFromCommissions: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
commission_id string
delete_subscription_plan_commission_request \Keap\Core\V2\Model\DeleteSubscriptionPlanCommissionRequest

Return type

void (empty response body)

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateAffiliate()

updateAffiliate($id, $update_affiliate_request, $update_mask): \Keap\Core\V2\Model\RestAffiliate

Update an Affiliate

Updates a single Affiliate

Example

<?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\AffiliateApi(
    // 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
);
$id = 'id_example'; // string
$update_affiliate_request = new \Keap\Core\V2\Model\UpdateAffiliateRequest(); // \Keap\Core\V2\Model\UpdateAffiliateRequest
$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->updateAffiliate($id, $update_affiliate_request, $update_mask);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AffiliateApi->updateAffiliate: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id string
update_affiliate_request \Keap\Core\V2\Model\UpdateAffiliateRequest
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]

Return type

\Keap\Core\V2\Model\RestAffiliate

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateAffiliateCustomField()

updateAffiliateCustomField($custom_field_id, $update_custom_field_meta_data_request, $update_mask): \Keap\Core\V2\Model\CustomFieldMetaData

Update a Custom Field

Updates a custom field of the specified type and options to the Affiliate object.

Example

<?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\AffiliateApi(
    // 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
);
$custom_field_id = 'custom_field_id_example'; // string
$update_custom_field_meta_data_request = new \Keap\Core\V2\Model\UpdateCustomFieldMetaDataRequest(); // \Keap\Core\V2\Model\UpdateCustomFieldMetaDataRequest
$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->updateAffiliateCustomField($custom_field_id, $update_custom_field_meta_data_request, $update_mask);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AffiliateApi->updateAffiliateCustomField: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
custom_field_id string
update_custom_field_meta_data_request \Keap\Core\V2\Model\UpdateCustomFieldMetaDataRequest
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]

Return type

\Keap\Core\V2\Model\CustomFieldMetaData

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateCommissionProgram()

updateCommissionProgram($commission_program_id, $update_commission_program_request, $update_mask): \Keap\Core\V2\Model\AffiliateCommissionProgramResponse

Update an Affiliate Commission Program

Updates the properties of an Affiliate Commission Program

Example

<?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\AffiliateApi(
    // 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
);
$commission_program_id = 'commission_program_id_example'; // string
$update_commission_program_request = new \Keap\Core\V2\Model\UpdateCommissionProgramRequest(); // \Keap\Core\V2\Model\UpdateCommissionProgramRequest
$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->updateCommissionProgram($commission_program_id, $update_commission_program_request, $update_mask);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AffiliateApi->updateCommissionProgram: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
commission_program_id string
update_commission_program_request \Keap\Core\V2\Model\UpdateCommissionProgramRequest
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]

Return type

\Keap\Core\V2\Model\AffiliateCommissionProgramResponse

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateDefaultCommissionProgram()

updateDefaultCommissionProgram($commission_program_id, $update_default_commission_program_request, $update_mask): \Keap\Core\V2\Model\SetDefaultCommissionProgramResponse

Update a Default Commission Program

Updates a Default Commission Program

Example

<?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\AffiliateApi(
    // 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
);
$commission_program_id = 'commission_program_id_example'; // string
$update_default_commission_program_request = new \Keap\Core\V2\Model\UpdateDefaultCommissionProgramRequest(); // \Keap\Core\V2\Model\UpdateDefaultCommissionProgramRequest
$update_mask = array('update_mask_example'); // string[]

try {
    $result = $apiInstance->updateDefaultCommissionProgram($commission_program_id, $update_default_commission_program_request, $update_mask);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AffiliateApi->updateDefaultCommissionProgram: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
commission_program_id string
update_default_commission_program_request \Keap\Core\V2\Model\UpdateDefaultCommissionProgramRequest
update_mask string[] [optional]

Return type

\Keap\Core\V2\Model\SetDefaultCommissionProgramResponse

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateProductCommissionProgram()

updateProductCommissionProgram($commission_program_id, $update_product_commission_program_request, $update_mask): \Keap\Core\V2\Model\ProductCommissionProgram

Update a Product Commission Program

Updates a Product Commission Program

Example

<?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\AffiliateApi(
    // 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
);
$commission_program_id = 'commission_program_id_example'; // string
$update_product_commission_program_request = new \Keap\Core\V2\Model\UpdateProductCommissionProgramRequest(); // \Keap\Core\V2\Model\UpdateProductCommissionProgramRequest
$update_mask = array('update_mask_example'); // string[]

try {
    $result = $apiInstance->updateProductCommissionProgram($commission_program_id, $update_product_commission_program_request, $update_mask);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AffiliateApi->updateProductCommissionProgram: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
commission_program_id string
update_product_commission_program_request \Keap\Core\V2\Model\UpdateProductCommissionProgramRequest
update_mask string[] [optional]

Return type

\Keap\Core\V2\Model\ProductCommissionProgram

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateRedirectLink()

updateRedirectLink($redirect_id, $create_or_update_affiliate_link_request): \Keap\Core\V2\Model\AffiliateLink

Update an Affiliate Link

Updates an Affiliate Link

Example

<?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\AffiliateApi(
    // 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
);
$redirect_id = 'redirect_id_example'; // string
$create_or_update_affiliate_link_request = new \Keap\Core\V2\Model\CreateOrUpdateAffiliateLinkRequest(); // \Keap\Core\V2\Model\CreateOrUpdateAffiliateLinkRequest

try {
    $result = $apiInstance->updateRedirectLink($redirect_id, $create_or_update_affiliate_link_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AffiliateApi->updateRedirectLink: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
redirect_id string
create_or_update_affiliate_link_request \Keap\Core\V2\Model\CreateOrUpdateAffiliateLinkRequest

Return type

\Keap\Core\V2\Model\AffiliateLink

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateSubscriptionCommissionProgram()

updateSubscriptionCommissionProgram($commission_program_id, $update_subscription_commission_program_request, $update_mask): \Keap\Core\V2\Model\SubscriptionCommissionProgram

Update a Subscription Commission Program

Updates a Subscription Commission Program

Example

<?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\AffiliateApi(
    // 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
);
$commission_program_id = 'commission_program_id_example'; // string
$update_subscription_commission_program_request = new \Keap\Core\V2\Model\UpdateSubscriptionCommissionProgramRequest(); // \Keap\Core\V2\Model\UpdateSubscriptionCommissionProgramRequest
$update_mask = array('update_mask_example'); // string[]

try {
    $result = $apiInstance->updateSubscriptionCommissionProgram($commission_program_id, $update_subscription_commission_program_request, $update_mask);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AffiliateApi->updateSubscriptionCommissionProgram: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
commission_program_id string
update_subscription_commission_program_request \Keap\Core\V2\Model\UpdateSubscriptionCommissionProgramRequest
update_mask string[] [optional]

Return type

\Keap\Core\V2\Model\SubscriptionCommissionProgram

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]