Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

GS1 Barcode & Digital Link Decoder — .NET / C# SDK

NuGet version License: MIT Stanza API

Decode GS1 DataMatrix, GS1-128, FNC1 barcodes, and GS1 Digital Link URIs into structured JSON in sub-5ms.

Official high-performance .NET client library for GS1 Barcode & Digital Link Decoder, built on the Stanza Micro-API Network. Fully compatible with .NET Standard 2.0, .NET 6.0, .NET 7.0, and .NET 8.0+.


📦 Installation

dotnet add package StanzaApi.Gs1Decoder

🚀 Quickstart

using System;
using System.Threading.Tasks;
using StanzaApi.Gs1Decoder;

class Program
{
    static async Task Main()
    {
        // Initialize client (reads STANZA_API_KEY from environment if not passed)
        var client = new Gs1DecoderClient();

        // Perform deterministic verification
        string responseJson = await client.ValidateAsync("(01)00123456789012(21)12345");
        Console.WriteLine(responseJson);
    }
}

📄 Example Response

{
  "success": true,
  "data": {
    "gtin": "00123456789012",
    "serial_number": "12345",
    "ai_elements": [
      {
        "ai": "01",
        "label": "GTIN",
        "value": "00123456789012"
      },
      {
        "ai": "21",
        "label": "SERIAL",
        "value": "12345"
      }
    ]
  }
}

⚙️ Configuration

Pass options directly to the Gs1DecoderClient constructor:

var client = new Gs1DecoderClient(
    apiKey: "your_api_key_here",
    baseUrl: "https://api.stanzaapi.com/gs1-decoder"
);

🔗 Useful Links

📄 License

MIT © Stanza — Powered by Stanza.

Releases

Packages

Contributors

Languages