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
| URL | https://odata-api.fledge.nl/v2-8/ArticleInventoryMutations |
|---|---|
| Key | administration_idarticle_idarticle_inventory_mutation_idcreation_date |
| Administration | Rows belong to one administration: always filter on administration_id. |
| Operations | GET listGET onePOSTPATCHDELETE |
| Read licenses | BASIS |
| Write licenses | BEHEER |
| Scopes | FLEDGE_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
| Field | Type | Description |
|---|---|---|
article_idkey | String | Artikelcode |
administration_idkey | Int32 | Administratienummer |
article_inventory_mutation_idkey | Int32 | Volgnummer |
creation_datekey | Date | Datum aanmaak When the row was made; can differ from date. |
date | Date | Mutatiedatum The financial date of the change. |
quantity | Decimal | Mutatieaantal The change in stock quantity; negative is out of stock. |
amount | Decimal | Waardewijziging The change in stock value. |
stock_quantity | Decimal | Voorraad 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_amount | Decimal | Voorraadwaarde The article's stock value after this change. |
purchase_order_header_id | String | Ordernummer |
purchase_order_line_id | Int32 | Regelnummer |
production_order_header_id | String | Order nummer |
production_order_assembly_id | Int32 | Schrapnummer |
sales_order_header_id | String | Verkoopordernummer |
sales_order_line_id | Int32 | Regelnummer |
purchase_order_receipt_header_id | String | Pakbon |
purchase_order_receipt_line_id | Int32 | Regelnummer |
purchase_order_invoice_header_id | String | Factuurnummer |
purchase_invoice_line_id | Int32 | Volgnummer |
origin | String | Herkomst 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_id | String | Factuur nummer |
sales_invoice_line_id | Int32 | Factuurregelnummer |
article_history_mutation_id | Int32 | Volgnummer |
cost_system | Int32 | KP systeem |
calculation_unit | Int32 | Calculatie eenheid |
warehouse_address_id | Int32 | Adresnummer |
warehouse_aisle_id | Int32 | Magazijn |
warehouse_shelf_id | Int32 | Locatie |
average_inventory_price | Decimal | Gem. verrekenprijs: Gemiddelde verrekenprijs The average stock price (GVP) after the change. |
amount_automatic_inventory_mutation | Decimal | Absoluut bedrag |
user_created | Int32 | User aanmaak |
is_recalculated_average_inventory_price | Boolean | GVP herberekend (j/n) |