Skip to main content

Post Delivery Adapter

Manual shipping delivery without external carrier integration. Use it for physical goods where shipping is handled outside the system.

Included in Base Preset

Registered automatically by registerBasePlugins() and registerAllPlugins().

If you register plugins individually instead of using a preset:

import { pluginRegistry } from '@unchainedshop/core';
import { PostPlugin } from '@unchainedshop/plugins/delivery/post';

pluginRegistry.register(PostPlugin);

Setup​

mutation CreatePostDelivery {
createDeliveryProvider(deliveryProvider: {
type: SHIPPING
adapterKey: "shop.unchained.post"
}) {
_id
}
}

Adapter Details​

PropertyValue
Keyshop.unchained.post
TypeSHIPPING
Sourcedelivery/post

Behavior​

  • isActive() returns true and configurationError() returns null — no configuration required.
  • All other actions use the DeliveryAdapter defaults: isAutoReleaseAllowed() returns true (delivery is released automatically after order confirmation), send() returns false (the delivery status stays unchanged — mark deliveries as delivered manually), and estimatedDeliveryThroughput() returns 0.

Extending for Real Carriers​

For carrier integrations, register a custom shipping adapter with the registerShippingDelivery factory:

import { registerShippingDelivery } from '@unchainedshop/core';

registerShippingDelivery({
adapterId: 'swiss-post',
estimatedDeliveryThroughput: async (warehousingTime) =>
warehousingTime + 2 * 24 * 60 * 60 * 1000,
send: async (configuration, { order, orderDelivery }) => {
await swissPostApi.createShipment({
recipient: orderDelivery.context?.address || order.billingAddress,
});
return true; // marks the delivery as DELIVERED
},
});