Shipment Commands
Source: src/data/shipment/shipment.command.ts
/ship
Mark an order as shipped. Admin-only.
Usage
/ship order:<orderId> carrier:<text> tracking:<text>
Options
| Option | Type | Required | Description |
|---|---|---|---|
order | string | Yes | The order ID to mark as shipped |
carrier | string | Yes | Carrier name (e.g. USPS, UPS, FedEx) |
tracking | string | Yes | Tracking number |
Permissions
Caller must have at least one role from the guild's adminRoleIds list. Returns a permission-denied message otherwise.
Behavior
- Calls
shipmentService.markShipped(ctx, orderId, { carrier, trackingNumber }) - Idempotent: calling the same command twice with identical inputs is a no-op
- Transitions shipment status to
in_transit - Updates order status to
SHIPPED - Emits
shipment.shippedandorder.shippedevents
Example response (success)
Order `ord-abc123` marked as shipped via **USPS**. Tracking: `9400111899223197657496`
Example response (permission denied)
Permission denied: you must have an admin role to use `/ship`.
Dual path
The same service method is called by the AdminJS "Mark Shipped" action on the Order resource. Both paths apply identical validation.