Skip to content

SkillsFundingAgency/hmrc-apprenticeship-levy-api-client

Repository files navigation

HMRC apprenticeship levy client

crest
Build Build status
.Net Client

An API client for HMRC Apprenticeship Levy

Usage

Authentication

You'll need to talk to the ESFA

Find all the apprenticeship levy declarations

var tokenServiceConfig = new TokenServiceApiClientConfiguration
{
    ClientSecret = "<something>",
    ApiBaseUrl = "https://sfa-token-api/",
    ClientId = "<client-guid>",
    IdentifierUri = "<url service identifier for AD>",
    Tenant = "<SFA Azure AD>",
    TokenCertificate = null // used in prod
};

var tokenService = new SFA.DAS.TokenService.Api.Client.TokenServiceApiClient(tokenServiceConfig);
var tokenResult = await tokenService.GetPrivilegedAccessTokenAsync();
var httpClient = HmrcLevyApiClient.CreateHttpClient(tokenResult.AccessCode, "https://hmrc-api-url/");
var client = new HmrcLevyApiClient(httpClient);
var result = await _sut.GetEmployerLevyDeclarations("000/000000");

About

☁️💷 API Client to get apprenticeship levy information

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages