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
Building the API client library requires:
- Java 1.8+
- Maven (3.8.3+)/Gradle (7.2+)
To install the API client library to your local Maven repository, simply execute:
mvn clean installTo deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
mvn clean deployRefer to the OSSRH Guide for more information.
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>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"
}At first generate the JAR by executing:
mvn clean packageThen manually install the following JARs:
target/doslano-sdk-1.0.0.jartarget/lib/*.jar
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();
}
}
}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 | Список писем |
- Balance
- CreateLetterRequest
- DryRunResult
- DryRunResultPricing
- FileSource
- Letter
- LetterClass
- LetterContent
- LetterStatus
- ListLetters200Response
- Party
- PartyType
- PaymentResult
- Pricing
- Problem
- PromoResult
- Recipient
- RecipientInput
- RecipientStatus
- SenderInput
- TrackingInfo
- TrackingInfoEventsInner
- WebhookEvent
- WebhookEventData
Authentication schemes defined for the API:
- Type: HTTP Bearer Token authentication (API key)
It's recommended to create an instance of ApiClient per thread in a multithreaded environment to avoid any potential issues.