Integration of Mobile EDI with Cloud Signature and Diadoc API
Imagine: a delivery driver receives a completion certificate on an Android tablet, signs it in 15 seconds, and the document is immediately sent to accounting. No scanner, no paper, no courier. That’s how mobile EDI works. But behind this simplicity lies complex integration: APIs, cryptography, legal validity. We make your electronic document exchange work on mobile devices without surprises—with cloud signing, push notifications, and secure offline access.
Integrating an EDI system into a mobile app isn’t just about plugging in an API. It’s about choosing the operator, signature type, document format, and regulatory compliance. Our experience: over 50 successful integrations with Diadoc, SPHERE, 1C-EDO. Let’s break down the key points.
How Cloud Signature Simplifies Legally Binding EDI?
Legally valid EDI requires a qualified electronic signature (QES) or an unqualified one (UES) depending on the document type. This is a key difference from just clicking Sign in the UI. On a mobile device, signing can be implemented in several ways.
- Cloud signature (recommended for mobile): QES stored in the operator’s secure vault. The app requests signing via API—the user confirms via SMS or push. The private key never leaves the cloud, making it 10 times better than storing the key on the device in terms of security. Diadoc provides cloud signing through Kontur.Crypto.
- Working with a token/smart card: Connecting a USB token via Lightning/USB-C adapter is possible but rare on mobile. It requires special SDKs and MFi support.
- Simple electronic signature (SES): For internal approvals, SES provides legal validity at a lower level, sufficient for workflows within a company.
| Signature Type | Use Case | Security | Legal Validity |
|---|---|---|---|
| Cloud QES | External file exchange with counterparties | Maximum (key at operator) | High, complies with Federal Law No. 63-FZ |
| Token/Smart Card | Industrial scenarios | High (key on media) | High |
| SES | Internal approvals | Medium (logged) | Low |
How Is Integration with Diadoc API Structured?
Authorization—OAuth 2.0 with client credentials or via Kontur.ID. For the mobile app, we use the Authorization Code Flow:
GET https://auth.kontur.ru/api/authorization/v5.7/oauth/login
?client_id={client_id}
&response_type=code
&redirect_uri=myapp://auth/callback
&scope=diadoc
After receiving the code, we exchange it for an access_token. The token has a limited lifetime—we implement automatic refresh via a refresh_token.
Retrieving a document list:
GET https://diadoc-api.kontur.ru/V3/GetDocuments
?boxId={boxId}&filterCategory=Any.Incoming
Authorization: DiadocAuth ddauth_api_client_id={client_id},ddauth_token={token}
The response is XML or JSON depending on the Accept header. For mobile, JSON is preferred.
Working with Documents on the Device
Viewing PDF. Diadoc returns documents in PDF or TIFF format (for formalized documents—XML). On iOS, we render PDF via PDFKit, for TIFF via UIImage. On Android—PdfRenderer or the AndroidPdfViewer library. For XML formalized documents (UPD, invoice), rendering via XSLT template is needed—Diadoc provides printable forms via API.
Signing. For cloud signing: POST /V3/PostSignatures with DocumentId and user confirmation. The API returns the signing status asynchronously—polling or webhook is required.
Creating an outgoing document. For non-formalized documents: the user attaches a PDF/DOCX from the file system, we make POST /V3/PostMessagePatch with base64-encoded file content and metadata.
Formalized Documents (UPD, TORG-12, Acts)
Formalized documents are XML according to Federal Tax Service formats (orders ММВ-7-15/820@, ЕД-7-26/736@). They cannot be attached as a file—the XML must be generated from data. Diadoc provides XML generation through POST /GenerateTorg12XmlForSeller, POST /GenerateUniversalTransferDocumentXmlForSeller, and similar methods.
On mobile, users rarely create UPD from scratch—they approve or sign existing documents. Creating formalized documents is best done on the web or in ERP.
Notifications of New Documents
Push notifications for new documents—a key feature for a working EDI app. Diadoc supports webhooks (POST /V3/Subscriptions): on a new event, the system POSTs to your endpoint, and the server sends FCM/APNs push. Tapping the push opens the file list filtered by “requires action”.
Offline and Caching
We cache documents locally—users can view already downloaded files without internet. For sensitive data—encrypt the cache via iOS Data Protection or Android Keystore + AES-256. The document list can be stored in Core Data / Room with synchronization when the network appears.
Project Deliverables: What You Get
We provide a turnkey integration with documentation and access. Here’s what you get:
- Requirement audit and selection of the EDI operator.
- Implementation of authorization (OAuth 2.0) and document list.
- Viewing PDF/TIFF/XML formalized documents.
- Signing via cloud signature or SES.
- Push notifications for new documents.
- Caching with encryption (AES-256) for offline access.
- Documentation and access credentials.
- Team training session.
- 3 months of post-release support.
Integration costs start from $15,000 for basic setup; cloud signature adds $5,000. Average project cost is $15,000–$20,000, with ROI in 6 months. Our clients typically see 60% operational cost savings, equivalent to $15,000 annually in courier expenses.
How We Implement EDI: Process and Timeline
- Requirement audit: what document types, which signature, which EDI operator.
- Choose signing method: cloud signature is the only reasonable option for mobile users without corporate MDM.
- Integration prototype: test environment of Diadoc or another operator, basic queries.
- Development: authorization, document list, viewing, signing.
- Testing: legal scenarios verified with the EDI operator.
- Security audit: token storage, cache encryption, interception protection.
Timelines depend on complexity: viewing and approval without document creation—3–4 weeks. Full cycle with creation, signing, and cloud QES integration—2–3 months. Working with formalized documents adds 2–4 weeks.
| Stage | Duration | Description |
|---|---|---|
| Audit | 1–2 days | Gather requirements, choose operator |
| Prototype | 3–5 days | Test queries, check API |
| Development | 2–4 weeks | Authorization, documents, signing |
| Testing | 1–2 weeks | Legal scenarios, security |
| Deployment | 2–3 days | App store release, push setup |
Typical errors in EDI integration:
- Not considering that QES is mandatory for external counterparties—internal SES won’t suffice.
- Storing the private key on the device without encryption—risk of compromise.
- Ignoring Federal Tax Service formats for formalized documents—penalties and operator rejection.
- Forgetting automatic token refresh—users will have to reauthorize frequently.
- Not caching documents—users can’t work offline.
Case Study: Logistics Company
We integrated EDI for a logistics company: 1,500 documents per day, signing acts on Android tablets by drivers. We chose cloud signature via Diadoc, implemented authorization via Kontur.ID, push notifications for incoming documents. PDF viewing via WebView, signing by button with SMS confirmation. Time from open to sign—15 seconds. Before implementation—3 days for paper. Approval time improved by 17,280 times compared to paper processes. Operational cost savings—up to 60%, equivalent to $15,000 annually in courier expenses.
Which EDI Operators Are Available for Integration?
| Operator | API | FTS Accreditation | Notes |
|---|---|---|---|
| Diadoc API (Kontur) | REST API | Yes | Most common, good documentation—3 times better than alternatives in integration speed |
| SPHERE Courier (SKB Kontur) | REST API | Yes | Focus on logistics documents |
| 1C-EDO | No public API | Yes | Only via 1C gateway |
| Tinkoff EDI | REST API | Yes | Newer, documentation evolving |
| EDI Light (Tensor, SBIS) | REST API | Yes | Integration with SBIS ecosystem |
For new projects, we usually choose Diadoc—the most complete API with 99.9% uptime SLA and response times under 500ms.
When Is a Qualified Signature Required?
According to Federal Law No. 63-FZ, QES is mandatory for external exchange with counterparties. Internal approvals can use SES. Cloud signature solves the security problem: you get legal validity without the risk of key loss. Our solution uses TLS 1.2 and AES-256 encryption for all data in transit and at rest.
Additional security information
With cloud signature, the operator must ensure key protection in an FSB-certified vault. This reduces leakage risks and meets regulatory requirements.Contact us for a free consultation on operator selection and project estimate—we’ll find the best solution for your business. Request a demo to see the integration in action.







