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 -Version 0.3.0
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);
Place an order
API ordering is available to credit-account customers only. Supply the requested despatch date in the order request. Avalon 2 uses its calculated earliest available despatch date when that is later. Payment method is handled by Avalon 2.
Set CordSku and AgletSku on each item that requires a cord change. Leave either value as
0 when it does not apply. The cord and aglet SKUs must be valid options for the garment SKU.
var created = await client.Orders.CreateAsync(new CreateOrder
{
CustomerReference = "PO-123",
ExpectedDespatchDate = DateTime.Today.AddDays(5),
DeliveryId = 100,
Items = new[]
{
new OrderItem
{
Sku = 123456,
Quantity = 6,
LineReference = "Team A",
CordSku = 654321,
AgletSku = 654399
},
new OrderItem
{
Sku = 123456,
Quantity = 4,
LineReference = "Team A",
CordSku = 654321,
AgletSku = 654399
},
new OrderItem
{
Sku = 123457,
Quantity = 5,
LineReference = "Team B"
}
}
});
The first two lines have the same line reference, garment SKU, cord SKU, and aglet SKU, so Avalon 2 places them as
one item with a quantity of 10. A difference in any of those four values creates a separate item line.
Read created.Status.Orders for the order or split orders that were placed. Each returned order contains the
effective ExpectedDespatchDate, which can be later than requested because of cutoff, slowdown, non-working-day,
stock, cord-change, or carrier rules.
JSON request
Post the wrapped request to POST /api/v2/order with the API key in the api-key header.
{
"order": {
"customerReference": "PO-123",
"expectedDespatchDate": "2026-08-10T00:00:00",
"deliveryAddressId": 100,
"items": [
{
"sku": 123456,
"quantity": 10,
"lineReference": "Team A",
"cordSku": 654321,
"agletSku": 654399
},
{
"sku": 123457,
"quantity": 5,
"lineReference": "Team B",
"cordSku": 0,
"agletSku": 0
}
]
}
}