# PurchaseOrders: Fortnox Purchase Orders List Purchase Orders List purchase orders matching the given parameters. Sortable fields: id, supplier_number, order_date, internal_reference, response_state, delivery_date ## Documentation <p> List purchase orders matching the given parameters. </p> <p> Sortable fields: <code>id</code>, <code>supplier_number</code>, <code>order_date</code>, <code>internal_reference</code>, <code>response_state</code>, <code>delivery_date</code> </p> - Catalog: `Fortnox` - Schema: `WarehousePurchaseOrders` - Primary Keys: `id` - Label: Purchase Orders - Retrieve: True - Insert: True - Update: True - Delete: False ## Parameters of Table Function The following parameters can be used to control the behaviour of the table function `PurchaseOrders`. A value must be provided at all times for required parameters, but optional parameters in general do not need to have a value and the execution will default to a pre-defined behaviour. Values can be specified by position and by name. In both cases, all parameters not specified will be evaluated using their default values. Value specification by position is done by listing all values from the first to the last needed value. For example: a `select * from table(value1, value2, value3)` on a table with four parameters will use the default value for the fourth parameter and the specified values for the first three. Value specification by name is done by listing all values that require a value. For example with `select * from table(name1 => value1, name3 => value3)` on the same table will use the default values for the second and fourth parameters and the specified values for the first and third. | Name | Data Type | Required | Default Value | Documentation | |---|:---:|:---:|:---:|---| | `financialyear` | `` | ☐ | | Selects what financial year that should be used (does not work on every table). | | `financialyeardate` | `` | ☐ | | Selects by date, what financial year that should be used (does not work on every table). | | `fromdate` | `` | ☐ | | Defines a selection based on a start date. Only available for invoices, orders, offers, vouchers and supplierinvoices (does not work on every table). | | `internalReference` | `` | ☐ | | Include only documents where `internalReference' contains the given text (case-insensitive). | | `itemId` | `` | ☐ | | Include only documents with the given `itemId`. | | `lastmodified` | `` | ☐ | | Retrieves all records since the provided timestamp (does not work on every table). | | `note` | `` | ☐ | | Include only documents where `note`-field contains the given text (case-insensitive). | | `purchaseType` | `` | ☐ | | Include only documents with the given `purchaseType` (Values: WAREHOUSE, DROPSHIP) | | `q` | `` | ☐ | | Include only documents where `id` or `internalReference`-field contains the given text (case-insensitive). | | `state` | `` | ☐ | | Include only documents with the given `purchaseOrderState`. (Values: NOT_SENT, SENT, SENT_NOT_REJECTED, DELAYED, RECEIVED, VOIDED, CURRENT, ALL) | | `supplierNumber` | `` | ☐ | | Include only documents with the given `supplierNumber`. | | `todate` | `` | ☐ | | Defines a selection based on an end date. Only available for invoices, orders, offers, vouchers and supplierinvoices (does not work on every table). | ## Columns of Table Function The columns of the table function `PurchaseOrders` are shown below. Each column has an SQL data type. A new non-null value must be provided for every required column at all times during insert and update. | Name | Data Type | Label | Required | Documentation | |---|:---:|---|:---:|---| | `confirmationEmail` | `varchar2(100)` | Confirmation Email | ☐ | | | `costCenterCode` | `varchar2(25)` | Cost Centre Code | ☐ | | | `currencyCode` | `varchar2(3)` | Currency Code | ☐ | | | `currencyRate` | `decimal` | Currency Rate | ☐ | | | `currencyUnit` | `int32` | Currency Unit | ☐ | | | `customerId` | `varchar2(25)` | Customer ID | ☐ | | | `customerName` | `varchar2(1024)` | Customer Name | ☐ | | | `customerNumber` | `varchar2(1024)` | Customer Number | ☐ | | | `deliveryAddress2` | `varchar2(1024)` | Delivery Address 2 | ☐ | | | `deliveryAddress` | `varchar2(1024)` | Delivery Address | ☐ | | | `deliveryCity` | `varchar2(50)` | Delivery City | ☐ | | | `deliveryCountryCode` | `varchar2(3)` | Delivery Country Code | ☐ | | | `deliveryDate` | `datetime` | Delivery Date | ☐ | | | `deliveryName` | `varchar2(50)` | Delivery Name | ☐ | | | `deliveryZipCode` | `varchar2(10)` | Delivery Zip Code | ☐ | | | `dropship` | `char` | Dropship | ☐ | | | `id` | `int64` | ID | ☐ | | | `internalReference` | `varchar2(50)` | Internal Reference | ☐ | | | `languageCode` | `varchar2(3)` | Language Code | ☐ | | | `manuallyCompleted` | `char` | Manually Completed | ☐ | | | `messageToSupplier` | `varchar2(1000)` | Message to Supplier | ☐ | | | `note` | `varchar2(1000)` | Note | ☐ | | | `orderDate` | `datetime` | Order Date | ☐ | | | `orderValueInSEK` | `decimal` | Order Value in SEK | ☐ | | | `orderValue` | `decimal` | Order Value | ☐ | | | `ourReference` | `varchar2(50)` | Ourreference | ☐ | | | `outboundDocumentReference_id` | `varchar2` | Outbound Document Reference ID | ☐ | | | `outboundDocumentReference_type` | `varchar2` | Outbound Document Reference Type | ☐ | | | `paymentTermsCode` | `varchar2(20)` | Payment Terms Code | ☐ | | | `projectId` | `varchar2(25)` | Project ID | ☐ | | | `purchaseOrderState` | `varchar2` | Purchase Order State | ☐ | | | `purchaseType` | `varchar2` | Purchase Type | ☐ | | | `responseState` | `varchar2` | Response State | ☐ | | | `stockPointCode` | `varchar2` | Stock Point Code | ☐ | | | `stockPointId` | `guid` | Stock Point ID | ☐ | | | `supplierAddress2` | `varchar2(1024)` | Supplier Address 2 | ☐ | | | `supplierAddress` | `varchar2(1024)` | Supplier Address | ☐ | | | `supplierCity` | `varchar2(1024)` | Supplier City | ☐ | | | `supplierCountryCode` | `varchar2(3)` | Supplier Country Code | ☐ | | | `supplierEmail` | `varchar2(100)` | Supplier Email | ☐ | | | `supplierName` | `varchar2(1024)` | Supplier Name | ☐ | | | `supplierNumber` | `varchar2(1024)` | Supplier Number | ☐ | | | `supplierPostCode` | `varchar2(1024)` | Supplier Postcode | ☐ | | | `supplier` | `varchar2` | Supplier | ☐ | | | `totalReceivedQuantity` | `decimal` | Total Received Quantity | ☐ | | | `translatedResponseState` | `varchar2` | Translated Response State | ☐ | | | `voided` | `char` | Voided | ☐ | | | `yourReference` | `varchar2(50)` | Your Reference | ☐ | |