SDKs & Libraries
Official FlexOps SDKs are available in 7 languages. Each SDK provides:
- Typed request/response models
- Automatic retry with exponential backoff
- Rate limit handling
- Webhook signature verification
- Idempotency key generation
- Carrier-specific passthrough methods (USPS, FedEx, UPS, DHL)
Supported Languages
| Language | Package | Min Version |
|---|---|---|
| Node.js | @flexops/sdk | Node 18+ |
| Python | flexops | Python 3.10+ |
| C# | FlexOps.Sdk | .NET 10+ |
| Ruby | flexops | Ruby 3.1+ |
| PHP | flexops/sdk | PHP 8.1+ |
| Go | github.com/FlexOps/flexops-sdk-go | Go 1.22+ |
| Java | com.flexops:flexops-sdk | Java 21+ |
Installation
- Node.js
- Python
- C#
- Ruby
- PHP
- Go
- Java
npm install @flexops/sdk
pip install flexops
dotnet add package FlexOps.Sdk
gem install flexops
composer require flexops/sdk
go get github.com/FlexOps/flexops-sdk-go
<dependency>
<groupId>com.flexops</groupId>
<artifactId>flexops-sdk</artifactId>
<version>1.0.0</version>
</dependency>
Client Initialization
- Node.js
- Python
- C#
- Ruby
- PHP
- Go
- Java
import { FlexOps } from '@flexops/sdk';
const client = new FlexOps({
apiKey: 'fxk_live_your_api_key',
workspaceId: 'ws_abc123',
});
from flexops import FlexOps
client = FlexOps(
api_key="fxk_live_your_api_key",
workspace_id="ws_abc123",
)
using FlexOps.Sdk;
using var client = new FlexOpsClient(
baseUrl: "https://api.flexops.io",
apiKey: "fxk_live_your_api_key");
client.WorkspaceId = "ws_abc123";
require 'flexops'
client = FlexOps::Client.new(
api_key: 'fxk_live_your_api_key',
workspace_id: 'ws_abc123',
)
use FlexOps\FlexOps;
$client = new FlexOps([
'apiKey' => 'fxk_live_your_api_key',
'workspaceId' => 'ws_abc123',
]);
import "github.com/FlexOps/flexops-sdk-go"
client := flexops.NewClient(flexops.Config{
APIKey: "fxk_live_your_api_key",
WorkspaceID: "ws_abc123",
})
import com.flexops.sdk.FlexOpsClient;
var client = new FlexOpsClient(
"https://api.flexops.io",
"fxk_live_your_api_key");
client.setWorkspaceId("ws_abc123");
Feature Parity
All SDKs support the same core operations:
| Feature | All SDKs |
|---|---|
| Rate shopping | Yes |
| Label creation | Yes |
| Tracking | Yes |
| Address validation | Yes |
| Webhook verification | Yes |
| Batch operations | Yes |
| Async/await | Yes |
| Automatic retries | Yes |
| Rate limit handling | Yes |
| Carrier passthrough (USPS, FedEx, UPS, DHL) | Yes |
Available Resources
Every SDK exposes these resource domains on the client object:
| Resource | Methods |
|---|---|
shipping | getRates, getCheapestRate, getFastestRate, createLabel, cancelLabel, track, validateAddress, createBatch, getBatchStatus |
carriers | usps., fedex., ups., dhl. (carrier-specific passthrough) |
webhooks | create, list, delete, test |
wallet | getBalance, reload, getTransactions |
insurance | getQuote, buyPolicy, listPolicies |
returns | create, authorize, track |
analytics | getShipmentsTrend, getCarrierSummary |
auth | login, register, refreshToken, logout |
apiKeys | create, list, revoke, rotate |
See individual SDK pages for language-specific examples.