# ArticleInventoryMutations

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

Subject: Warehouse.

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_id`, `article_id`, `article_inventory_mutation_id`, `creation_date` |
| Administration-specific | yes: always filter on `administration_id` |
| Operations | GET list, GET one, POST, PATCH, DELETE |
| Read licenses | BASIS |
| Write licenses | BEHEER |
| Scopes | FLEDGE_PORTAL |

## Example requests

```http
GET https://odata-api.fledge.nl/v2-8/ArticleInventoryMutations?$filter=administration_id eq 1&$select=article_id,article_inventory_mutation_id,creation_date,date,quantity,amount&$top=50
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_id` (key) | String, not null | Artikelcode |
| `administration_id` (key) | Int32, not null | Administratienummer |
| `article_inventory_mutation_id` (key) | Int32, not null | Volgnummer |
| `creation_date` (key) | Date, not null | 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) |

---

Source: https://docs.fledge.nl/en/api/reference/ArticleInventoryMutations
