LabelInn 2.1.0

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

LabelInn C# SDK

NuGet License: MIT .NET

Official .NET client for the LabelInn Cloud Print API. Send labels to thermal printers (Zebra, TSC, Honeywell), manage your fleet, and build print automation workflows — all from C#.

Zero external dependencies. Uses built-in HttpClient and System.Net.Http.Json.

Table of Contents

Installation

dotnet add package LabelInn

Requires .NET 6.0 or later.

Quick Start

using LabelInn;

// Initialize client
var client = new LabelInnClient("sk_live_your_key_here");

// Print from a template
var job = await client.PrintJobs.CreateAsync(new PrintJobRequest
{
    PrinterId = "prt_abc123",
    PayloadType = "template",
    DesignId = "tmpl_shipping",
    Data = new Dictionary<string, string>
    {
        ["name"] = "Jane Doe",
        ["order"] = "ORD-4521",
        ["barcode"] = "TR123456789"
    },
    Copies = 2
});

Console.WriteLine($"Job {job.Id} → {job.Status}");

Authentication

Get your API key from LabelInn → Settings → API Keys.

// Test mode (sandbox — no real prints)
var dev = new LabelInnClient("sk_test_xxxxx");

// Live mode (sends to physical printers)
var prod = new LabelInnClient("sk_live_xxxxx");

// Custom base URL
var custom = new LabelInnClient("sk_live_xxxxx", "https://custom.api.example.com/v1");

Send ZPL (raw printer code)

var job = await client.PrintJobs.CreateAsync(new PrintJobRequest
{
    PrinterId = "prt_abc123",
    PayloadType = "zpl",
    PayloadData = "^XA^FO50,50^ADN,36,20^FDShipping Label^FS^XZ"
});

Send an image

var job = await client.PrintJobs.CreateAsync(new PrintJobRequest
{
    PrinterId = "prt_abc123",
    PayloadType = "image",
    ImageUrl = "https://example.com/labels/shipping.png"
});
var job = await client.PrintJobs.CreateAsync(new PrintJobRequest
{
    PrinterId = "prt_abc123",
    PayloadType = "template",
    DesignId = "tmpl_shipping_v2",
    Data = new
    {
        order_id = "ORD-9876",
        customer = "Ali Yilmaz",
        barcode = "TR123456789"
    }
});

Idempotency (prevent duplicate prints)

var job = await client.PrintJobs.CreateAsync(
    new PrintJobRequest { ... },
    idempotencyKey: "order-9876-label"
);
// Calling again with the same key returns the original job

List & manage jobs

// List recent jobs
var list = await client.PrintJobs.ListAsync(new PrintJobListQuery { Limit = 10 });

// Filter by status
var failed = await client.PrintJobs.ListAsync(new PrintJobListQuery { Status = "failed" });

// Get job details
var job = await client.PrintJobs.GetAsync("job_abc123");

// Cancel a queued job
await client.PrintJobs.CancelAsync("job_abc123");

// Reprint with different printer
await client.PrintJobs.ReprintAsync("job_abc123", new ReprintRequest
{
    PrinterId = "prt_backup"
});

Fleet Management

// List all printers
var printers = await client.Fleet.ListAsync();

// Filter by status
var online = await client.Fleet.ListAsync(new PrinterListQuery { Status = "online" });

// Get printer details
var printer = await client.Fleet.GetAsync("prt_abc123");

// Quick status check
var status = await client.Fleet.StatusAsync("prt_abc123");
Console.WriteLine($"{status.Status} — Paper: {status.PaperStatus}");

Designs (Templates)

// List all designs
var designs = await client.Designs.ListAsync();

// Get design details
var design = await client.Designs.GetAsync("tmpl_shipping");

// Get template variables
var vars = await client.Designs.VariablesAsync("tmpl_shipping");
Console.WriteLine($"Variables: {string.Join(", ", vars.Variables)}");

// Clone a design
var clone = await client.Designs.CloneAsync("tmpl_shipping", new CloneDesignRequest
{
    Name = "Shipping v2"
});

// Render a preview
var preview = await client.Designs.RenderAsync("tmpl_shipping", new RenderDesignRequest
{
    Data = new { customer_name = "John" }
});
Console.WriteLine($"Preview: {preview.ImageUrl}");

// Create a new design
var newDesign = await client.Designs.CreateAsync(new CreateDesignRequest
{
    Name = "Custom Label",
    WidthMm = 100,
    HeightMm = 50
});

Webhooks

// List webhooks
var webhooks = await client.Webhooks.ListAsync();

// Create a webhook
var wh = await client.Webhooks.CreateAsync(new CreateWebhookRequest
{
    Url = "https://example.com/webhooks/labelinn",
    Events = new[] { "print.job.completed", "print.job.failed" }
});
Console.WriteLine($"Secret (save this): {wh.SigningSecret}");

// Update webhook
await client.Webhooks.UpdateAsync(wh.Id, new UpdateWebhookRequest
{
    Enabled = true,
    Events = new[] { "print.job.completed" }
});

// Send test event
var test = await client.Webhooks.TestAsync(wh.Id);

// Get delivery history
var deliveries = await client.Webhooks.DeliveriesAsync(wh.Id, limit: 50);

// Delete webhook
await client.Webhooks.DeleteAsync(wh.Id);

Data Connect

Data Connect lets you ingest data from any enterprise system (SAP, Oracle, CSV, JSON) and print labels. Supports XML/IDoc, CSV/TSV, and JSON/NDJSON with auto-detection.

Ingest Data

var result = await client.Connect.IngestAsync(new ConnectIngestRequest
{
    SourceId = "src_abc123",
    Payload = "[{\"sku\": \"A001\"}, {\"sku\": \"A002\"}]",
    Format = "json"
});
Console.WriteLine($"Ingested {result.RecordsCount} records");

Test Parse

var parsed = await client.Connect.TestParseAsync(new ConnectTestParseRequest
{
    Payload = csvString,
    Format = "csv"
});
foreach (var field in parsed.Schema)
    Console.WriteLine($"{field.Path} ({field.Type}): {field.Sample}");

Manage Sources

// Create
var source = await client.Connect.CreateSourceAsync(new CreateSourceRequest
{
    Name = "SAP Orders",
    Format = "xml"
});

// List
var sources = await client.Connect.ListSourcesAsync();

// Get / Update / Delete
var detail = await client.Connect.GetSourceAsync("src_abc123");
await client.Connect.UpdateSourceAsync("src_abc123", new UpdateSourceRequest { Name = "SAP v2" });
await client.Connect.DeleteSourceAsync("src_abc123");

Schema, Records & Mappings

var schema = await client.Connect.GetSchemaAsync("src_abc123");
var records = await client.Connect.ListRecordsAsync("src_abc123", limit: 50);
var mappings = await client.Connect.GetMappingsAsync("src_abc123");
await client.Connect.UpdateMappingsAsync("src_abc123", new { sku = "product_code" });
var printResult = await client.Connect.PrintAsync(new ConnectPrintRequest
{
    SourceId = "src_abc123",
    DesignId = "dsg_shipping",
    PrinterId = "prt_warehouse1",
    Copies = 1
});
Console.WriteLine($"Created {printResult.Count} print jobs");

Error Handling

try
{
    var job = await client.Print.GetAsync("job_abc123");
}
catch (LabelInnRateLimitException ex)
{
    Console.WriteLine($"Rate limited. Retry after {ex.RetryAfterSeconds}s");
}
catch (LabelInnException ex)
{
    Console.WriteLine($"Error [{ex.Status}] {ex.Code}: {ex.Message}");
}
catch (HttpRequestException ex)
{
    Console.WriteLine($"Network error: {ex.Message}");
}

Configuration

Control JSON serialization and timeouts:

var client = new LabelInnClient(
    apiKey: "sk_live_xxxxx",
    baseUrl: "https://custom.api.example.com/v1"  // override URL
);

Requirements

  • .NET 6.0 or later
  • No external NuGet dependencies

Contributing

See GitHub for issues & contributions.

License

MIT — See LICENSE file

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

    • No dependencies.
  • 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
2.1.0 115 4/21/2026
2.0.1 110 4/18/2026
2.0.0 116 4/10/2026