Log in
Model

TrackCreation

Magento\Sales\Model\Order\Shipment\TrackCreation

What it does

This class is a data transfer object (DTO) used to create tracking information for shipments in Magento 2.

Developers use this class when programmatically adding tracking numbers to shipments via the API, setting the carrier code, tracking number, and title for the shipment tracking.

It implements the ShipmentTrackCreationInterface to ensure consistent data structure across the sales module.

Public Methods

  • getTrackNumber()
  • setTrackNumber()
  • getTitle()
  • setTitle()
  • getCarrierCode()
  • setCarrierCode()
  • getExtensionAttributes()
  • setExtensionAttributes()