Certify.Api 1.2.23

There is a newer version of this package available.
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
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Certify.Api" Version="1.2.23" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Certify.Api" Version="1.2.23" />
                    
Directory.Packages.props
<PackageReference Include="Certify.Api" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Certify.Api --version 1.2.23
                    
#r "nuget: Certify.Api, 1.2.23"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Certify.Api@1.2.23
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Certify.Api&version=1.2.23
                    
Install as a Cake Addin
#tool nuget:?package=Certify.Api&version=1.2.23
                    
Install as a Cake Tool

Certify.Api

Codacy Badge NuGet NuGet License: MIT

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 CancellationToken support
  • ?? Built on Refit - Leveraging Refit for maintainable HTTP clients
  • ?? Debugging Support - Symbol packages (.snupkg) included for source-level debugging
  • ?? Structured Logging - Integrated Microsoft.Extensions.Logging support
  • ?? 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

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.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. 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

Support

For issues, questions, or suggestions, please open an issue on GitHub.

Acknowledgments


Copyright � 2019-2025 Panoramic Data Limited

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.