# HistoricPurchaseStatuses

> Status rows of purchase order lines moved to history, keyed like PurchaseOrderLineStatuses.

Subject: Purchase.

Status rows of purchase order lines moved to history, keyed like PurchaseOrderLineStatuses. The legacy ERP moves them here; the Fledge API only reads them. The same columns have other names here.

Label in Fledge: Inkoopstatussen historie.

| | |
| --- | --- |
| URL | `https://odata-api.fledge.nl/v2-8/HistoricPurchaseStatuses` |
| Key | `administration_id`, `purchase_order_header_id`, `purchase_order_line_id`, `purchase_order_line_status_id` |
| Administration-specific | yes: always filter on `administration_id` |
| Operations | GET list, GET one, POST, PATCH, DELETE |
| Read licenses | BASIS |
| Write licenses | INKOOP, BEHEER |
| Scopes | FLEDGE_PORTAL |

## Example requests

```http
GET https://odata-api.fledge.nl/v2-8/HistoricPurchaseStatuses?$filter=administration_id eq 1&$select=purchase_order_header_id,purchase_order_line_id,purchase_order_line_status_id,article_location_id,date_created,date_deleted&$top=50
GET https://odata-api.fledge.nl/v2-8/HistoricPurchaseStatuses(administration_id=1,purchase_order_header_id='{purchase_order_header_id}',purchase_order_line_id={purchase_order_line_id},purchase_order_line_status_id={purchase_order_line_status_id})
```

## Fields

| Field | Type | Description |
| --- | --- | --- |
| `administration_id` (key) | Int32 | Administratienummer |
| `purchase_order_header_id` (key) | String, not null | Ordernummer |
| `purchase_order_line_id` (key) | Int32, not null | Regelnummer |
| `purchase_order_line_status_id` (key) | Int32, not null | Volgnummer |
| `action` | String | Actie |
| `article_id` | String | Artikelcode |
| `article_location_id` | String | Lotnummer/partijregistratie. Despite its name, the lot number. |
| `date_created` | DateTimeOffset | Aangemaakt: Aanmaakdatum en -tijd. When the row was made. |
| `date_deleted` | DateTimeOffset | Aangemaakt: Aanmaakdatum en -tijd. When the row was moved to history. |
| `description` | String | Opmerkings tekst. The receipt's remark, the same as remark. |
| `display_description` | Boolean | Opmerking meenemen als dispuut?. Whether the remark is a dispute, the same as is_dispute. |
| `has_description` | Boolean | Opmerking aanwezig (ja/nee) |
| `is_complete` | Boolean | Afgewerkt. The same as PurchaseOrderLineStatuses.is_finished. |
| `parent` | Int32 | Parent. The same as parent_status_id. |
| `price` | Decimal | Prijs |
| `purchase_delivery_note` | String | Pakbonnummer. The receipt number, the same as delivery_note_number. |
| `purchase_invoice_header_financial_year` | Int32 | Boekjaar |
| `purchase_order_invoice_header_id` | String | Factuurnummer |
| `purchase_invoice_line_id` | Int32 | Volgnummer |
| `purchase_order_instruction_header_id` | Int32 | Volgnummer |
| `purchase_order_instruction_line_id` | Int32 | Regelnummer |
| `purchase_order_receipt_line_id` | Int32 | Regelnummer. The receipt line, the same as receipt_id. |
| `quantity` | Decimal | Aantal |
| `serial_number_id` | Int32 | Serienummer autom.: Serienummer automatisch |
| `status` | Int32 | Status |
| `user_created` | Int32 | User aanmaak. Who made the row. |
| `user_deleted` | Int32 | User aanmaak |
| `warehouse_address_id` | Int32 | Adresnummer |
| `warehouse_aisle_id` | Int32 | Magazijn |
| `warehouse_shelf_id` | Int32 | Locatie |

## Relations

- `Administration` → [Administrations](https://docs.fledge.nl/en/api/reference/Administrations.md) (one)
- `PurchaseOrderHeader` → [PurchaseOrderHeaders](https://docs.fledge.nl/en/api/reference/PurchaseOrderHeaders.md) (one)

---

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