Skip to content

Repository files navigation

doslano-sdk

Doslano Integration API

  • API version: 1.0.0
    • Build date: 2026-07-22T13:37:56.424318976Z[Etc/UTC]
    • Generator version: 7.10.0

Публичный REST API doslano: отправка заказных писем одним запросом, проверка статуса и трек-номеров (наш РПО + Почты России), баланс, колбеки на финальный статус письма.

Авторизация — API-ключ в заголовке Authorization: Bearer dl_live_…. Ключи и журнал активности — в ЛК, раздел «API». Ключ имеет набор прав (scopes) и (опционально) IP-allowlist.

Оплата — только с баланса аккаунта (предоплата). Пополнение — в ЛК.

Колбеки — необязательный callback_url указывается при отправке каждого письма; иначе используйте поллинг GET /v1/letters/{id}. Тело колбека подписывается HMAC-SHA256 секретом аккаунта (заголовок X-Doslano-Signature).

Это дополнительный интерфейс доступа к тем же услугам; использование регулируется действующей офертой личного кабинета doslano.

For more information, please visit https://doslano.ru

Automatically generated by the OpenAPI Generator

Requirements

Building the API client library requires:

  1. Java 1.8+
  2. Maven (3.8.3+)/Gradle (7.2+)

Installation

To install the API client library to your local Maven repository, simply execute:

mvn clean install

To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:

mvn clean deploy

Refer to the OSSRH Guide for more information.

Maven users

Add this dependency to your project's POM:

<dependency>
  <groupId>ru.doslano</groupId>
  <artifactId>doslano-sdk</artifactId>
  <version>1.0.0</version>
  <scope>compile</scope>
</dependency>

Gradle users

Add this dependency to your project's build file:

  repositories {
    mavenCentral()     // Needed if the 'doslano-sdk' jar has been published to maven central.
    mavenLocal()       // Needed if the 'doslano-sdk' jar has been published to the local maven repo.
  }

  dependencies {
     implementation "ru.doslano:doslano-sdk:1.0.0"
  }

Others

At first generate the JAR by executing:

mvn clean package

Then manually install the following JARs:

  • target/doslano-sdk-1.0.0.jar
  • target/lib/*.jar

Getting Started

Please follow the installation instruction and execute the following Java code:

// Import classes:
import ru.doslano.sdk.ApiClient;
import ru.doslano.sdk.ApiException;
import ru.doslano.sdk.Configuration;
import ru.doslano.sdk.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.BalanceApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://integration.doslano.ru");
    
    // Configure HTTP bearer authorization: apiKey
    HttpBearerAuth apiKey = (HttpBearerAuth) defaultClient.getAuthentication("apiKey");
    apiKey.setBearerToken("BEARER TOKEN");

    BalanceApi apiInstance = new BalanceApi(defaultClient);
    try {
      Balance result = apiInstance.getBalance();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling BalanceApi#getBalance");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Documentation for API Endpoints

All URIs are relative to https://integration.doslano.ru

Class Method HTTP request Description
BalanceApi getBalance GET /v1/balance Баланс аккаунта
LettersApi createLetter POST /v1/letters Отправить письмо
LettersApi downloadRecipientInventoryPdf GET /v1/letters/{id}/recipients/{recipient_id}/inventory.pdf PDF описи вложения получателя
LettersApi downloadRecipientReceiptPdf GET /v1/letters/{id}/recipients/{recipient_id}/receipt.pdf PDF фискального чека получателя
LettersApi getLetter GET /v1/letters/{id} Статус письма
LettersApi getRecipientTracking GET /v1/letters/{id}/recipients/{recipient_id}/tracking Трек-события получателя
LettersApi listLetters GET /v1/letters Список писем

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

apiKey

  • Type: HTTP Bearer Token authentication (API key)

Recommendation

It's recommended to create an instance of ApiClient per thread in a multithreaded environment to avoid any potential issues.

Author

About

Java SDK для Integration API Дослано — отправка заказных писем Почтой России из вашего кода

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages