Breadcrumbs

EP API - SalesAgreementLines

Overview

The list page that contains the lines on the Sales Agreements endpoint. It can also be called directly to retrieve only the lines.

Endpoint name

salesAgreementLines

Source table in Wisefish

WiFi Sales Agreement Line

Fixed view

  • Document Type = Delivery Agreement

  • Type = Item

Editable

Lines can be modified, but not deleted or inserted.

Primary Key

"Document Type", "Document No.", "Line No."

Below is an Entity Relationship Diagram showing the primary key fields of the sales agreement lines table, and how one of the fields in the primary key, is the primary key of the header table.

wifi_sales_agreement_erd_pk_separate.png


  • WiFiSalesAgreement has No as Code[20].

  • WiFiSalesAgreementLine has composite PK: SalesAgreementNo (Code[20]) and LineNo (Integer).

  • Relationship: One-to-Many (||--o{) from Header to Lines.


Data

Field List

Property

Table Field

Type

Note

itemNo

No.

Text


itemDescription

Description

Text


quantity

Quantity

Decimal


noOfTradeItems

No. of Trade Items

Decimal


unit

Unit of Measure Code

Text


tiUnitOfMeasure

TI Unit of Measure Code

Text


type

Type

Text


status

Status

Text


salesTransWeight

(calculated)

Decimal


salesTransNrOfTradeItems

(calculated)

Decimal


systemId

SystemId

GUID


documentNo

Document No.

Text


lineNo

Line No.

Integer


salesTransBaseUOM

(calculated)

Text


salesTransQtyPerTI

(calculated)

Decimal


qtyPerUnitOfMeasure

(calculated)

Decimal


qtyPerTI

(calculated)

Decimal


allocatedNrOfTis

Allocated No. of TIs (Base)

Decimal


allocatedQuantity

Allocated Quantity (Base)

Decimal


documentType

Document Type

Text


lastModified

SystemModifiedAt

DateTime

Note: The name of this field in business central is “systemmodifedAt” and it can be seen in page inspection in the user interface.

Example

Expand to see the example json

An example of one object in the list:

JSON
    "value": [
        {
            "@odata.etag": "W/\"JzE5OzQxMzk0NzA0MjY4Nzk4MjA0OTExOzAwOyc=\"",
            "systemId": "43ed3317-faed-ef11-aac0-c0b6f9b7cac7",
            "itemNo": "PRODUCT001",
            "itemDescription": "SHRIMP, COOKED and PEALED, IQF, 200-300 pcs/lb, 18-20% glazing. Pack size 4 x 2,5 kg",
            "quantity": 1300,
            "noOfTradeItems": 130,
            "unit": "KG",
            "tiUnitOfMeasure": "KRT",
            "type": "Item",
            "status": "Open",
            "salesTransWeight": 0,
            "salesTransNrOfTradeItems": 0,
            "documentNo": "AGREEMENT10000",
            "lineNo": 10000,
            "salesTransBaseUOM": "",
            "salesTransQtyPerTI": "",
            "qtyPerUnitOfMeasure": 0,
            "qtyPerTI": 0,
            "allocatedNrOfTis": 0,
            "allocatedQuantity": 0,
            "documentType": "Blanket",
            "lastModified": "0001-01-01T00:00:00Z"