FOR TMS DEVELOPERS
Integrate document handling into your TMS.
This walkthrough shows the server-side SDK contract. It does not send requests or create documents. Use sandbox credentials to run it against the platform.
- Allocate an isolated tenant for your customer.
- Create a document with a stable operation identifier.
- Read the immutable document version. Retry interrupted writes with the same identifier and payload.
import { ECMR } from "@ecmrhub/sdk";
// Runs on your backend. Credentials stay on the server.
const platform = new ECMR({ baseUrl, apiKey, hmacSecret, tenantId });
const customer = await platform.tenants.ensure(customerId, {
idempotencyKey: tenantOperationId,
});
const sdk = platform.forTenant(customer.tenantId);
const document = await sdk.documents.create({
type: { name: "pod", version: "sandbox-0.1" },
reference: "DEMO-001",
data: { recipient: "Demo recipient", deliveryReference: "DEMO-001" },
}, { idempotencyKey: documentOperationId });
const snapshot = await sdk.documents.versions.get(
document.id, document.currentVersionId,
);Platform and SDK repository (access required)
The sandbox supports documents, versions and test device consent evidence. Qualified signatures and eFTI gate integration are unavailable.