Using API

The Advanced Manufacturing Statistics app provides a complete API set to get the Manufacturing Orders via API. This one could be used to interact with powerplatform.

Manufacturing Order resource type

APIGroup: advancedManufacturingStatistics

EntityName: manufacturingOrder

EntitySetName: manufacturingOrders

Methods

Method Return Type Description
GET Production Order Gets an array of Production Order objects with the respective Prod. Order Lines

Properties

Property Type Description
id Guid The Unique ID of the Production Order.
productionOrderNumber string Specifies the source Production Order No.
status string Specifies the status of the source production order
dueDate date Specifies the Due Date for the source production order
startingDate date Specifies the Starting Date for the source production order
endingDate string Specifies the Ending Date for the source production order
description string Specifies the Certificate Number of Lot No.
description2 string Specifies the blocked status of Lot No.
sourceType string Specifies that a comment exists for the Lot No.
sourceNumber string Specifies the Expiration Date of Lot No.
manufacturingOrderLines Resource Specifies the Resource with the Lines for the source production order

HTTP request

Get request

Replace the URL prefix for Business Central depending on environment following the  guideline.

GET businesscentralPrefix/api/bricklead/advancedManufacturingStatistics/v2.0/companies({companyId})/manufacturingOrders

Direct filtering is possible for every property.

Check the following examples on id, productionOrderNumber and status using following oData filtering syntaxes

GET businesscentralPrefix/api/bricklead/advancedManufacturingStatistics /v2.0/companies({companyId})/manufacturingOrders?filter= productionOrderNumber  eq 'productionOrderNumber  value'
GET businesscentralPrefix/api/bricklead/advancedManufacturingStatistics /v2.0/companies({companyId})/manufacturingOrders?filter= status  eq 'status  value'

For more information, please check  Using Filter Expressions in OData URIs.

Extended information for the Manufacturing Order Lines and Manufacturing Order Line Costs is possible. Check the following examples:

GET businesscentralPrefix/api/bricklead/advancedManufacturingStatistics /v2.0/companies({companyId})/manufacturingOrders&$expand=manufacturingOrderLines
GET businesscentralPrefix/api/bricklead/advancedManufacturingStatistics /v2.0/companies({companyId})/manufacturingOrders&$expand=manufacturingOrderLines($expand=manufacturingOrderLineCosts)

Returned Value

{
"value": [
    {
        "@odata.etag": "string",
        "id": "guid",
        "productionOrderNumber ": "string",
        "status ": "string",
        "dueDate": "date",
        "startingDate ": "date",
        "endingDate ": "date",
        "description": "string",
        "description2": "string",
        "sourceType": "string",
        "sourceNumber": "string",
        "manufacturingOrderLines": [
                {
                    "@odata.etag": "string”,
                    "id": "guid",
                    "productionOrderStatus": "string",
                    "productionOrderNumber": "string",
                    "lineNumber": integer,
                    "itemNumber": "string",
                    "itemDescription": "string",
                    "unitOfMeasure": "string",
                    "baseUnitOfMeasure": "string",
                    "weightUnitOfMeasure": "string",
                    "itemNetWeight": decimal,
                    "quantityBase": decimal,
                    "finishedQuantityBase": decimal,
                    "quantity": decimal,
                    "finishedQuantity": decimal,
                    "manufacturingOrderLineCosts": [
                            {
                                "@odata.etag": "string",
                                "productionOrderStatus": "string",
                                "productionOrderNumber": "string",
                                "lineNumber": integer,
                                "id": "guid",
                                "costType": "string",
                                "costName": "string",
                                "indentation": integer,
                                "standardCost": decimal,
                                "expectedCost": decimal,
                                "actualCost": decimal
                            }
                        ]
                }
            ]
        }    

Manufacturing Order Line resource type

APIGroup: advancedManufacturingStatistics

EntityName: manufacturingOrderLine

EntitySetName: manufacturingOrderLines

Methods

Method Return Type Description
GET Production Order Line Gets an array of Production Order Lines objects with the respective Prod. Order Line Costs

Properties

Property Type Description
id Guid The Unique ID of the Production Order Line
productionOrderStatus string Specifies the status of source Production Order
productionOrderNumber string Specifies the source Production Order No.
lineNumber Integer Specifies the line No. of source Production Order Line
itemNumber string Specifies the Item No. of source Production Order Line
unitOfMeasure string Specifies the Unit of Measure of source Production Order Line
baseUnitOfMeasure string Specifies the Base Unit of Measure of source Production Order Line
weightUnitOfMeasure string Specifies the Weight Unit of Measure from Manufacturing Setup
itemNetWeight string Specifies the Weight of the Item No. of source Production Order Line
quantityBase decimal Specifies the Quantity (base) of source Production Order Line
finishedQuantityBase decimal Specifies the Finished Quantity (base) of source Production Order Line
Quantity decimal Specifies the Quantity of source Production Order Line
finishedQuantity decimal Specifies the Finished Quantity of source Production Order Line
manufacturingOrderLineCosts Resource Specifies the Resource with the Line Cost for the source Production Order Line

HTTP request

Get request

Replace the URL prefix for Business Central depending on environment following the  guideline.

GET businesscentralPrefix/api/bricklead/advancedManufacturingStatistics/v2.0/companies({companyId})/manufacturingOrderLines

Direct filtering is possible for every property.

Check the following examples on id, productionOrderStatus and productionOrderNumber  using following oData filtering syntaxes

GET businesscentralPrefix/api/bricklead/advancedManufacturingStatistics /v2.0/companies({companyId})/manufacturingOrderLines?filter= productionOrderStatus  eq ‘productionOrderStatus value'
GET businesscentralPrefix/api/bricklead/advancedManufacturingStatistics /v2.0/companies({companyId})/manufacturingOrderLines?filter= productionOrderNumber  eq 'productionOrderNumber  value'

For more information, please check  Using Filter Expressions in OData URIs.

Extended information for the Manufacturing Order Line Costs is possible. Check the following examples:

GET businesscentralPrefix/api/bricklead/advancedManufacturingStatistics /v2.0/companies({companyId})/manufacturingOrderLines&$expand=manufacturingOrderLineCosts

Returned Value

{
    "value": [
        {
            "@odata.etag": "string”,
            "id": "guid",
            "productionOrderStatus": "string",
            "productionOrderNumber": "string",
            "lineNumber": integer,
            "itemNumber": "string",
            "itemDescription": "string",
            "unitOfMeasure": "string",
            "baseUnitOfMeasure": "string",
            "weightUnitOfMeasure": "string",
            "itemNetWeight": decimal,
            "quantityBase": decimal,
            "finishedQuantityBase": decimal,
            "quantity": decimal,
            "finishedQuantity": decimal,
            "manufacturingOrderLineCosts": [
                {
                    "@odata.etag": "string",
                    "productionOrderStatus": "string",
                    "productionOrderNumber": "string",
                    "lineNumber": integer,
                    "id": "guid",
                    "costType": "string",
                    "costName": "string",
                    "indentation": integer,
                    "standardCost": decimal,
                    "expectedCost": decimal,
                    "actualCost": decimal
                }
            ]
        }
    ]
}

Manufacturing Order Line Cost resource type

APIGroup: advancedManufacturingStatistics

EntityName: manufacturingOrderLineCost

EntitySetName: manufacturingOrderLineCosts

Methods

Method Return Type Description
GET Production Order Line Cost Gets an array of Production Order Line Costs objects for the respective Prod. Order Line

Properties

Property Type Description
id Guid The Unique ID of the Production Order Line Cost
productionOrderStatus string Specifies the status of source Production Order
productionOrderNumber string Specifies the source Production Order No.
lineNumber Integer Specifies the line No. of source Production Order Line
costType string Specifies the cost Type of source Production Order Line Cost
costName string Specifies the cost name of source Production Order Line Cost
indentation string Specifies the Indentation of source Production Order Line Cost
standardCost decimal Specifies the standard cost of source Production Order Line Cost
expectedCost decimal Specifies the expected cost of source Production Order Line Cost
actualCost decimal Specifies the actual cost of source Production Order Line Cost

HTTP request

Get request

Replace the URL prefix for Business Central depending on environment following the  guideline.

GET businesscentralPrefix/api/bricklead/advancedManufacturingStatistics/v2.0/companies({companyId})/manufacturingOrderLineCosts

Direct filtering is possible for every property.

Check the following examples on id, productionOrderStatus, productionOrderNumber and lineNumber using following oData filtering syntaxes

GET businesscentralPrefix/api/bricklead/advancedManufacturingStatistics /v2.0/companies({companyId})/manufacturingOrderLineCosts?filter=productionOrderStatus eq ‘productionOrderStatus value'
GET businesscentralPrefix/api/bricklead/advancedManufacturingStatistics /v2.0/companies({companyId})/ manufacturingOrderLineCosts?filter=productionOrderNumber eq 'productionOrderNumber value'
GET businesscentralPrefix/api/bricklead/advancedManufacturingStatistics /v2.0/companies({companyId})/ manufacturingOrderLineCosts?filter=lineNumber eq 'lineNumber value'

For more information, please check  Using Filter Expressions in OData URIs.

Returned Value

{
    "value": [
        {
            "@odata.etag": "string",
            "productionOrderStatus": "string",
            "productionOrderNumber": "string",
            "lineNumber": integer,
            "id": "guid",
            "costType": "string",
            "costName": "string",
            "indentation": integer,
            "standardCost": decimal,
            "expectedCost": decimal,
            "actualCost": decimal
        }
    ]
}
Previous