Lots
A Lot is an entity to track progress of specific process such as production going on in the company.
A lot GET request URL looks like this: https://api.businesscentral.dynamics.com/v2.0/{TenantId}/{Environment}/api/wisefish/wiFiEP/v1.0/companies({CompanyId})/lots
This endpoint only supports GET so no updates or inserts are allowed.
The payload response
{
"@odata.context": "https://api.businesscentral.dynamics.com/v2.0/b9559d9b-8fc8-4233-b617-00a14ef0a761/SalesAndConsulting/api/wisefish/wiFiEP/v1.0/$metadata#companies(1f98360c-1b96-ef11-8a6d-0022489ea62d)/lots",
"value": [
{
"@odata.etag": "W/\"JzIwOzE4NDMyNDc2ODMwOTI1NzQ4NjI2MTswMDsn\"",
"systemId": "0a936057-6422-ef11-9f88-000d3ada2f07",
"code": "2406000001",
"description": "",
"startingDateTime": "2024-06-04T00:00:00Z",
"endingDateTime": "2024-06-04T00:00:00Z",
"stockCenterCode": "EP2",
"processingStage": "PURCHASE",
"group": "",
"activeInProduction": false,
"bestBeforeCalcFrom": "0001-01-01",
"postingStatus": "Completed (Closed)",
"navInvProductionPosting": " ",
"productionType": " ",
"fishingTripNo": "",
"productionDate": "0001-01-01",
"creationDate": "2024-06-04",
"vesselCode": "",
"vesselName": "",
"vesselGLN": "",
"rawMaterial": "",
"type": "Origin",
"originType": "Wild",
"fishingAreaCode": "",
"fishingAreaName": "",
"inboundDocTypeCreation": "Receipt Agreement",
"externalProducer": "",
"lastModified": "2024-06-04T11:22:29.007Z"
},
{
"@odata.etag": "W/\"JzIwOzE2MDE5MTQxODUyMTcyODExNTY3MTswMDsn\"",
"systemId": "38473e45-996b-ef11-a673-000d3ab27e71",
"code": "2409000001",
"description": "Aries 05.09.24",
"startingDateTime": "2024-09-05T00:00:00Z",
... ...
Various methods can be used to filter what lots to get in the request, here are some example:
If the external production system would like to keep track of only lots changed after the last time it fetched lots then it can do a request like this:
/lots?$filter=lastModified gt 2024-10-14T16:36:14.263Z
A combination of parameters can be used, in this example you get lots that have been modified and are of the type Production
/lots?$filter=lastModified gt 2024-10-14T16:36:14.263Z and type eq 'Production'
Fields returned
Field Name | Description |
---|---|
| A unique identifier for the record, used in BC mostly for updates |
| A unique lot code, this is usually a code understood by the workers in the system |
| A description of the lot |
| Starting date and time (if filled in) |
| Ending date and time (if filled in) |
| A stock center is an entity within the company that keeps track of things, if you have one company but two physical production locations you might have two (or more) stock centers |
| A processing stage is an entity within the stock center where specific process is handled, you might for example have a processing stage for receiving raw material (Receiving), one for work in progress (WIP) production and one for producing finished goods (Production). |
| Lot group, it is possible to group lots together and give it an identifier |
| true or false |
| This is a date value, if the year is not the year 0001 then the produced items from this lot should have their best before date calculated from this date |
| This is an option field and it has the following possible values “Open” - The lot is open and available for use “Completed (Closed)” - The lot has been fully processed and should not be used unless reopened in Wisefish “Precreated” - Used for Wisefish Stream |
| This is an option field indicating the posting method for the lot, and it has the following possible values ““ - Empty, not specified “Lot“ - Traditional lot posting “Stage within Lot” - The lot is to be re-used for different processing stages throughout the production process “Close without Production” - Lot closed (invalidated) |
| This is an option field indicating the production type for the lot, and it has the following possible values ““ - Empty, not specified “Production” - Production directly on the stock center “Contracting” - Production for third party “Repacking” - Producing different item from a previously created material (original material consumed into the lot) “Relabeling” - Producing same items again but with different labels printed (original material consumed into the lot) |
| If the lot is bound to a specific fishing trip |
| Date - Set if production should occur or be marked on a specific date |
| Date - The date the lot was created |
| String - The code for a vessel bound to the lot |
| String - The name of the vessel bound to the lot |
| String - Global location number of the vessel |
| String - The code of a raw material bound to this lot |
| This is an option field indicating the type for the lot, and it has the following possible values “Origin” - Lot is used for raw materials directly from fishing trip “Production” - Lot is used only for production of WIP or Product “Both” - Lot is used for both |
| This is an option field indicating the origin type for the raw material used in the lot, and it has the following possible values “Wild” - Wild caught fish “Farm Raised” - Farm raised |
| The FAI code for the fishing area |
| The FAI description of the fishing area |
| This is an option field indicating external document type that caused this lot to be created, and it has the following possible values ““ - Empty, not specified “Fishing Trip Raw Mat.“ - The lot was automatically created when receiving raw material from a vessel “Fishing Trip Product“ - “Purchase Document” - The lot was created when raw material was purchased (Purchase Agreement) “Sales Document” - The lot was created when products were sold (Sales Agreement) “Receipt Agreement” - The lot was created when products were received from a DA (Delivery Agreement) “Storage Receipt Agreement” - |
| If the stock center for the lot is an external producer then this string returns information on the external producer. |
| Date and Time - This indicates when the record was last created/modified within the system |