Nordlet

Dokumentacija / Vadovai

SDKs

Install and initialize the Nordlet client in nine languages.

Šis puslapis kol kas pateikiamas anglų kalba.

Typed SDKs are generated from this same OpenAPI spec for nine languages. Each exposes one client with a sub-client per module (client.sales, client.bank, client.declarations, …) mirroring the endpoints in this reference, so once you know the API you know the SDK. Every SDK also ships a full method reference in its own repository.

Package names below reflect the intended published names; until an SDK is published, install it from its source repository.

TypeScript

npm install nordlet
import { NordletApiClient } from "nordlet";

const client = new NordletApiClient({ token: "YOUR_API_KEY" });

await client.sales.invoicesCreate({
  partnerId: "…",
  lines: [{ description: "Consulting", unitPriceExclVat: "75.0000", vatRatePercent: "21.00" }],
});

Python

pip install nordlet
from nordlet import Nordlet

client = Nordlet(token="YOUR_API_KEY")

client.partners.create(name="UAB Klientas", code="301111222", vat_code="LT100001112223")

An async client (AsyncNordlet) is included.

Go

go get github.com/nordlet/nordlet-sdk-go
import (
    "context"
    nordlet "github.com/nordlet/nordlet-sdk-go"
    client "github.com/nordlet/nordlet-sdk-go/client"
    option "github.com/nordlet/nordlet-sdk-go/option"
)

c := client.NewClient(option.WithToken("YOUR_API_KEY"))
c.Partners.Create(context.TODO(), &nordlet.PartnersCreateRequest{Name: "UAB Klientas"})

Java

<dependency>
  <groupId>com.nordlet</groupId>
  <artifactId>nordlet-sdk</artifactId>
  <version>LATEST</version>
</dependency>
import com.nordlet.api.NordletApiClient;

NordletApiClient client = NordletApiClient.builder().token("YOUR_API_KEY").build();
client.partners().create(PartnersCreateRequest.builder().name("UAB Klientas").build());

C#

dotnet add package Nordlet
using NordletApi;

var client = new NordletApiClient("YOUR_API_KEY");
await client.Partners.CreateAsync(new PartnersCreateRequest { Name = "UAB Klientas" });

Ruby

gem install nordlet
require "nordlet"

client = Nordlet::Client.new(token: "YOUR_API_KEY")
client.partners.create(name: "UAB Klientas", code: "301111222")

PHP

composer require nordlet/sdk
use Nordlet\NordletClient;

$client = new NordletClient(token: "YOUR_API_KEY");
$client->partners->create(new CreatePartnerRequest(["name" => "UAB Klientas"]));

Swift

// Package.swift
dependencies: [
  .package(url: "https://github.com/nordlet/nordlet-sdk-swift", from: "0.1.0"),
]
import Api

let client = ApiClient(token: "YOUR_API_KEY")
_ = try await client.partners.create(request: .init(name: "UAB Klientas"))

Rust

[dependencies]
nordlet = "0.1.0"
use nordlet::Client;

let client = Client::new("YOUR_API_KEY")?;
client.partners().create(/* … */).await?;