Certify.Api
1.2.23
See the version list below for details.
dotnet add package Certify.Api --version 1.2.23
NuGet\Install-Package Certify.Api -Version 1.2.23
<PackageReference Include="Certify.Api" Version="1.2.23" />
<PackageVersion Include="Certify.Api" Version="1.2.23" />
<PackageReference Include="Certify.Api" />
paket add Certify.Api --version 1.2.23
#r "nuget: Certify.Api, 1.2.23"
#:package Certify.Api@1.2.23
#addin nuget:?package=Certify.Api&version=1.2.23
#tool nuget:?package=Certify.Api&version=1.2.23
Certify.Api
A modern .NET client library for the Certify Expense Management API, built with .NET 10 and C# 14.
Features
- ?? Full .NET 10 Support - Built with the latest .NET features and C# 14 syntax
- ?? Complete API Coverage - Full support for Certify REST API v1
- ?? Strongly-Typed - All models include comprehensive XML documentation
- ? Async/Await - Modern async patterns with
CancellationTokensupport - ?? Built on Refit - Leveraging Refit for maintainable HTTP clients
- ?? Debugging Support - Symbol packages (
.snupkg) included for source-level debugging - ?? Structured Logging - Integrated
Microsoft.Extensions.Loggingsupport - ?? Nullable Reference Types - Full nullable annotations for better null-safety
Installation
Install via NuGet Package Manager:
Install-Package Certify.Api
Or via .NET CLI:
dotnet add package Certify.Api
Quick Start
using Certify.Api;
// Initialize the client with your API credentials
using var client = new CertifyClient(
apiKey: "your-api-key",
apiSecret: "your-api-secret"
);
// Get a page of users
var users = await client.Users.GetPageAsync(cancellationToken: cancellationToken);
// Get all expense reports
var expenseReports = await client.ExpenseReports.GetAllAsync(cancellationToken: cancellationToken);
// Get a specific department by ID
var department = await client.Departments.GetAsync(departmentId, cancellationToken: cancellationToken);
Configuration Options
Customize the client behavior using CertifyClientOptions:
using Microsoft.Extensions.Logging;
var options = new CertifyClientOptions
{
Timeout = TimeSpan.FromSeconds(60), // Default is 120 seconds
Logger = loggerInstance // Optional: add structured logging
};
using var client = new CertifyClient(apiKey, apiSecret, options);
Logging Support
The library supports Microsoft.Extensions.Logging for detailed request/response logging:
using Microsoft.Extensions.Logging;
// Create a logger factory
using var loggerFactory = LoggerFactory.Create(builder =>
{
builder
.AddConsole()
.SetMinimumLevel(LogLevel.Debug);
});
var logger = loggerFactory.CreateLogger<CertifyClient>();
var options = new CertifyClientOptions
{
Logger = logger
};
using var client = new CertifyClient(apiKey, apiSecret, options);
Supported Endpoints
The library provides full support for all Certify API endpoints:
| Endpoint | Interface | Description |
|---|---|---|
| Users | IUsers |
Manage user accounts and profiles |
| Departments | IDepartments |
Manage departments and organizational structure |
| Expense Reports | IExpenseReports |
Access and manage expense reports |
| Expenses | IExpenses |
Individual expense line items |
| Expense Categories | IExpenseCategories |
Expense category definitions |
| Employee GLDs | IEmpGlds |
Employee general ledger dimensions |
| Expense Report GLDs | IExpenseReportGlds |
Expense report general ledger dimensions |
| Receipts | IReceipts |
Receipt images and attachments |
| Invoices | IInvoices |
Invoice management |
| Invoice Reports | IInvoiceReports |
Invoice report data |
| Mileage Rates | IMileageRates |
Mileage rate configurations |
| Mileage Rate Details | IMileageRateDetails |
Detailed mileage rate information |
| CPD Lists | ICpdLists |
Continuing Professional Development lists |
Advanced Usage
Pagination
Get all items across multiple pages:
// Extension method automatically handles pagination
var allUsers = await client.Users.GetAllAsync(cancellationToken: cancellationToken);
// Or manually page through results
uint pageNumber = 1;
var page = await client.Users.GetPageAsync(page: pageNumber, cancellationToken: cancellationToken);
Console.WriteLine($"Page {page.PageNumber} of {page.TotalPageCount}");
Console.WriteLine($"Total records: {page.TotalRecordCount}");
Filtering
Most endpoints support filtering parameters:
// Get active users only
var activeUsers = await client.Users.GetPageAsync(
active: 1,
cancellationToken: cancellationToken
);
// Get expense reports by date range
var reports = await client.ExpenseReports.GetPageAsync(
startDate: "2024-01-01",
endDate: "2024-12-31",
processed: 1,
cancellationToken: cancellationToken
);
// Get departments by code
var departments = await client.Departments.GetPageAsync(
code: "DEPT001",
cancellationToken: cancellationToken
);
Creating and Updating Resources
// Create a new department
var newDepartment = new Department
{
Name = "Engineering",
Code = "ENG",
Description = "Engineering Department"
};
var createResult = await client.Departments.CreateAsync(
newDepartment,
cancellationToken: cancellationToken
);
Console.WriteLine($"Created department with ID: {createResult.Id}");
// Update an existing department
var department = new Department
{
Id = existingDepartmentId,
Name = "Updated Name"
};
var updateResults = await client.Departments.UpdateAsync(
department,
cancellationToken: cancellationToken
);
foreach (var result in updateResults)
{
Console.WriteLine($"Status: {result.Status}, Message: {result.Message}");
}
Error Handling
using Refit;
try
{
var users = await client.Users.GetPageAsync(cancellationToken: cancellationToken);
}
catch (ApiException ex)
{
// Handle API errors
Console.WriteLine($"API Error: {ex.StatusCode} - {ex.Content}");
}
catch (TaskCanceledException)
{
// Handle timeout or cancellation
Console.WriteLine("Request timed out or was cancelled");
}
catch (Exception ex)
{
// Handle other errors
Console.WriteLine($"Error: {ex.Message}");
}
Using with Dependency Injection
using Microsoft.Extensions.DependencyInjection;
var services = new ServiceCollection();
// Register as singleton or scoped based on your needs
services.AddSingleton<CertifyClient>(sp =>
{
var logger = sp.GetRequiredService<ILogger<CertifyClient>>();
var options = new CertifyClientOptions
{
Timeout = TimeSpan.FromSeconds(120),
Logger = logger
};
return new CertifyClient(
apiKey: "your-api-key",
apiSecret: "your-api-secret",
options: options
);
});
var serviceProvider = services.BuildServiceProvider();
var certifyClient = serviceProvider.GetRequiredService<CertifyClient>();
API Documentation
For detailed information about the Certify API endpoints and parameters, refer to the official Certify API Documentation.
Requirements
- .NET 10 or higher (recommended)
- .NET 5+ (compatible via .NET Standard 2.0)
- .NET Core 2.0+ (compatible via .NET Standard 2.0)
- .NET Framework 4.6.1+ (compatible via .NET Standard 2.0)
Dependencies
- Refit 8.0.0 - The automatic type-safe REST library
- Microsoft.Extensions.Logging.Abstractions - Logging abstractions
- Nerdbank.GitVersioning - Automatic version management from Git
Building from Source
# Clone the repository
git clone https://github.com/panoramicdata/Certify.Api.git
cd Certify.Api
# Restore dependencies
dotnet restore
# Build the solution
dotnet build
# Run tests (requires appsettings.json with valid credentials)
dotnet test
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Testing
The test suite uses xUnit and requires valid Certify API credentials. Create an appsettings.json file in the test project:
{
"Config": {
"Credentials": {
"ApiKey": "your-api-key",
"ApiSecret": "your-api-secret"
}
}
}
License
This project is licensed under the MIT License - see the LICENSE file for details.
Authors
- David Bond - Panoramic Data Limited
- Daniel Abbatt - Panoramic Data Limited
Support
For issues, questions, or suggestions, please open an issue on GitHub.
Acknowledgments
- Built with Refit
- Uses Microsoft.Extensions.Logging
- Versioned with Nerdbank.GitVersioning
Copyright � 2019-2025 Panoramic Data Limited
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.0)
- Refit (>= 8.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.2.30 | 140 | 6/6/2026 |
| 1.2.28 | 160 | 4/16/2026 |
| 1.2.24 | 133 | 4/7/2026 |
| 1.2.23 | 543 | 11/16/2025 |
| 1.2.21 | 281 | 11/16/2025 |
| 1.2.14 | 1,039 | 11/13/2024 |
| 1.2.4 | 2,371 | 4/7/2020 |
| 1.2.1 | 850 | 1/8/2020 |
| 1.1.12 | 766 | 8/13/2019 |
| 1.1.11 | 774 | 8/13/2019 |
| 1.1.10 | 781 | 8/13/2019 |
| 1.1.9 | 765 | 8/13/2019 |
| 1.1.8 | 763 | 7/14/2019 |
| 1.1.4 | 778 | 6/28/2019 |
| 1.1.2-g75b2ef89d3 | 638 | 6/28/2019 |
| 1.0.2 | 788 | 5/27/2019 |
| 0.0.17-c8968bcc1a | 662 | 5/12/2019 |
| 0.0.13-dce2c97222 | 644 | 5/11/2019 |
| 0.0.6-bf3b75d693 | 680 | 5/10/2019 |
| 0.0.2-d958db9730 | 673 | 5/10/2019 |
Nuget package updates.