# SalesOrderLinePurchaseOrderNumbersByTypeOrderId Gets sales order lines for a single sales order Sample request: `GET /salesorders/SO/000101/lines` `GET /salesorders/SO/000101/lines?expand=linefees` ## Documentation Sample request: `GET /salesorders/SO/000101/lines` `GET /salesorders/SO/000101/lines?expand=linefees` - Catalog: `NgSalesOrders` - Schema: `SalesOrders` This is a read-only table function. The Visma.net Financials API may not support changing the data or the Invantive UniversalSQL driver for Visma.net Financials does not cover it. In the latter case, please use the table NativePlatformScalarRequests to upload data to the Visma.net Financials API. ## Parameters of Table Function The following parameters can be used to control the behaviour of the table function `SalesOrderLinePurchaseOrderNumbersByTypeOrderId`. 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 | |---|:---:|:---:|:---:|---| | `orderId` | `` | ☑ | | The id of the sales order to get | | `type` | `` | ☑ | | The type of sales order to get | ## Columns of Table Function The columns of the table function `SalesOrderLinePurchaseOrderNumbersByTypeOrderId` are shown below. Each column has an SQL data type. | Name | Data Type | Label | Required | Documentation | |---|:---:|---|:---:|---| | `COMPANY_CODE` | `varchar2(30)` | Company Code | ☑ | Partition code, segmenting the data. | | `COMPANY_NAME` | `varchar2(240)` | Company Name | ☑ | Name of the partition. | | `TEXT` | `varchar2` | | ☐ | | | `amountNotInvoiced` | `double` | | ☐ | The invoice amount which is not invoiced for this sales order line | | `autoCreateIssue` | `char` | | ☐ | Indicates if an order line of issue type will automatically be created after the order line of receipt type has been processed. | | `baseOrderQuantity` | `double` | | ☐ | The base order quantity for this line | | `billedQuantity` | `double` | | ☐ | The billed quantity for this line | | `branch_description` | `varchar2` | | ☐ | The description | | `branch_id` | `varchar2` | | ☐ | The id | | `commissionable` | `char` | Commissionable | ☐ | Indicates if line is commissionable | | `completed` | `char` | Completed | ☐ | Whether this order line is completed or not | | `customFields_customDateTimeUtc1` | `datetime` | | ☐ | A free custom colum of type DateTime - in UTC timezone | | `customFields_customDec1` | `double` | | ☐ | A free custom colum of type decimal with max 4 decimals. | | `customFields_customDec2` | `double` | | ☐ | A free custom colum of type decimal with max 4 decimals. | | `customFields_customInt1` | `int32` | | ☐ | A free custom colum of type int | | `customFields_customInt2` | `int32` | | ☐ | A free custom colum of type int | | `customFields_customStr1` | `varchar2` | | ☐ | A free custom colum of type string with max length 100. | | `customFields_customStr2` | `varchar2` | | ☐ | A free custom colum of type string with max length 100. | | `customFields_customStr3` | `varchar2` | | ☐ | A free custom colum of type string with max length 100. | | `customFields_customStr4` | `varchar2` | | ☐ | A free custom colum of type string with max length 100. | | `customFields_customStr5` | `varchar2` | | ☐ | A free custom colum of type string with max length 100. | | `description` | `varchar2` | Description | ☐ | Any description for this order line | | `discountAmount` | `double` | | ☐ | The discount amount for this line | | `discountCode` | `varchar2` | Discount Code | ☐ | Code of discount applied to this line | | `discountPercent` | `double` | Discount Percent | ☐ | Discount percentage applied to this line | | `discountSequenceId` | `varchar2` | | ☐ | Id of discount sequence applied to this line | | `discountedUnitPrice` | `double` | | ☐ | The discounted unit price for this order line | | `exciseDuty` | `double` | | ☐ | The excise duty amount for this line, aggregated from the line's fees. Like the individual fee amounts this is an unsigned magnitude; see each fee's sales/return factor for the direction. | | `extendedPrice` | `double` | | ☐ | The extended price for this sales order line | | `externalLink` | `varchar2` | | ☐ | Any external link for this sales order line | | `freeItem` | `char` | Free Item | ☐ | Whether these item(s) are free or not | | `hasManualDiscount` | `char` | | ☐ | Discount is applied manually | | `hasManualPrice` | `char` | | ☐ | Unit price is applied manually | | `inventoryAlternateId` | `varchar2` | | ☐ | | | `inventory_baseUnit` | `varchar2` | | ☐ | | | `inventory_description` | `varchar2` | Inventory Description | ☐ | The description | | `inventory_id` | `varchar2` | | ☐ | The id | | `invoiceLineNumber` | `int32` | | ☐ | The line number of the original invoice to be returned | | `invoiceNumber` | `varchar2` | | ☐ | The reference number of the original invoice to be returned | | `invoiceType` | `varchar2` | | ☐ | The invoice type of the original invoice to be returned | | `isRotRutDeductible` | `char` | | ☐ | | | `kitAssembly_referenceNumber` | `varchar2` | | ☐ | | | `lineId` | `int32` | Line Identifier | ☐ | The line number of the sales order line | | `lineTotalBeforeDiscount` | `double` | | ☐ | The line total before any discounts are applied | | `lineType` | `varchar2` | Line Type | ☐ | The type of sales order line | | `note` | `varchar2` | Note | ☐ | Any note that has been applied to this order line | | `openLine` | `char` | | ☐ | Indicates if line has quantity left to be shipped | | `openQuantity` | `double` | | ☐ | The open quantity for this line | | `operation` | `varchar2` | Operation | ☐ | The type of operation the line represents to the order | | `orderDate` | `datetime` | | ☐ | | | `overshipThreshold` | `double` | | ☐ | The overship threshold value (%) | | `projectTaskId` | `varchar2` | | ☐ | The project task with which this sales order line is associated | | `purchaseOrderSource` | `varchar2` | | ☐ | Information about line purchase order source | | `quantityOnShipments` | `double` | | ☐ | The quantity on shipments for this line | | `quantity` | `double` | Quantity | ☐ | The quantity of unit of measure this line represents | | `reasonCode` | `varchar2` | Reason Code | ☐ | The reason code | | `replacementUnitCost` | `double` | | ☐ | The replacement unit cost of an item. This is set based on the supplier price. If no supplier price found, the last price of the item's default supplier will be used. If no default supplier is set, the last cost of the item will be used. | | `requestDate` | `datetime` | | ☐ | The request date for this order line | | `rotRutDeductibleAmount` | `double` | | ☐ | | | `rotRutItemType_description` | `varchar2` | | ☐ | The description | | `rotRutItemType_id` | `varchar2` | | ☐ | The id | | `rotRutWorkType` | `varchar2` | | ☐ | | | `salesAccountId` | `varchar2` | | ☐ | The general ledger account this line applies to | | `salesPerson_description` | `varchar2` | Sales Person Description | ☐ | The description | | `salesPerson_id` | `varchar2` | Sales Person ID | ☐ | The id | | `shipDate` | `datetime` | | ☐ | The expected shipping date for this order line | | `shippingRule` | `varchar2` | | ☐ | The shipping rule code for this order line | | `sortOrder` | `int32` | | ☐ | Used to apply sort order to a set of lines | | `subaccount` | `varchar2` | Sub Account | ☐ | The general ledger subaccount this line applies to The JSON text of the nested object. | | `supplierPrice` | `double` | | ☐ | | | `supplier_currencyId` | `varchar2` | | ☐ | The currency of the supplier selected for the order line | | `supplier_id` | `varchar2` | | ☐ | The id of the supplier selected for the order line | | `supplier_name` | `varchar2` | Supplier Name | ☐ | The name of the supplier selected for the order line | | `supplier_price` | `double` | | ☐ | The supplier price of the supplier selected for the order line | | `supplier_unitOfMeasure` | `varchar2` | | ☐ | The unit of measure used by the supplier for this line | | `taxCategoryId` | `varchar2` | | ☐ | The Tax Category Id applying to this order line | | `termEndDate` | `datetime` | Term End Date | ☐ | The term end date for deferred revenue recognition on this order line. | | `termStartDate` | `datetime` | Term Start Date | ☐ | The term start date for deferred revenue recognition on this order line. | | `undershipThreshold` | `double` | | ☐ | The undership threshold value (%) | | `unitCost` | `double` | Unit Cost | ☐ | The unit cost of items on this order line | | `unitOfMeasure` | `varchar2` | | ☐ | The unit of measure (UOM) for the sales order line | | `unitPrice` | `double` | | ☐ | The unit price for items on this order line | | `warehouseId` | `varchar2` | Warehouse ID | ☐ | The Site Id for items on this line | | `warehouseLocation_description` | `varchar2` | | ☐ | The description | | `warehouseLocation_id` | `varchar2` | | ☐ | The id |