Warehouse Shipment Error Message API

Overview

The WMS Whse. Shpmt. Error Message API is a Business Central API page that provides quantity details for warehouse shipments that could not be posted. This API allows external systems to find out how much of the item is available and how much is missing.

API Details

  • Publisher: smart
  • API Group: wms
  • API Version: v2.0
  • Entity Name: shpmtError
  • Entity Set Name: shpmtErrors
  • Source Table: SMA Whse. Shpmt. Error Message

Fields

The following fields are exposed in the API:

Field Name Source Field Description
qtyAvailablePerLotLoc SMA Whse. Shpmt. Error Message."Qty. Available Per Lot/Loc." Quantity of the item in the lot of the shipment line at the location.
deficitQuantity SMA Whse. Shpmt. Error Message."Deficit Quantity" Missing quantity: the quantity to ship (base) minus qtyAvailablePerLotLoc.
qtyAvailablePerLocation SMA Whse. Shpmt. Error Message."Qty. Available Per Location" Quantity of the item at the location.
totalQuantityAvailable SMA Whse. Shpmt. Error Message."Total Quantity Available" Total quantity of the item.

Notes

  • The API is read-only.
  • Records are created when a warehouse shipment for a sales order, transfer order, or purchase return order cannot be posted. Quantities are calculated from item ledger entries for the item of the shipment line that caused the error.
  • The fields do not identify the source document. Use the API as the shpmtErrors sub-entity of the Posting API or the Posting Errors API, where the records are linked to the posting result.

Example Usage

Retrieve Shipment Errors for a Posting Result

GET host/instance/api/smart/wms/v2.0/companies(companyId)/orderPosting(1001)?$expand=shpmtErrors

Example Response

{
    "id": 1001,
    "sourceDocument": "Sales Order",
    "sourceNo": "SO001",
    "postingType": "Normal",
    "messageType": "Error",
    "description": "<error text>",
    "shpmtErrors": [
        {
            "qtyAvailablePerLotLoc": 5,
            "deficitQuantity": 3,
            "qtyAvailablePerLocation": 12,
            "totalQuantityAvailable": 40
        }
    ]
}