Breadcrumbs

API - Production Lots

Overview

This API is for the lot table but with a fixed filter on Production Lots. New production lots can be created and there are procedures to create journal lines for both the produced items and the consumption.

Instead of the procedures below, endpoint productionOutputItems can be used to send in the produced items.

Endpoint name

productionLots

Source table

WiFi Lot

Fixed view

A lot list, but showing only production lots, which is done by filtering on Production Type not blank.

Requests allowed

GET, POST, PATCH, DELETE

Primary Key

code

Record ID

code

Procedures

Additionally POST requests can be done on a procedure endpoints.

  • produceItem

  • consumeItem

Data

Field List

Property

Type

Max Len

Description


systemId

string uuid

GUID

The system id of the record.


code

string

20


primary key Record ID

description

string

100



lotGroup

string

20



postingStatus

string




stockCenterCode

string

20



itemCategoryCode

string

20



activeInProduction

true/false


Needs to be true in order to post on the lot. When creating this will be set as true by default.


productionType

string


For a normal production lot this is Production, which is the default value when creating.


startingDate

date




startingTime

time




startingDateTime

datetime




endingDate

date




endingTime

time




endingDateTime

datetime




processingStage

string




allowedRawMaterial

string




certificationProcess

string




certification

string


(CertificationInfo – unknown type)


certifications

array


Array of object lotCertification


lastModified

datetime




Example Object

Expand to see the example json

An example of one object :

JSON
{
    "@odata.context": "https://api.businesscentral.dynamics.com/v2.0/b33a6a3b-244c-4295-84b3-0ad90823c736/AB_Test_191125/api/wisefish/base/v1.0/$metadata#companies(1691e98a-6a95-f011-b41a-6045bde126e9)/productionLots/$entity",
    "@odata.etag": "W/\"JzE5OzEzMDAzMDE4NTM4MDAyOTk5OTQxOzAwOyc=\"",
    "code": "LOT251203-1",
    "systemId": "06df22ff-2dd0-f011-8542-000d3a679afe",
    "description": "Production 3nd Dec - Lot 1",
    "lotGroup": "BOILING",
    "postingStatus": "Open",
    "stockCenterId": "948f6c3f-678d-f011-b419-7ced8d2d2339",
    "stockCenterCode": "AA",
    "itemCategoryCode": "",
    "activeInProduction": true,
    "productionType": " ",
    "startingDate": "2025-12-03",
    "startingTime": "00:00:00",
    "startingDateTime": "2025-12-03T00:00:00Z",
    "endingDate": "2025-12-03",
    "endingTime": "00:00:00",
    "endingDateTime": "2025-12-03T23:59:59.997Z",
    "processingStage": "",
    "allowedRawMaterial": "",
    "certificationProcess": "No",
    "certification": "",
    "lastModified": "2025-12-03T09:54:03.287Z"
}



Procedures

Produce Item

This is an endpoint to easily add a line to the Trade Item Output Journal.

Usage

JSON
POST .../productionLot([lotNumber])/Microsoft.NAV.produceItem

Body:
{
    "itemNumber": "[Item.No.]",
    "quantity": [Quantity],
    "unitOfMeasure": [Unit of measure],
    "location": "[Location Code]"
}

Parameters

itemNumber

The item number.

quantity

How many items to produce.

unitOfMeasure

This unit must exist as a unit for this item.

location

The location to post the stock on.

After a successful request a line has been created in Trade Item Output Journal.

→ Next step - or any time it suits the user - this journal needs to be posted.


Consume Item

This is an endpoint to easily add a line to the Trade Item Consumption Journal.

Usage

JSON
POST .../productionLot([lotNumber])/Microsoft.NAV.consumeItem

Body:
{
    "itemNumber": "[Item.No.]",
    "quantity": [Quantity],
    "unitOfMeasure": [Unit of measure],
    "location": "[Location Code]"
}

Parameters

itemNumber

The item number to be consumed.

quantity

How many items to consume.

unitOfMeasure

This unit must exist as a unit for this item.

location

The location where the item to consume is.

If the item is a Trade Item, it searches for an open trade item with exactly this quantity and unit.

If found, a line is created in Trade Item Consumption Journal.

→ Next step - or any time it suits the user - this journal needs to be posted.


Example

JSON
POST .../productionLot('PROD-LOT-007')/Microsoft.NAV.produceItem

Body:
{
    "itemNumber": "80216-T",
    "quantity": 3,
    "unitOfMeasure": "KASSI",
    "location": "FACTORY"
}