SDKs

Official client libraries for .NET and PHP.

You can call the API directly over HTTP, but there are official client libraries for two languages. They handle authentication, retries, pagination and error types for you, so you write method calls instead of building requests.

Where an endpoint’s example shows a C# tab, that code is this library.

LanguageInstallSource
.NETdotnet add package AwardSpring.Netawardspring-dotnet
PHPcomposer require awardspring/awardspring-phpawardspring-php

Both are MIT licensed and generated from the same description this documentation is built from, so they gain new endpoints when the API does.

Getting started

Create a client with your institution’s secret key, then call an endpoint. The key is the same one described in Authentication — the library sends it on every request.

using AwardSpring.Net;
var client = new AwardspringApiClient("YOUR_KEY");
await client.DonorActivities.CreateAsync(new CreateDonorActivityV1Request { DonorId = 1 });
use Awardspring\AwardspringClient;
$client = new AwardspringClient(apiKey: 'YOUR_KEY');

The two libraries do not name the client identically — AwardspringApiClient in .NET, AwardspringClient in PHP.

Choosing a region

Each region is a separate deployment with its own data, and a key issued for one does not work against the other. Both libraries expose both regions and default to the United States.

using AwardSpring.Net;
var client = new AwardspringApiClient(clientOptions: new ClientOptions
{
BaseUrl = AwardspringApiEnvironment.Canada
});
use Awardspring\AwardspringClient;
use Awardspring\Environments;
$client = new AwardspringClient(
apiKey: 'YOUR_KEY',
options: ['baseUrl' => Environments::Canada->value],
);

Full method reference

Every endpoint, with its parameters and return type, is listed in each repository:

Versions and support

Both libraries are pre-1.0. Endpoints and types can change between minor versions while the API surface settles, so pin a version in your project rather than tracking the latest release.

These libraries are generated, which means a bug in one is usually a bug in the description behind it. Report problems through your usual AwardSpring support channel rather than as a pull request — a fix applied directly to a repository is overwritten the next time it is regenerated.