Setup

Getting started

Use v2 endpoints for new integrations. Legacy endpoints remain available for existing customers but are deprecated.

Authentication

Authenticated endpoints require a customer API key in the api-key header.

api-key: your-api-key

.NET client

Install the client package into .NET Framework 4.8 or modern .NET applications.

Install-Package Tgi.Api.Av2.Client
using Tgi.Api.Av2.Client;
using Tgi.Api.Av2.Client.Models;

using var client = new AvalonApiClient("https://api.av2.cottonridge.co.uk/", "your-api-key");

var stock = await client.Stock.GetBySkuAsync(123456);

Ordering

API ordering is available to credit-account customers only. Payment method is handled by Avalon 2 and is not supplied in order requests.

var created = await client.Orders.CreateAsync(new CreateOrder
{
    CustomerReference = "PO-123",
    DeliveryId = 100,
    Items = new[]
    {
        new OrderItem { Sku = 123456, Quantity = 10, LineReference = "Line 1" }
    }
});