Skip to content

Latest commit

 

History

History
163 lines (114 loc) · 9.35 KB

ConstituentMembershipApi.md

File metadata and controls

163 lines (114 loc) · 9.35 KB

BurgerDigital\BlackbaudPhpSdk\ConstituentMembershipApi

All URIs are relative to https://api.sky.blackbaud.com/constituent/v1.

Method HTTP request Description
listConstituentMembershipsSingleConstituent() GET /constituents/{constituent_id}/memberships Membership list (Single constituent)
listMemberships() GET /memberships Membership list (All constituents)

listConstituentMembershipsSingleConstituent()

listConstituentMembershipsSingleConstituent($constituent_id): \BurgerDigital\BlackbaudPhpSdk\Model\ApiCollectionMembershipRead

Membership list (Single constituent)

Returns a list of memberships for a constituent.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: apiKeyHeader
$config = BurgerDigital\BlackbaudPhpSdk\Configuration::getDefaultConfiguration()->setApiKey('Bb-Api-Subscription-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = BurgerDigital\BlackbaudPhpSdk\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Bb-Api-Subscription-Key', 'Bearer');

// Configure API key authorization: apiKeyQuery
$config = BurgerDigital\BlackbaudPhpSdk\Configuration::getDefaultConfiguration()->setApiKey('subscription-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = BurgerDigital\BlackbaudPhpSdk\Configuration::getDefaultConfiguration()->setApiKeyPrefix('subscription-key', 'Bearer');

// Configure OAuth2 access token for authorization: oauth2Blackbaud OAuth 2.0 ServiceAuthorizationCode
$config = BurgerDigital\BlackbaudPhpSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Configure OAuth2 access token for authorization: oauth2Blackbaud OAuth 2.0 ServiceImplicit
$config = BurgerDigital\BlackbaudPhpSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new BurgerDigital\BlackbaudPhpSdk\Api\ConstituentMembershipApi(
    // 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
);
$constituent_id = 'constituent_id_example'; // string | The immutable system record ID of the constituent to retrieve the memberships for.

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

Parameters

Name Type Description Notes
constituent_id string The immutable system record ID of the constituent to retrieve the memberships for.

Return type

\BurgerDigital\BlackbaudPhpSdk\Model\ApiCollectionMembershipRead

Authorization

apiKeyHeader, apiKeyQuery, [oauth2Blackbaud OAuth 2.0 ServiceAuthorizationCode](../../README.md#oauth2Blackbaud OAuth 2.0 ServiceAuthorizationCode), [oauth2Blackbaud OAuth 2.0 ServiceImplicit](../../README.md#oauth2Blackbaud OAuth 2.0 ServiceImplicit)

HTTP request headers

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

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

listMemberships()

listMemberships($date_added, $last_modified, $sort_token, $limit, $offset): \BurgerDigital\BlackbaudPhpSdk\Model\ApiCollectionMembershipRead

Membership list (All constituents)

Returns a paginated list of memberships.

The default sorting behavior is to list memberships in ascending order based on when they were created.

However, the last_modified parameter overrides the default sorting behavior to list memberships in ascending order based on when they were last modified. The last_modified parameter also adds the sort_token parameter to the next_link URL to ensure that memberships are stably sorted and that order persists when changes occur while working through a paginated list.

If the last_modified and date_added parameters are both specified, the sorting behavior is to list memberships based on when they were last modified.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: apiKeyHeader
$config = BurgerDigital\BlackbaudPhpSdk\Configuration::getDefaultConfiguration()->setApiKey('Bb-Api-Subscription-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = BurgerDigital\BlackbaudPhpSdk\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Bb-Api-Subscription-Key', 'Bearer');

// Configure API key authorization: apiKeyQuery
$config = BurgerDigital\BlackbaudPhpSdk\Configuration::getDefaultConfiguration()->setApiKey('subscription-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = BurgerDigital\BlackbaudPhpSdk\Configuration::getDefaultConfiguration()->setApiKeyPrefix('subscription-key', 'Bearer');

// Configure OAuth2 access token for authorization: oauth2Blackbaud OAuth 2.0 ServiceAuthorizationCode
$config = BurgerDigital\BlackbaudPhpSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Configure OAuth2 access token for authorization: oauth2Blackbaud OAuth 2.0 ServiceImplicit
$config = BurgerDigital\BlackbaudPhpSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new BurgerDigital\BlackbaudPhpSdk\Api\ConstituentMembershipApi(
    // 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
);
$date_added = 'date_added_example'; // string | Format - date-time (as date-time in RFC3339). Represents a filter for memberships created on or after the specified date. The filter respects time offsets from UTC per the ISO-8601 format: 2016-05-05T17:59:31.1600745-04:00.
$last_modified = 'last_modified_example'; // string | Format - date-time (as date-time in RFC3339). Represents a filter for memberships modified on or after the specified date. The filter respects time offsets from UTC per the ISO-8601 format: 2016-05-05T17:59:31.1600745-04:00.
$sort_token = 'sort_token_example'; // string | Represents a token filter to provide the next stable-sorted list of memberships. This will be provided on the next_link collection response property when last_modified or sort_token filters are specified on the request.
$limit = 56; // int | Format - int32. Represents the number of records to return. The default is 500. The maximum is 5000.
$offset = 56; // int | Format - int32. Represents the number of records to skip. For use with pagination.

try {
    $result = $apiInstance->listMemberships($date_added, $last_modified, $sort_token, $limit, $offset);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ConstituentMembershipApi->listMemberships: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
date_added string Format - date-time (as date-time in RFC3339). Represents a filter for memberships created on or after the specified date. The filter respects time offsets from UTC per the ISO-8601 format: 2016-05-05T17:59:31.1600745-04:00. [optional]
last_modified string Format - date-time (as date-time in RFC3339). Represents a filter for memberships modified on or after the specified date. The filter respects time offsets from UTC per the ISO-8601 format: 2016-05-05T17:59:31.1600745-04:00. [optional]
sort_token string Represents a token filter to provide the next stable-sorted list of memberships. This will be provided on the next_link collection response property when last_modified or sort_token filters are specified on the request. [optional]
limit int Format - int32. Represents the number of records to return. The default is 500. The maximum is 5000. [optional]
offset int Format - int32. Represents the number of records to skip. For use with pagination. [optional]

Return type

\BurgerDigital\BlackbaudPhpSdk\Model\ApiCollectionMembershipRead

Authorization

apiKeyHeader, apiKeyQuery, [oauth2Blackbaud OAuth 2.0 ServiceAuthorizationCode](../../README.md#oauth2Blackbaud OAuth 2.0 ServiceAuthorizationCode), [oauth2Blackbaud OAuth 2.0 ServiceImplicit](../../README.md#oauth2Blackbaud OAuth 2.0 ServiceImplicit)

HTTP request headers

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

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