Courier reported failed delivery (RTO) — restore inventory + cancel.
Cancels a COD order, sets payment_status='failed', and writes
InventoryAdjustment rows with reason='returned' so on-hand
inventory bumps back up. Idempotent on already-cancelled orders.
Refuses on non-COD orders (400) and orders that have already been
paid (400).
Documentation Index
Fetch the complete documentation index at: https://docs.stella-commerce.com/llms.txt
Use this file to discover all available pages before exploring further.
Successful Response
Schema for an order in responses.
Most Optional fields are sourced from the ORM where SQLAlchemy
auto-resolves null columns to None, so the missing-default footgun
wouldn't actually fire today. Defaults are still set explicitly
here for symmetry with LineItemResponse and to guard against
future callers that might validate from dicts.
^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$Schema for address. Fields are optional to support simpler address formats from AI widget.
Schema for address. Fields are optional to support simpler address formats from AI widget.