> ## 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](https://docs.gobl.org/draft-0/num/amount.md) | Number of items. |
| Identifier | `identifier` | [org.Identity](https://docs.gobl.org/draft-0/org/identity.md) | 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](https://docs.gobl.org/draft-0/cal/period.md) | A period of time relevant to when the service or item is delivered. |
| Order Reference | `order` | [cbc.Code](https://docs.gobl.org/draft-0/cbc/code.md) | Order reference for a specific line within a purchase order provided by the buyer. |
| Cost Reference | `cost` | [cbc.Code](https://docs.gobl.org/draft-0/cbc/code.md) | Buyer accounting reference cost code to associate with the line. |
| Item | `item` | [org.Item](https://docs.gobl.org/draft-0/org/item.md) | Details about the item, service, or good being sold. |
| Sum | `sum` | [num.Amount](https://docs.gobl.org/draft-0/num/amount.md) | Result of quantity multiplied by the item's price (calculated). |
| Discounts | `discounts` | array of [bill.LineDiscount](https://docs.gobl.org/draft-0/bill/line_discount.md) | Discounts applied to this sub-line. |
| Charges | `charges` | array of [bill.LineCharge](https://docs.gobl.org/draft-0/bill/line_charge.md) | Charges applied to this sub-line. |
| Total | `total` | [num.Amount](https://docs.gobl.org/draft-0/num/amount.md) | Total sub-line amount after applying discounts to the sum (calculated). |
| Notes | `notes` | array of [org.Note](https://docs.gobl.org/draft-0/org/note.md) | Set of specific notes for this sub-line that may be required for clarification. |

## Validation Rules

| Field | Test | Validation Code / Message |
| - | - | - |
| `i` Calculated | <ul><li>Present</li></ul> | `GOBL-BILL-SUBLINE-01` Index is required |
| `quantity` | <ul><li>Present</li></ul> | `GOBL-BILL-SUBLINE-02` Quantity is required |
| `item` | <ul><li>Present</li></ul> | `GOBL-BILL-SUBLINE-03` Item is required |
| `sum` Calculated | <ul><li>Item has price</li><li>Present</li></ul> | `GOBL-BILL-SUBLINE-04` Sum is required when item has a price |
| `total` Calculated | <ul><li>Item has price</li><li>Present</li></ul> | `GOBL-BILL-SUBLINE-05` Total is required when item has a price |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.