Application Load

IOrderShipment

The physical TypeScript declaration from the Nuxt starter, with linked types and field comments.

IOrderShipment

One shipment with its delivery destination and purchased lines.

interfaces/orionplace/orders/IOrderHistory.ts
TypeScript
export interface IOrderShipment {
  // Shipment ID.
  id: number;
  // Owning order ID.
  order_id: number;
  // Delivery price is still provisional.
  delivery_price_is_estimate: boolean;
  // Selected delivery method and carrier details, or `null`.
  delivery_method: IOrderDeliveryMethod | null;
  // Carrier pickup-point fields or saved order address; an empty object on
  // delivery-data failure. Country and region in the address branch are arrays.
  delivery_data:
    | IOrderShipmentAddress
    | {
      // Value of delivery_to_code.
      delivery_to_code: string;
      // Value of delivery_to_city_code.
      delivery_to_city_code: string;
      // Value of delivery_to_code_full_address.
      delivery_to_code_full_address: string;
    }
    | Record<string, never>;
  // Estimated arrival interval.
  estimate: {
    // Value of delivery_date_from.
    delivery_date_from: IApiDateTime | null;
    // Value of delivery_date_to.
    delivery_date_to: IApiDateTime | null;
  };
  // Return/refund counts for this shipment.
  refund_stats: IOrderRefundStats;
  // Actual sending and delivery dates.
  dates: {
    // Value of sent.
    sent: IApiDateTime | null;
    // Value of delivery_date_real.
    delivery_date_real: IApiDateTime | null;
    // Date the carrier brought the package back undelivered; its units are
    // returned and refunded. Null otherwise.
    returned_by_carrier?: IApiDateTime | null;
  };
  // Package weight and volume values from the backend unit dictionaries.
  measures: {
    // Value of package_weight.
    package_weight: IUnitValues;
    // Value of package_volume.
    package_volume: IUnitValues;
  };
  // Source store, including digital-store flag; null when unavailable.
  store:
    (Omit<IPhysicalStore, 'virtual_goods'> & {
      // Value of virtual_goods.
      virtual_goods: boolean;
    }) | null;
  // Shipment product, option, delivery and refund totals by currency.
  prices: IOrderShipmentPrices;
  // Tracking identifiers, carrier status text and its last update; null without
  // tracking.
  track: {
    // Shipment ID.
    id: number;
    // Tracking identifiers, carrier status text and its last update; null
    // without tracking.
    track: string;
    // Value of internal_track.
    internal_track: string;
    // Value of status.
    status: string;
    // Value of date_status_updated.
    date_status_updated: IApiDateTime | null;
  } | null;
  // Purchased shipment lines, or null.
  shipment_items: IOrderShipmentItem[] | null;
}