GunNabber.RetailerApi.Client 1.1.3

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

GunNabber.RetailerApi.Client

A .NET client library for seamless integration with the GunNabber Retailer API. This package provides strongly-typed models and service abstractions to manage products, handle requests, and interact with the GunNabber retailer ecosystem.

Features

  • Easy-to-use client for the GunNabber Retailer API
  • Strongly-typed models for products and requests
  • Standardized API response handling
  • Extensible service interfaces for product management

Installation

Install via NuGet Package Manager:

dotnet add package GunNabber.RetailerApi.Client

Or via the NuGet UI in your code editor of choice.

Getting Started

1. Configure API Client Options

var options = new ApiClientOptions
{
    ApiKey = "your-api-key",
    ApiVersion = "1"
};

2. Initialize the Client

var client = new GunNabberClient(options);

3. Access Product Services

var productService = client.GetProductService();

4. Fetch Products

var response = await productService.GetProductsAsync();
if (response.IsSuccess)
{
    var products = response.Data;
    // Use products
}
else
{
    Console.WriteLine($"Error: {response.ErrorMessage}");
}

Models

  • Product: Represents a product in the retailer system.
  • ProductRequest: Used for creating or updating product data.
  • Deal: Represents a deal or promotion associated with a product.
  • DealRequest: Used for creating or updating deal data.
  • Response<T>: Standardized API response wrapper.

API Response Handling

All service methods return a Response<T> object, which includes:

  • Data: The result data (if successful)
  • StatusCode: HTTP status code
  • Headers: Response headers
  • RawContent: Raw response content
  • IsSuccess: Indicates if the request was successful
  • ErrorMessage and Errors: Error details (if any)

Retailer verification (live product writes)

Live API keys (pk_api_ / ak_api_) require the retailer account to be Verified before creating or updating products. If the retailer is not verified, add/update product calls return:

  • HTTP 403 Forbidden
  • response.IsSuccess → false
  • response.StatusCode → HttpStatusCode.Forbidden
  • response.ErrorMessage → "Retailer account must be verified before submitting live products or enabling feeds."

response.Errors is typically empty for this case — the API returns the message in the Problem Details title, not as a structured validation error list.

Test API keys (pk_test_ / ak_test_) bypass verification and can still be used during onboarding.

var response = await productService.AddProduct(productRequest);
if (!response.IsSuccess)
{
    if (response.StatusCode == System.Net.HttpStatusCode.Forbidden)
    {
        // Retailer is not verified (or otherwise forbidden)
        Console.WriteLine(response.ErrorMessage);
        return;
    }

    Console.WriteLine($"Error: {response.ErrorMessage}");
}

Release Notes

1.1.3

  • Breaking change: Product.Upc and ProductRequest.Upc changed from int to string? to match the Retailer API (preserves leading zeros and non-numeric UPC values).
    • Update any code that assigns or compares Upc as an integer. For example, change Upc = 123456789012 to Upc = "123456789012".
    • If you read Upc into an int variable, switch that to string? (or parse it only when needed).
  • Added shipping fields to product models: ShippingCost, ShippingCostEstimated, WeightInPounds, LengthInInches, WidthInInches, HeightInInches

1.1.2

  • Local packaging of the UPC string alignment and shipping field updates (use 1.1.3 from nuget.org)

1.1.1

  • Documented retailer verification requirements for live product create/update
  • Clarified HTTP 403 Forbidden handling when a retailer account is not verified
  • Clarified that test API keys (pk_test_ / ak_test_) bypass verification during onboarding

1.1.0

  • Added deal management support (DealService / IDealService)
  • Added Deal and DealRequest models

1.0.0

  • First stable release
  • Product create, read, update, and delete via ProductService
  • Standardized Response<T> API response wrapper with Problem Details error handling
  • Package icon and license metadata

0.1.x

  • Initial prerelease client for GunNabber Retailer API product operations
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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.

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
1.1.3 97 9/5/2026
1.1.2 91 9/5/2026
1.1.1 95 9/4/2026
1.0.0 206 10/7/2025

1.1.3: BREAKING — Product.Upc / ProductRequest.Upc changed from int to string? (update callers that assign/compare Upc as int). Also adds shipping dimension fields to product models.
1.1.2: Local packaging of UPC string alignment and shipping fields (superseded by 1.1.3 for nuget.org).
1.1.1: Document retailer verification for live product writes (HTTP 403 when unverified); clarify test API key bypass.
1.1.0: Add deal management support (DealService, Deal, DealRequest).
1.0.0: First stable release with product CRUD and Response<T> error handling.