> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gobl.org/llms.txt
> Use this file to discover all available pages before exploring further.

# SubLine

SubLine provides a simplified line that can be embedded inside other lines to provide a more detailed breakdown of the items being sold or substituted.

## Schema ID

`https://gobl.org/draft-0/bill/line#/$defs/SubLine`

## Properties

| Title           | Property     | Type                                                      | Description                                                                                                                                                                                                                                                                             |
| --------------- | ------------ | --------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| UUID            | `uuid`       | string                                                    | Universally Unique Identifier.                                                                                                                                                                                                                                                          |
| Index           | `i`          | integer                                                   | Line number inside the parent (calculated)                                                                                                                                                                                                                                              |
| Quantity        | `quantity`   | [num.Amount](/draft-0/num/amount)                         | Number of items                                                                                                                                                                                                                                                                         |
| Identifier      | `identifier` | [org.Identity](/draft-0/org/identity)                     | Single identifier provided by the supplier for an object on which the line item is based and is not considered a universal identity. Examples include a subscription number, telephone number, meter point, etc. Utilize the label property to provide a description of the identifier. |
| Period          | `period`     | [cal.Period](/draft-0/cal/period)                         | A period of time relevant to when the service or item is delivered.                                                                                                                                                                                                                     |
| Order Reference | `order`      | [cbc.Code](/draft-0/cbc/code)                             | Order reference for a specific line within a purchase order provided by the buyer.                                                                                                                                                                                                      |
| Cost Reference  | `cost`       | [cbc.Code](/draft-0/cbc/code)                             | Buyer accounting reference cost code to associate with the line.                                                                                                                                                                                                                        |
| Item            | `item`       | [org.Item](/draft-0/org/item)                             | Details about the item, service or good, that is being sold                                                                                                                                                                                                                             |
| Sum             | `sum`        | [num.Amount](/draft-0/num/amount)                         | Result of quantity multiplied by the item's price (calculated)                                                                                                                                                                                                                          |
| Discounts       | `discounts`  | array of [bill.LineDiscount](/draft-0/bill/line_discount) | Discounts applied to this sub-line                                                                                                                                                                                                                                                      |
| Charges         | `charges`    | array of [bill.LineCharge](/draft-0/bill/line_charge)     | Charges applied to this sub-line                                                                                                                                                                                                                                                        |
| Total           | `total`      | [num.Amount](/draft-0/num/amount)                         | Total sub-line amount after applying discounts to the sum (calculated).                                                                                                                                                                                                                 |
| Notes           | `notes`      | array of [org.Note](/draft-0/org/note)                    | Set of specific notes for this sub-line that may be required for clarification.                                                                                                                                                                                                         |

## Validation Rules

| Field                                                                | Test                                                                  | Validation Code / Message                                           |
| -------------------------------------------------------------------- | --------------------------------------------------------------------- | ------------------------------------------------------------------- |
| `i`<br /><small class="gobl-field-calculated">Calculated</small>     | <ul class="gobl-test"><li>Present</li></ul>                           | `GOBL-BILL-SUBLINE-01`<br />Index is required                       |
| `quantity`                                                           | <ul class="gobl-test"><li class="gobl-test-present">Present</li></ul> | `GOBL-BILL-SUBLINE-02`<br />Quantity is required                    |
| `item`                                                               | <ul class="gobl-test"><li class="gobl-test-present">Present</li></ul> | `GOBL-BILL-SUBLINE-03`<br />Item is required                        |
| `sum`<br /><small class="gobl-field-calculated">Calculated</small>   | <ul class="gobl-test"><li>Item has price</li><li>Present</li></ul>    | `GOBL-BILL-SUBLINE-04`<br />Sum is required when item has a price   |
| `total`<br /><small class="gobl-field-calculated">Calculated</small> | <ul class="gobl-test"><li>Item has price</li><li>Present</li></ul>    | `GOBL-BILL-SUBLINE-05`<br />Total is required when item has a price |
