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 |
|
|
Source table |
|
|
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 |
|
|
Record ID |
|
|
Procedures |
Additionally POST requests can be done on a procedure endpoints.
|
Data
Field List
|
Property |
Type |
Max Len |
Description |
|
|
|
string uuid |
GUID |
The system id of the record. |
|
|
|
string |
20 |
|
primary key Record ID |
|
|
string |
100 |
|
|
|
|
string |
20 |
|
|
|
|
string |
|
|
|
|
|
string |
20 |
|
|
|
|
string |
20 |
|
|
|
|
true/false |
|
Needs to be true in order to post on the lot. When creating this will be set as true by default. |
|
|
|
string |
|
For a normal production lot this is Production, which is the default value when creating. |
|
|
|
date |
|
|
|
|
|
time |
|
|
|
|
|
datetime |
|
|
|
|
|
date |
|
|
|
|
|
time |
|
|
|
|
|
datetime |
|
|
|
|
|
string |
|
|
|
|
|
string |
|
|
|
|
|
string |
|
|
|
|
|
string |
|
(CertificationInfo – unknown type) |
|
|
|
array |
|
Array of object |
|
|
|
datetime |
|
|
|
Example Object
Procedures
Produce Item
This is an endpoint to easily add a line to the Trade Item Output Journal.
Usage
POST .../productionLot([lotNumber])/Microsoft.NAV.produceItem
Body:
{
"itemNumber": "[Item.No.]",
"quantity": [Quantity],
"unitOfMeasure": [Unit of measure],
"location": "[Location Code]"
}
Parameters
|
|
The item number. |
|
|
How many items to produce. |
|
|
This unit must exist as a unit for this item. |
|
|
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
POST .../productionLot([lotNumber])/Microsoft.NAV.consumeItem
Body:
{
"itemNumber": "[Item.No.]",
"quantity": [Quantity],
"unitOfMeasure": [Unit of measure],
"location": "[Location Code]"
}
Parameters
|
|
The item number to be consumed. |
|
|
How many items to consume. |
|
|
This unit must exist as a unit for this item. |
|
|
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
POST .../productionLot('PROD-LOT-007')/Microsoft.NAV.produceItem
Body:
{
"itemNumber": "80216-T",
"quantity": 3,
"unitOfMeasure": "KASSI",
"location": "FACTORY"
}