Перейти к основному содержимому

Sales Line API

Overview

The WMS Sales Line API is a Business Central API page designed to manage sales line data. This API allows external systems to interact with sales line records, providing functionality for creating, reading, and updating sales line information.

API Details

  • Publisher: smart
  • API Group: wms
  • API Version: v2.0
  • Entity Name: salesLine
  • Entity Set Name: salesLines
  • Source Table: Sales Line
  • ODataKeyFields: Document Type, Document No., Line No.

Fields

The following fields are exposed in the API:

Field NameSource FieldRequiredDescription
DocumentTypeSales Line."Document Type"YesType of the sales document.
DocumentNoSales Line."Document No."YesNumber of the sales document.
LineNoSales Line."Line No."NoLine number of the sales line.
TypeSales Line.TypeNoType of the sales line (e.g., Item).
NoSales Line."No."YesItem or resource number.
VariantCodeSales Line."Variant Code"NoVariant code for the item.
LocationCodeSales Line."Location Code"NoLocation code for the sales line.
QuantitySales Line.QuantityNoQuantity of the item.
QtytoShipSales Line."Qty. to Ship"NoQuantity to be shipped.
QtyToInvoiceSales Line."Qty. to Invoice"NoQuantity to be invoiced.
UnitPriceSales Line."Unit Price"NoUnit price of the item.
LotNoLotNoNoLot number for the item.

Notes

  • The LineNo field is automatically generated and incremented by 10,000 for each new sales line.

Example Usage

Create a New Sales Line

POST host/instance/api/smart/wms/v2.0/companies(companyId)/salesLines
Content-Type: application/json

{
"DocumentType": "Order",
"DocumentNo": "SO001",
"No": "ITEM001",
"Quantity": 10,
"LocationCode": "MAIN",
"LotNo": "LOT123"
}

Retrieve a Sales Lines

GET host/instance/api/smart/wms/v2.0/companies(companyId)/salesLines?$filter=DocumentType eq 'Order' & DocumentNo eq 'SO001'

Update a Sales Line

PATCH host/instance/api/smart/wms/v2.0/companies(companyId)/salesLines('Order','SO001',10000)
Content-Type: application/json

{
"Quantity": 15
}
© 2008 - 2026 SMART business