One assembly of a finished production order (productiehistorie), with the final pre-calculation (VC) and post-calculation (NC) figures. Join it to HistoricProductionOrderHeaders on historic_production_order_header_id, and its operations (HistoricPreCalculationSubOperations) on historic_production_order_header_id and historic_production_order_assembly_id. There is no reference table, so the assembly tree of a finished order can't be rebuilt.

Label in Fledge: Productieorder historie schraps

URLhttps://odata-api.fledge.nl/v2-8/HistoricProductionOrderAssemblies
Keyadministration_idhistoric_production_order_assembly_idhistoric_production_order_header_id
AdministrationRows belong to one administration: always filter on administration_id.
OperationsGET listGET onePOSTPATCHDELETE
Read licensesBASISBASISAPP
Write licensesPRODUCTIEBEHEER
ScopesFLEDGE_PORTALFLEDGE_TERMINAL

Example requests

A page of rows, with only the fields you need. See Authentication for the token.

curl -G "https://odata-api.fledge.nl/v2-8/HistoricProductionOrderAssemblies" \
  --data-urlencode '$filter=administration_id eq 1' \
  --data-urlencode '$select=historic_production_order_assembly_id,historic_production_order_header_id,article,assembly_reference,calculation_quantity' \
  --data-urlencode '$top=50' \
  -H "Authorization: Bearer $TOKEN"
const url = new URL('https://odata-api.fledge.nl/v2-8/HistoricProductionOrderAssemblies');
url.searchParams.set('$filter', 'administration_id eq 1');
url.searchParams.set('$select', 'historic_production_order_assembly_id,historic_production_order_header_id,article,assembly_reference,calculation_quantity');
url.searchParams.set('$top', '50');

const response = await fetch(url, { headers: { Authorization: `Bearer ${token}` } });
const { value } = await response.json();
var url = "https://odata-api.fledge.nl/v2-8/HistoricProductionOrderAssemblies" + "?" + string.Join("&",
    "$filter=" + Uri.EscapeDataString("administration_id eq 1"),
    "$select=" + Uri.EscapeDataString("historic_production_order_assembly_id,historic_production_order_header_id,article,assembly_reference,calculation_quantity"),
    "$top=" + Uri.EscapeDataString("50"));

http.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
var json = await http.GetStringAsync(url);

One row by its key:

GET https://odata-api.fledge.nl/v2-8/HistoricProductionOrderAssemblies(administration_id=1,historic_production_order_assembly_id={historic_production_order_assembly_id},historic_production_order_header_id='{historic_production_order_header_id}')

Fields

FieldTypeDescription
administration_idkeyInt32Administratienummer
historic_production_order_header_idkeyStringOrdernummer
historic_production_order_assembly_idkeyInt32Schrap
addressInt32Adres
articleStringArtikel

The article the assembly makes (article_id elsewhere).

article_custom_field_set_idInt32Volgnummer
article_groupInt32Artikelgroep
assembly_referenceStringReferentie

The free-text reference (Referentie), not a link to another assembly.

billable_buy_make_parts_post_calculationDecimalDeklarabel koop-/maakdelen NC
billable_materials_post_calculationDecimalDeklarabel materiaal NC
billable_operations_post_calculationDecimalDeklarabel bewerkingen NC
billable_order_costs_post_calculationDecimalDeklarabel orderkosten NC
billable_outsourcing_post_calculationDecimalDeklarabel uitbesteding NC
billable_setup_cost_post_calculationDecimalDeklarabel instelkosten NC
billable_total_post_calculationDecimalTotaal deklarabel NC
calculation_assemblyInt32Calculatie schrap
calculation_headerStringCalculatie
calculation_quantityDecimalCalculatie aantal

The quantity the assembly was costed at (Calculatie aantal).

cost_price_buy_make_part_post_calculationDecimalKostprijs koop-/maakdeel NC
cost_price_buy_make_part_post_calculation_same_assemblyDecimalTot. kostprijs kmdelen schrap zelf, dus exclusief de bijdrage van in onderliggende schrap geproduceerde kmdelen.
cost_price_buy_make_part_pre_calculationDecimalKostprijs koop-/maakdeel VC
cost_price_materials_post_calculationDecimalKostprijs materiaal NC
cost_price_materials_pre_calculationDecimalKostprijs materiaal VC
cost_price_operations_post_calculationDecimalKostprijs bewerkingen NC
cost_price_operations_pre_calculationDecimalKostprijs bewerkingen VC
cost_price_order_cost_post_calculationDecimalKostprijs orderkosten NC
cost_price_order_cost_pre_calculationDecimalKostprijs orderkosten VC
cost_price_outsourcing_post_calculationDecimalKostprijs uitbesteding NC
cost_price_outsourcing_pre_calculationDecimalKostprijs uitbesteding VC
cost_price_post_calculationDecimalKostprijs NC

The booked cost of the assembly (Kostprijs NC). See cost_price_pre_calculation.

cost_price_pre_calculationDecimalKostprijs VC

The planned cost of the assembly (Kostprijs VC). A line that made a sub assembly carries its cost, so the order's cost is the root's; adding up all assemblies counts sub assemblies twice. The same holds for cost_price_post_calculation and the other cost fields. Provisional: the app's finished-order margin reads the VC cost fields as per unit of the assembly and adds all assemblies up; the code doesn't settle which is right.

cost_price_setup_post_calculationDecimalKostprijs instelkosten NC
cost_price_setup_pre_calculationDecimalKostprijs instelkosten VC
cost_price_systemInt32Kostprijs systeem
created_byInt32User aanmaak
custom_field_1StringVeld 1
custom_field_10StringVrije veld 10
custom_field_11StringVrije veld 11
custom_field_12StringVrije veld 12
custom_field_13StringVrije veld 13
custom_field_14StringVrije veld 14
custom_field_15StringVrije veld 15
custom_field_16StringVrij veld 16
custom_field_17StringVrij veld 17
custom_field_18StringVrij veld 18
custom_field_19StringVrij veld 19
custom_field_2StringVrije veld 2
custom_field_20StringVrij veld 20
custom_field_21StringVrij veld 21
custom_field_22StringVrij veld 22
custom_field_23StringVrij veld 23
custom_field_24StringVrij veld 24
custom_field_25StringVrij veld 25
custom_field_3StringVrije veld 3
custom_field_4StringVrije veld 4
custom_field_5StringVrije veld 5
custom_field_6StringVrije veld 6
custom_field_7StringVrije veld 7
custom_field_8StringVrije veld 8
custom_field_9StringVrije veld 9
date_creationDateDatum aanmaak
date_externalDateDatum extern
date_historyDateDatum historie

When the assembly moved to history.

date_internalDateDatum intern
date_readyDateDatum gereed
description_1StringOmschrijving
description_2StringOmschrijving
description_3StringOmschrijving
drawing_numberStringTekeningnr.: Tekeningnummer
entry_operations_pre_calculationDecimalIngave bewerkingen VC
entry_price_buy_make_part_pre_calculationDecimalIngave koop-/maakdeel VC: Ingave prijs koop-/maakdeel VC
entry_price_materials_pre_calculationDecimalIngave materiaal VC: Ingave prijs materiaal VC
entry_price_order_costs_pre_calculationDecimalIngave orderkosten VC
entry_price_outsourcing_pre_calculationDecimalIngave uitbesteding VC: Ingave prijs uitbesteding VC
entry_price_post_calculationDecimalIngave prijs NC
entry_price_pre_calculationDecimalIngave prijs VC
entry_time_manual_post_calculationInt32Insteltijd man NC
entry_time_post_calculationInt32Insteltijd NC
entry_time_pre_calculationInt32Insteltijd VC
faseInt32Fase
financial_period_idInt32Periode
financial_yearInt32Boekjaar
levelInt32Niveau

1 is the root assembly, the one that makes the order's article. The legacy ERP gives every other assembly 2, whatever its depth. Only level eq 1 means something: use it to find the root, never as the depth or to find a parent.

memoStringMemo
net_gross_manualInt32Netto/bruto/handmatig
operation_time_man_hours_post_calculationInt32Bewerkingstijd man NC
operation_time_post_calculationInt32Bewerkingstijd NC
operation_time_pre_calculationInt32Bewerkingstijd VC
operatorStringOperator
production_quantityDecimalProductie aantal

The quantity to produce.

quantity_readyDecimalGereed aantal

The quantity reported ready.

revenue_groupInt32Omzetgroep
revisionStringRevisie
surcharge_buy_make_part_pre_calculationDecimalOpslag koop-/maakdeel VC
surcharge_buy_part_post_calculationDecimalOpslag koopdeel NC
surcharge_machine_hours_post_calculationDecimalOpslag machine uren NC
surcharge_man_hours_post_calculationDecimalOpslag man uren NC
surcharge_materials_post_calculationDecimalOpslag materiaal NC
surcharge_materials_pre_calculationDecimalOpslag materiaal VC
surcharge_operations_pre_calculationDecimalOpslag bewerkingen VC
surcharge_outsourcing_pre_calculationDecimalOpslag uitbesteding VC
surcharge_outsouring_post_calculationDecimalOpslag uitbesteding NC
surcharge_setup_cost_pre_calculationDecimalInstelkosten plus opslag VC
surface_areaDecimalOppervlakte
unit_factorDecimalFactor
unit_productionInt32Eenheid productie
user_historyInt32User historie
user_readyInt32User gereed
warehouse_aisle_idInt32Magazijn
warehouse_shelf_idInt32Locatie
weightDecimalGewicht

Relations

Read a related row or list in the same request with $expand, and give it its own $select; a list also needs a $top.

NavigationEntity set
AdministrationAdministrationsone
HistoricProductionOrderHeaderHistoricProductionOrderHeadersone
Wingman