ZalTrack 0.1.0

dotnet add package ZalTrack --version 0.1.0
                    
NuGet\Install-Package ZalTrack -Version 0.1.0
                    
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="ZalTrack" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ZalTrack" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="ZalTrack" />
                    
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 ZalTrack --version 0.1.0
                    
#r "nuget: ZalTrack, 0.1.0"
                    
#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 ZalTrack@0.1.0
                    
#: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=ZalTrack&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=ZalTrack&version=0.1.0
                    
Install as a Cake Tool

ZalTrack .NET SDK

The official .NET SDK for the ZalTrack Zalando price tracking API.

Track Zalando prices and products with a scheduled watchlist, price history and alerts.

The SDK exposes 9 typed async methods, one per documented endpoint (with required properties checked at compile time), plus ClearTargetPriceAsync and a generic RequestAsync.

Requirements

  • .NET 8 or newer

Installation

dotnet add package ZalTrack

Get your API key

Sign up for ZalTrack or sign in, then copy your API key from the dashboard. new ZalTrackClient() reads the ZALTRACK_API_KEY environment variable.

Quick start

using ZalTrack;

using var client = new ZalTrackClient();
var response = await client.SearchZalandoAsync(new SearchZalandoParams { Query = "nike trainers" });
Console.WriteLine(response.Json);

Parameter classes mirror the API reference. Use response.Deserialize<MyType>() to map the JSON onto your own types.

HTTP methods

Each method uses the HTTP verb of its endpoint. GET and DELETE send parameters in the query string; POST and PATCH send them as a JSON body, except wait on /products/{id}/check, which stays in the query string. Null values are never sent: to remove a product's target price, call ClearTargetPriceAsync(id), which sends {"target_price": null}.

Any endpoint

var response = await client.RequestAsync("GET", "/account");

Errors

try
{
    await client.SearchZalandoAsync(new SearchZalandoParams { Query = "nike trainers" });
}
catch (ZalTrackApiException exception)
{
    Console.Error.WriteLine($"{exception.StatusCode} {exception.ErrorCode}: {exception.Message}");
}

ErrorCode is the API's error.code (such as insufficient_credits, product_limit or not_found), or null when the body has none.

Exception When
ZalTrackConfigurationException Missing API key, invalid options or unsupported method.
ZalTrackSerializationException A required parameter is missing or a value can't be sent.
ZalTrackTransportException Network failure or timeout.
ZalTrackApiException Non-2xx status (StatusCode, ErrorMessage, ErrorCode, ResponseBody, RawResponse).
ZalTrackResponseDecodingException A success response could not be decoded.

All of them derive from ZalTrackException. Caller cancellation surfaces as OperationCanceledException.

Retries

Requests are retried up to 3 times after a network error, a 408, 500, 502, 503 or 504. Other statuses, such as 400, 401, 402, 404 or 429, and client-side timeouts are not retried: the API's rate limits last until the hour (or the day) is over, and on the free plan every retry would count as a request. The delay starts at 1 second and grows 1.5× per retry (capped at 30 seconds); a Retry-After header wins.

using var client = new ZalTrackClient(new ZalTrackClientOptions { MaxRetries = 5, RetryDelay = TimeSpan.FromMilliseconds(500) });
await client.SearchZalandoAsync(new SearchZalandoParams { Query = "nike trainers" }, new RequestOptions { MaxRetries = 0 }); // one request without retries

Batch requests

BatchAsync runs a function per item with at most 10 in flight (concurrency) and returns one BatchResult per item, in input order. A failing item never stops the others.

string[] inputs = { "nike trainers", "rain jacket", "leather boots" };
var results = await client.BatchAsync(inputs, (value, ct) =>
    client.SearchZalandoAsync(new SearchZalandoParams { Query = value }, cancellationToken: ct), concurrency: 5);
foreach (var result in results)
{
    if (result.Ok)
    {
        Console.WriteLine(result.Value!.Json);
    }
    else
    {
        Console.Error.WriteLine($"{inputs[result.Index]}: {result.Error!.Message}");
    }
}
Constant Default Description
ZalTrackClient.DefaultConcurrency 10 Tasks run at the same time by batch
ZalTrackClient.DefaultTimeout TimeSpan.FromSeconds(120) Request timeout
ZalTrackClient.MaxRetries 3 Retry attempts after a network error, a 408/5xx
ZalTrackClient.RetryBackoffFactor 1.5 Exponential backoff multiplier
ZalTrackClient.DefaultRetryDelay TimeSpan.FromSeconds(1) Delay before the first retry

Configuration

using var client = new ZalTrackClient(new ZalTrackClientOptions
{
    ApiKey = Environment.GetEnvironmentVariable("ZALTRACK_API_KEY"),
    Timeout = TimeSpan.FromSeconds(60), // default 120 s
    HttpClient = myHttpClient,           // optional, you keep ownership
});

Endpoints

9 methods, generated from the OpenAPI document, plus ClearTargetPriceAsync.

Method HTTP Description
CheckProductAsync POST /products/{id}/check Asks for a check right away (1 credit), at most once per 5 minutes; earlier calls return the product unchanged. A paused product has to be…
ClearTargetPriceAsync PATCH /products/{id} Removes the product's target price (sends {"target_price": null}).
DeleteProductAsync DELETE /products/{id} Removes the product and its price history.
GetAccountAsync GET /account Your plan, the credits left (monthly allowance and packs), how many products you track and the credits they use per month, the credits each…
GetArticleHistoryAsync GET /history Every price ZalTrack read for an article reference on a marketplace over the period, whoever tracks it, oldest first, with the lowest, high…
GetProductAsync GET /products/{id} The product's latest state and every price read of the period, oldest first. The history covers every read of this article reference on thi…
ListProductsAsync GET /products Your watchlist, newest first, with each product's latest state and its recent prices (trend). Filter with article_id (and marketplace) to k…
SearchZalandoAsync GET /search Zalando search results (sponsored included), to find the article reference of a product. Free, limited to 30 searches per hour.
TrackProductAsync POST /products Adds an article reference or a Zalando link to your watchlist. The first check runs in the background within seconds (checking is true unti…
UpdateProductAsync PATCH /products/{id} Target price, drop alerts, check interval, or pause. Send only what changes. On the free plan, alerts (price drop, back in stock, target pr…

All ZalTrack SDKs

SDK Package Install
Node.js @zaltrack/sdk npm install @zaltrack/sdk
Python zaltrack pip install zaltrack
Go zaltrack-go go get github.com/zaltrackdev/zaltrack-go
.NET ZalTrack dotnet add package ZalTrack
Ruby zaltrack gem install zaltrack
PHP zaltrack/sdk composer require zaltrack/sdk
Java zaltrack-java build from source, see its README
CLI @zaltrack/cli npm install -g @zaltrack/cli
MCP server @zaltrack/mcp npx -y @zaltrack/mcp

Trademarks

ZALANDO® is a registered trademark of Zalando SE. ZalTrack is not affiliated with, endorsed or sponsored by Zalando.

License

MIT — see LICENSE.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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.
  • net8.0

    • No dependencies.

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
0.1.0 0 12/1/2026