Breadcrumbs

API - Purchase Agreement Lines


Overview

The list page that contains the Receipt Agreement Lines in Wisefish.

Endpoint name

purchaseAgreementLines

Source table

"WiFi Purchase Agreement Line"

Fixed view

Only shows unposted purchases, i.e. where invoice has not been posted.

Requests allowed

GET, POST, PATCH, DELETE

Primary key

documentType, documentNo, lineNo

Record ID

systemId

Procedures

none

Data

Field List

Property

Type

Format

Description


1

systemId

string

uuid

The unique id of the record.

RECORD ID

2

documentType

string


Same document type as for the header, i.e. Receipt or Blanket. If not given when adding a new line, the default is Receipt

Primary key

3

documentNo

string

max 20

The number of agreement

Primary key

4

lineNo

integer


Line number is usually set automatically.

Primary key

5

type

string


This is usally Item, but it is possible to create lines with blank if they are only text lines.

optional

6

itemNo

string

max 20

The item number.

Mandatory

7

description

string

max 100

Description of the item, or the text, if it is a text line.


8

noOfTradeItems

number


The number of trade items. This one is marked as mandatory because that is the recommended usage. Possib

optional

9

tradeItemUnitOfMeasure

string

max 10

The unit that belongs to noOfTradeItems

optional

10

quantity

number


Quantity, will in calculated automatically if noOfTradeItems is validated, but can also be validated, to the the trade items to be calculated automatically.

optional

11

unitOfMeasure

string

max 10

This is the unit of measure that belongs to the quantity field.

optional

12

quantityBase

number


Quantity in the base unit of the item.

NON-EDITABLE

13

baseUnitOfMeasure

string

max 10

The base unit of the item.

NON-EDITABLE

14

directUnitCost

number


Direct unit cost.

optional

15

unitCost

number


Unit cost.

optional

16

lineAmount

number


Line Amount, is the amount before discount is subtracted.

NON-EDITABLE

17

lineDiscount

number


This is the discount percentage (%).

optional

18

lineDiscountAmount

number


Line Discount is the total discount amount.

NON-EDITABLE

19

amount

number


The amount when discount has been subtracted.

NON-EDITABLE

20

vat

number


The VAT amount.

NON-EDITABLE

21

amountIncludingVAT

number


Amount + VAT amount.

NON-EDITABLE

22

productionDate

string


The purchase will not post if it does not have a production date.

Mandatory

23

originalProducer

string

max 20

Original producer.

optional

24

netWeight

number


Net Weight of these trade items in base weight unit.

NON-EDITABLE

25

grossWeight

number


Gross Weight of these trade items in base weight unit.

NON-EDITABLE

26

landingDate

string

date

Landing date

optional

27

portOfLanding

string

max 20

The code of the landing harbour

optional

28

lastModified

string

date-time

Time stamp of last modification.

NON-EDITABLE

Example Object

In the following example the system is in KG, but this item is sold in LBS. Therefore:

  • User has typed in the number of trade items: 100 LB which can be seen in fields noOfTradeItems and tradeItemUnitOfMeasure

  • Fields quantity and unitOfMeasure show that this is roughly 45 KG. When this line is posted, this will go into the Item Ledger as “quantity”.

  • Fields quantityBase and baseUnitOfMeasure show that this will be posted in the Item Ledger Entry as “base quantity” 100 LB.

  • Fields netWeight and grossWeight will show how much weight this is in the general weight unit of the system which is in this case KG.

JSON
{
    "systemId": "b2fece31-c408-f111-b02e-e6f9cc72e785",
    "documentType": "Receipt",
    "documentNo": "PR-048",
    "lineNo": 10000,
    "type": "Item",
    "itemNo": "70080",
    "description": "Some item in LBS",
    "noOfTradeItems": 100,
    "tradeItemUnitOfMeasure": "LB",
    "quantity": 45.35924,
    "unitOfMeasure": "KG",
    "quantityBase": 100.00000,
    "baseUnitOfMeasure": "LB",
    "directUnitCost": 0,
    "unitCost": 0,
    "lineAmount": 0,
    "lineDiscount": 0,
    "lineDiscountAmount": 0,
    "amount": 0,
    "vat": 25,
    "amountIncludingVAT": 0,
    "productionDate": "0001-01-01",
    "originalProducer": "",
    "netWeight": 45.359,
    "grossWeight": 45.813,
    "lastModified": "2026-02-13T10:18:43.637Z"
}