Skip to content



This function is used to create a shipment out of a list of line items in an order. Marking an order as shipped is a two-step process. First, you create a shipment with the items contained in the shipment, then you mark the shipment as shipped using OrderShipmentList_Update.

Request Body Parameters#

Type Description
order_id Number Order Id containing line items
line_ids Array Array of Line Ids contained in the shipment.

Response Parameters#

Type Description
success boolean Boolean value indicating if the request was successful
id Number Shipment id of the created shipment
code String Shipment code generated by Miva
order_id Number Order Id for items in shipment
status Number Shipment Status. 100 = Picking, 200 = Shipped
labelcount Number Number of Labels generated for this shipment
ship_date Timestamp Unix timestamp of date shipped. 0 if not yet shipped
tracknum String Tracking Number
tracktype String Tracking Type. Default Types include “CanadaPost”, “Endicia”, “FedEx”, “UPS”, “USPS”
tracklink String Full Tracking link to shipping carrier.
weight Number Total Shipment Weight
cost Number Tracking Cost
formatted_cost String Formatted Cost
shipment_id Number Same value as id. included for backwards compatibility

Example Request#

    "Store_code": "beta",
    "Function": "OrderItemList_CreateShipment",
    "Order_Id": 200103,
    "line_ids": [178, 181]

Example Response#

    "success": 1,
    "data": {
        "id": 114,
        "code": "200103-20180912-00114",
        "batch_id": 0,
        "order_id": 200103,
        "status": 100,
        "labelcount": 0,
        "ship_date": 0,
        "tracknum": "",
        "tracktype": "",
        "tracklink": "",
        "weight": 0.0,
        "cost": 0.0,
        "formatted_cost": "$0.00",
        "shipment_id": 114

Error Responses#

Error Code Error Message Error Description
MER-JSN-ORD-00025 Order not found. Order id sent in the request does not exist.
MER-JSN-ORD-0005 Order items must exist in order to create a shipment Line_ids sent in the request do not exist in the order.