FlexOps.Sdk 1.0.0

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

FlexOps .NET SDK

Official .NET client for the FlexOps multi-carrier shipping platform — typed, resource-based, async/await throughout.

Installation

dotnet add package FlexOps.Sdk

Quick start

The FlexOpsTypedClient is the primary entry point. It exposes 20 resource properties — one per Gateway domain — each with strongly-typed methods, XML doc comments, and CancellationToken support.

using FlexOps.Sdk;

using var client = new FlexOpsTypedClient(
    baseUrl: "https://gateway.flexops.io",
    apiKey: "fxk_test_...",      // sandbox key — see below
    workspaceId: "ws_abc123"
);

// Rate shop across all connected carriers
var rates = await client.Shipping.GetRatesAsync(new
{
    fromAddress = new { street1 = "123 Main St", city = "New York",   state = "NY", zip = "10001", country = "US" },
    toAddress   = new { street1 = "456 Oak Ave", city = "Los Angeles", state = "CA", zip = "90210", country = "US" },
    parcel      = new { weight  = 16, weightUnit = "oz" }
});

// Cheapest rate only
var cheapest = await client.Shipping.GetCheapestRateAsync(new { /* same shape */ });

// Buy a label
var label = await client.Shipping.CreateLabelAsync(new
{
    carrier = "USPS",
    service = "PRIORITY_MAIL",
    fromAddress = new { /* ... */ },
    toAddress   = new { /* ... */ },
    parcel      = new { weight = 16, weightUnit = "oz" }
});

// Track
var tracking = await client.Shipping.TrackAsync("9400111899223456789012");

// Create a return
var rma = await client.Returns.CreateRmaAsync(new { originalShipmentId = label!.Data!.Id, reason = "wrong_size" });

Resources

The typed client exposes:

Property Domain
client.Auth Login, register, password management
client.Workspaces Workspace CRUD, members, invitations
client.Shipping Rates, labels, tracking, batch, address validation
client.Carriers Direct carrier-specific ops (USPS, UPS, FedEx, DHL)
client.Webhooks Subscriptions + signature verification
client.Wallet Balance, top-up, transactions
client.Insurance Quotes, purchases, claims
client.Returns RMAs, return labels, batch disposition
client.ApiKeys Create, revoke, rotate
client.Analytics Shipments, carriers, orders, returns
client.Orders Order CRUD via VisionSuite proxy
client.Inventory Inventory CRUD via VisionSuite proxy
client.Pickups Carrier pickup scheduling
client.ScanForms USPS scan form / manifest management
client.Rules Shipping automation rules
client.Offsets Carbon offset operations
client.HsCodes HS code search, lookup, landed cost
client.RecurringShipments Schedule management
client.EmailTemplates Branded email templates
client.Reports Scheduled reports

Authentication

using var client = new FlexOpsTypedClient(
    "https://gateway.flexops.io",
    apiKey: "fxk_live_...",
    workspaceId: "ws_abc123");

JWT bearer token

using var client = new FlexOpsTypedClient("https://gateway.flexops.io");
client.SetAccessToken("eyJhbGciOi...");
client.WorkspaceId = "ws_abc123";

Custom HttpClient

Useful for IHttpClientFactory, custom handlers (telemetry, retries), or DI:

var httpClient = new HttpClient { BaseAddress = new Uri("https://gateway.flexops.io/") };
using var client = new FlexOpsTypedClient(
    "https://gateway.flexops.io",
    apiKey: "fxk_live_...",
    httpClient: httpClient);

Sandbox

Use an fxk_test_... API key instead of fxk_live_... to hit the sandbox. Mock carriers respond, no real charges, no real labels — useful for CI, integration tests, and demos. Tracking numbers are prefixed SBOX... so you can tell them apart from production.

Advanced: lower-level HTTP client

FlexOpsClient is the underlying HTTP client used by every resource. Use it directly when you need an endpoint that hasn't been wrapped yet, or when you want to call a future endpoint without waiting for a SDK release.

using var client = new FlexOpsClient(
    "https://gateway.flexops.io",
    apiKey: "fxk_live_...",
    workspaceId: "ws_abc123");

// Path helpers: WsPath() prefixes with /api/workspaces/{workspaceId}/
var custom = await client.PostAsync<ApiResponse<MyType>>(
    client.WsPath("some/new/endpoint"),
    new { /* payload */ });

FlexOpsTypedClient wraps FlexOpsClient and forwards auth + workspace context, so you can mix and match if needed.

Curl quickstart

If you'd rather verify the API directly before wiring the SDK:

# Rate shop
curl -X POST https://gateway.flexops.io/api/workspaces/ws_abc123/shipping/rates \
  -H "X-API-Key: fxk_test_..." \
  -H "Content-Type: application/json" \
  -d '{
    "fromAddress": {"street1": "123 Main St", "city": "New York",   "state": "NY", "zip": "10001", "country": "US"},
    "toAddress":   {"street1": "456 Oak Ave", "city": "Los Angeles", "state": "CA", "zip": "90210", "country": "US"},
    "parcel":      {"weight": 16, "weightUnit": "oz"}
  }'

# Buy a label
curl -X POST https://gateway.flexops.io/api/workspaces/ws_abc123/shipping/labels \
  -H "X-API-Key: fxk_test_..." \
  -H "Content-Type: application/json" \
  -d '{
    "carrier":  "USPS",
    "service":  "PRIORITY_MAIL",
    "fromAddress": {"name": "Warehouse", "street1": "123 Main St", "city": "New York",   "state": "NY", "zip": "10001", "country": "US"},
    "toAddress":   {"name": "Customer",  "street1": "456 Oak Ave", "city": "Los Angeles", "state": "CA", "zip": "90210", "country": "US"},
    "parcel":   {"weight": 16, "weightUnit": "oz"}
  }'

# Track
curl https://gateway.flexops.io/api/workspaces/ws_abc123/shipping/track/9400111899223456789012 \
  -H "X-API-Key: fxk_test_..."

Requirements

  • .NET 10.0 or higher

License

MIT

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.
  • net10.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
1.0.0 100 4/19/2026