Access accounting families for ledger classification.
GraphQL
query GetAccountingFamily($id: ID) {
AccountingFamily(id: $id) {
id
label
sales_label
purchases_label
default
}
}
GraphQL
query AccountingFamilies(
$where: QueryAccountingFamiliesWhereWhereConditions,
$orderBy: [QueryAccountingFamiliesOrderByOrderByClause!],
$search: String
) {
AccountingFamilies(
where: $where
orderBy: $orderBy
search: $search
) {
id
label
sales_label
purchases_label
default
}
}
JSON
{
"where": {
"AND": [
{ "column": "DEFAULT", "operator": "EQ", "value": true }
]
},
"orderBy": [
{ "column": "LABEL", "order": "ASC" }
],
"search": "family name"
}
Field Type Description idInt Unique identifier of the accounting family. labelString Label of the accounting family. sales_labelString Sales label for the accounting family. purchases_labelString Purchases label for the accounting family. defaultBoolean 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
GraphQL
query SortAccountingFamilies(
$where: QueryAccountingFamiliesWhereWhereConditions
) {
AccountingFamilies(
where: $where
orderBy: [{ column: LABEL, order: ASC }]
) {
id
label
sales_label
purchases_label
default
}
}
JSON
{
"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
}
]
}
}