Get Shipment details by shipment id Magento 2.

You can get the Shipment collection data for the specific shipment by shipment id in Magento 2.

Using Magento\Sales\Api\ShipmentRepositoryInterface interface, you need to use get() method to fetch shipment data by its id.

Pass shipment id as get method, get($shipmentId) arguments.

When you check the sales_shipment table, You can get the result of all the field value with a specific id.

To get shipment records, you must have shipment id and you can get the result using below code snippet.

Using above code snippet you can get the shipment data.

Output: