MageSmith
POSTSales · Magento 2.4.9 Admin · Magento_Sales::ship

POST /V1/order/:orderId/ship

POST /V1/order/:orderId/ship is a Magento 2 REST endpoint in the Sales module. Creates new Shipment for given Order. Requires an admin Bearer token with ACL Magento_Sales::ship.

Last verified: against Magento 2.4.9.

Returns

int

Id of created Shipment.

Service contract

Magento\Sales\Api\ShipOrderInterface::execute

Authorization

Admin Bearer token with ACL:

  • Magento_Sales::ship

Path parameters

orderId int Required

Body parameters

items Magento\Sales\Api\Data\ShipmentItemCreationInterface[] default: []
notify bool default: false
appendComment bool default: false
comment Magento\Sales\Api\Data\ShipmentCommentCreationInterface default: null
tracks Magento\Sales\Api\Data\ShipmentTrackCreationInterface[] default: []
packages Magento\Sales\Api\Data\ShipmentPackageCreationInterface[] default: []
arguments Magento\Sales\Api\Data\ShipmentCreationArgumentsInterface default: null

Example request

Auto-generated from the service contract — paste-ready against your store's /rest/default base. Replace the host, store code, ACL token, and any required values before running.

Headers

Accept
application/json
Content-Type
application/json
Authorization
Bearer <ACCESS_TOKEN> admin token with ACL: Magento_Sales::ship

Path

/V1/order/{orderId}/ship

Body

{
  "appendComment": false,
  "arguments": {
    "extension_attributes": {}
  },
  "comment": {
    "comment": "",
    "extension_attributes": {},
    "is_visible_on_front": 0
  },
  "items": [
    {
      "extension_attributes": {},
      "order_item_id": 0,
      "qty": 0
    }
  ],
  "notify": false,
  "packages": [
    {
      "extension_attributes": {}
    }
  ],
  "tracks": [
    {
      "carrier_code": "",
      "extension_attributes": {},
      "title": "",
      "track_number": ""
    }
  ]
}

Every Magento dev tool, in one hosted workspace.

Free to sign up. Nothing to install. Drafts, audits, and projects saved across every tool.