One change of an article's stock quantity or value (voorraadmutatie), written by the legacy ERP: goods receipts, sales invoices, stock corrections, production. The sign of quantity is the direction.

Label in Fledge: Artikelvoorraadwijzigingen

URLhttps://odata-api.fledge.nl/v2-8/ArticleInventoryMutations
Keyadministration_idarticle_idarticle_inventory_mutation_idcreation_date
AdministrationRows belong to one administration: always filter on administration_id.
OperationsGET listGET onePOSTPATCHDELETE
Read licensesBASIS
Write licensesBEHEER
ScopesFLEDGE_PORTAL

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/ArticleInventoryMutations" \
  --data-urlencode '$filter=administration_id eq 1' \
  --data-urlencode '$select=article_id,article_inventory_mutation_id,creation_date,date,quantity,amount' \
  --data-urlencode '$top=50' \
  -H "Authorization: Bearer $TOKEN"
const url = new URL('https://odata-api.fledge.nl/v2-8/ArticleInventoryMutations');
url.searchParams.set('$filter', 'administration_id eq 1');
url.searchParams.set('$select', 'article_id,article_inventory_mutation_id,creation_date,date,quantity,amount');
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/ArticleInventoryMutations" + "?" + string.Join("&",
    "$filter=" + Uri.EscapeDataString("administration_id eq 1"),
    "$select=" + Uri.EscapeDataString("article_id,article_inventory_mutation_id,creation_date,date,quantity,amount"),
    "$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/ArticleInventoryMutations(administration_id=1,article_id='{article_id}',article_inventory_mutation_id={article_inventory_mutation_id},creation_date={creation_date})

Fields

FieldTypeDescription
article_idkeyStringArtikelcode
administration_idkeyInt32Administratienummer
article_inventory_mutation_idkeyInt32Volgnummer
creation_datekeyDateDatum aanmaak

When the row was made; can differ from date.

dateDateMutatiedatum

The financial date of the change.

quantityDecimalMutatieaantal

The change in stock quantity; negative is out of stock.

amountDecimalWaardewijziging

The change in stock value.

stock_quantityDecimalVoorraad aantal

The article's stock quantity after this change, in the order the changes were made, not by date: a change booked back in time leaves it wrong for its date. For the stock on a date, sum quantity up to that date.

stock_amountDecimalVoorraadwaarde

The article's stock value after this change.

purchase_order_header_idStringOrdernummer
purchase_order_line_idInt32Regelnummer
production_order_header_idStringOrder nummer
production_order_assembly_idInt32Schrapnummer
sales_order_header_idStringVerkoopordernummer
sales_order_line_idInt32Regelnummer
purchase_order_receipt_header_idStringPakbon
purchase_order_receipt_line_idInt32Regelnummer
purchase_order_invoice_header_idStringFactuurnummer
purchase_invoice_line_idInt32Volgnummer
originStringHerkomst artikelvoorraadwijziging

The legacy program that made the change, for example "verwerk ipbh_vrw_sv.p" (goods receipt), "vfch_avkp vorh_sv.p" (sales invoice), "verwerk-voorraadmutaties part_sv.p" (stock correction), "verwerk-waardering torhgrmd_sv.p" (production valuation). Without an order, an origin ending in " part_sv.p" is a stock correction.

sales_invoice_header_idStringFactuur nummer
sales_invoice_line_idInt32Factuurregelnummer
article_history_mutation_idInt32Volgnummer
cost_systemInt32KP systeem
calculation_unitInt32Calculatie eenheid
warehouse_address_idInt32Adresnummer
warehouse_aisle_idInt32Magazijn
warehouse_shelf_idInt32Locatie
average_inventory_priceDecimalGem. verrekenprijs: Gemiddelde verrekenprijs

The average stock price (GVP) after the change.

amount_automatic_inventory_mutationDecimalAbsoluut bedrag
user_createdInt32User aanmaak
is_recalculated_average_inventory_priceBooleanGVP herberekend (j/n)
Wingman