Access accounting families for ledger classification.
query GetAccountingFamily($id: ID) {
AccountingFamily(id: $id) {
id
label
sales_label
purchases_label
default
}
}
query AccountingFamilies(
$where: QueryAccountingFamiliesWhereWhereConditions,
$orderBy: [QueryAccountingFamiliesOrderByOrderByClause!],
$search: String
) {
AccountingFamilies(
where: $where
orderBy: $orderBy
search: $search
) {
id
label
sales_label
purchases_label
default
}
}
{
"where": {
"AND": [
{ "column": "DEFAULT", "operator": "EQ", "value": true }
]
},
"orderBy": [
{ "column": "LABEL", "order": "ASC" }
],
"search": "family name"
}
| Field | Type | Description |
|---|
id | Int | Unique identifier of the accounting family. |
label | String | Label of the accounting family. |
sales_label | String | Sales label for the accounting family. |
purchases_label | String | Purchases label for the accounting family. |
default | Boolean | Whether this is the default accounting family. |
You can create filters based on following fields
| id - Int |
|---|
Example: { "column": "ID", "operator": "EQ", "value": 100012 } |
| label - String |
|---|
Example: { "column": "LABEL", "operator": "LIKE", "value": "%family%" } |
| default - Boolean |
|---|
Example: { "column": "DEFAULT", "operator": "EQ", "value": true } |
| company_id - ID |
|---|
Example: { "column": "COMPANY_ID", "operator": "EQ", "value": 100001 } |
| deleted_at - DateTime |
|---|
Example: { "column": "DELETED_AT", "operator": "NULL", "value": true } |
| hard_deleted_at - DateTime |
|---|
Example: { "column": "HARD_DELETED_AT", "operator": "NULL", "value": true } |
You can sort data based on following fields: id, label, default
query SortAccountingFamilies(
$where: QueryAccountingFamiliesWhereWhereConditions
) {
AccountingFamilies(
where: $where
orderBy: [{ column: LABEL, order: ASC }]
) {
id
label
sales_label
purchases_label
default
}
}
{
"data": {
"AccountingFamilies": [
{
"id": 100001,
"label": "Products",
"sales_label": "Product Sales",
"purchases_label": "Product Purchases",
"default": true
},
{
"id": 100002,
"label": "Services",
"sales_label": "Service Sales",
"purchases_label": "Service Purchases",
"default": false
}
]
}
}