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
| Property | Value |
|---|---|
| Key | shop.unchained.post |
| Type | SHIPPING |
| Source | delivery/post |
Behavior
isActive()returnstrueandconfigurationError()returnsnull— no configuration required.- All other actions use the
DeliveryAdapterdefaults:isAutoReleaseAllowed()returnstrue(delivery is released automatically after order confirmation),send()returnsfalse(the delivery status stays unchanged — mark deliveries as delivered manually), andestimatedDeliveryThroughput()returns0.
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
},
});
Related
- Stores Delivery - Pickup delivery
- Delivery Pricing - Pricing configuration
- Custom Delivery Plugins - Write your own