Retrieve an account determination rule
Operation ID: getAccountDeterminationRule
Group: Inventory › Account Determination Rules
Open in the interactive reference
GET /inventory/account-determination-rules/{id}
Read-only: Reads and returns; changes nothing.
Retrieves an account determination rule, with its dimensions, accounts, and reason-code overrides.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Api-Version |
header | string · v1 | yes | The API version this request targets, named by its public identifier. Required on every request; omitting it, or naming a version this company does not have, is answered with 400. This document describes version v1. |
id |
path | string | yes | The unique identifier of the rule you want to retrieve. Format: UUID. |
Response
200 Success
Under data (getAccountDeterminationRuleOutput):
| Field | Type | Required | Description |
|---|---|---|---|
id |
string | yes | The unique identifier for the rule. Format: UUID. Example: "8d3f1a60-4c27-4e95-b013-6f2a89d47c5e". |
ruleName |
string | yes | The name of the rule. It does not have to be unique. Example: "Finished goods — receipts". |
priority |
number | no | The priority of the rule. When two matching rules are equally specific, the one with the lower number is used. A rule with no priority counts as 0. Example: 10. |
isActive |
boolean | no | Whether the rule is active. Example: true. |
matching |
object | yes | The dimensions this rule applies to. When the item type, item category, location, or transaction type is absent, the rule applies to every value of it. Example: {"entityId":"81e8beb1-1415-4012-9012-8138580f43dc","bookId":"b7c19e04-3f52-4a86-9d13-5e8f2a6c0b47","itemCategoryId":"a2f47b91-0c6d-4e38-95b1-7d3e6a428c50","transactionTypeContext":"RECEIPT"}. |
matching.entityId |
string | yes | The unique identifier of the legal entity this rule belongs to. Format: UUID. The rule applies only to inventory documents of this legal entity. See id on GET base/entities (entities). |
matching.bookId |
string | no | The unique identifier of the accounting book this rule applies to. Format: UUID. Absent only on some rules created before a book was required. Set a book on such a rule with PATCH inventory/account-determination-rules/:id (updateAccountDeterminationRule). See id on GET accounting/books/:id (getBook). |
matching.itemTypeId |
string | no | The unique identifier of the item type this rule applies to. Format: UUID. See id on GET inventory/item-types/:id (getItemType). |
matching.itemCategoryId |
string | no | The unique identifier of the item category this rule applies to. Format: UUID. The rule also matches items in child categories of this category. See id on GET inventory/item-categories/:id (getItemCategory). |
matching.locationId |
string | no | The unique identifier of the warehouse location this rule applies to. Format: UUID. See id on GET inventory/warehouses/:id (getWarehouse). |
matching.inventoryLocationType |
string | no | The type of location this rule is meant for, such as a warehouse or a store. It is for reference only and does not affect which rule is used. |
matching.transactionTypeContext |
any | no | The type of transaction this rule applies to, such as 'RECEIPT' or 'SHIPMENT'. 'DEFAULT' means every transaction type. A rule stored with no transaction type is returned as 'DEFAULT'. Some journal entries use a different type from their document. For example, a purchase return looks up its goods-returned-not-credited account as 'RECEIPT'. Transfers use 'WAREHOUSE_TRANSFER' or 'INTERCOMPANY_TRANSFER'. 'SALES_INVOICE', 'SALES_CREDIT_MEMO', and 'PURCHASE_INVOICE' are accepted, but no journal entry uses them. One of: "RECEIPT", "SHIPMENT", "SALES_RETURN", "SALES_INVOICE", "SALES_CREDIT_MEMO", "PURCHASE_RETURN", "PURCHASE_INVOICE", "PURCHASE_CREDIT_MEMO", "INVENTORY_INCREASE", "INVENTORY_DECREASE", "INVENTORY_REVALUATION", "WAREHOUSE_TRANSFER", "INTERCOMPANY_TRANSFER", "DEFAULT". |
accounts |
object | yes | The general ledger accounts that journal entries use when this rule matches. Only the accounts set on the rule are included in the response. Example: {"inventoryAssetAccountId":"1c9e4b07-52da-4f38-9016-3b7e05c2a94f","grniClearingAccountId":"4f0b7d29-6e13-4a85-b2c7-90d1f83e6a52"}. |
accounts.inventoryAssetAccountId |
string | no | The unique identifier of the balance sheet account for inventory value. Format: UUID. See id on GET accounting/accounts/:id (getAccount). |
accounts.cogsAccountId |
string | no | The unique identifier of the cost of goods sold account. Format: UUID. See id on GET accounting/accounts/:id (getAccount). |
accounts.cogsClearingAccountId |
string | no | The unique identifier of the cost of goods sold clearing account. Format: UUID. See id on GET accounting/accounts/:id (getAccount). |
accounts.deferredCogsAccountId |
string | no | The unique identifier of the deferred cost of goods sold account. Format: UUID. See id on GET accounting/accounts/:id (getAccount). |
accounts.salesRevenueAccountId |
string | no | The unique identifier of the sales revenue account. Format: UUID. See id on GET accounting/accounts/:id (getAccount). |
accounts.salesReturnAccountId |
string | no | The unique identifier of the sales return account. Format: UUID. A reason-code override in reasonCodeOverrides can replace it. See id on GET accounting/accounts/:id (getAccount). |
accounts.salesStockInTransitAccountId |
string | no | The unique identifier of the sales stock-in-transit account. Format: UUID. See id on GET accounting/accounts/:id (getAccount). |
accounts.grniClearingAccountId |
string | no | The unique identifier of the goods-received-not-invoiced clearing account, for inventory items. Format: UUID. A receipt uses it to hold the value of goods received until the vendor bill arrives. See id on GET accounting/accounts/:id (getAccount). |
accounts.grncClearingAccountId |
string | no | The unique identifier of the goods-returned-not-credited clearing account. Format: UUID. A purchase return uses it to hold the value of goods returned to a vendor until the vendor's credit arrives. Set it on a rule for 'RECEIPT', not 'PURCHASE_RETURN', because purchase returns look it up with 'RECEIPT'. A reason-code override in reasonCodeOverrides can replace it. See id on GET accounting/accounts/:id (getAccount). |
accounts.servicesReceivedNotInvoicedAccountId |
string | no | The unique identifier of the clearing account for services received but not yet invoiced, and for non-inventory items. Format: UUID. A receipt uses it to hold the value of services and non-inventory items received until the vendor bill arrives. For a receipt line with no item, it comes from the general rule for the legal entity and accounting book. If there are several general rules, the one with the lowest priority number is used, whatever its transaction type. See id on GET accounting/accounts/:id (getAccount). |
accounts.expenseAccountId |
string | no | The unique identifier of the expense account for non-inventory items. Format: UUID. An account on a receipt line for a service or expense replaces it for that line. See id on GET accounting/accounts/:id (getAccount). |
accounts.purchasePriceVarianceAccountId |
string | no | The unique identifier of the purchase price variance account, under standard costing. Format: UUID. See id on GET accounting/accounts/:id (getAccount). |
accounts.inventoryAdjustmentGainAccountId |
string | no | The unique identifier of the account for the value of stock added by an inventory increase, including one created from an inventory count. Format: UUID. Two things can replace it: a reason-code override in reasonCodeOverrides, or an offset account on an inventory increase created by manufacturing. When both apply, the offset account is used. See id on GET accounting/accounts/:id (getAccount). |
accounts.inventoryAdjustmentLossAccountId |
string | no | The unique identifier of the account for the value of stock removed by an inventory decrease, including one created from an inventory count. Format: UUID. Two things can replace it: a reason-code override in reasonCodeOverrides, or an offset account on an inventory decrease created by manufacturing. When both apply, the offset account is used. See id on GET accounting/accounts/:id (getAccount). |
accounts.revaluationGainAccountId |
string | no | The unique identifier of the account for gains from inventory revaluation. Format: UUID. When an inventory revaluation's costingValuationType is 'directCostCapitalisation', its capitalisationExpenseAccountId replaces it. See costingValuationType on GET inventory/inventory-revaluations/:id (getInventoryRevaluation). See id on GET accounting/accounts/:id (getAccount). |
accounts.revaluationLossAccountId |
string | no | The unique identifier of the account for losses from inventory revaluation. Format: UUID. When an inventory revaluation's costingValuationType is 'directCostCapitalisation', its capitalisationExpenseAccountId replaces it. See costingValuationType on GET inventory/inventory-revaluations/:id (getInventoryRevaluation). See id on GET accounting/accounts/:id (getAccount). |
accounts.soldQuantitiesRevaluationAccountId |
string | no | The unique identifier of the account for the revaluation of quantities already sold. Format: UUID. See id on GET accounting/accounts/:id (getAccount). |
accounts.purchaseReturnVarianceGainAccountId |
string | no | The unique identifier of the account for gains on purchase returns. Format: UUID. A purchase return uses it when the goods returned are worth more than their original cost. A reason-code override in reasonCodeOverrides can replace it. See id on GET accounting/accounts/:id (getAccount). |
accounts.purchaseReturnVarianceLossAccountId |
string | no | The unique identifier of the account for losses on purchase returns. Format: UUID. A purchase return uses it when the goods returned are worth less than their original cost. A reason-code override in reasonCodeOverrides can replace it. See id on GET accounting/accounts/:id (getAccount). |
accounts.fxRateDiffAccountId |
string | no | The unique identifier of the account for exchange rate differences between the receipt and the vendor bill. Format: UUID. See id on GET accounting/accounts/:id (getAccount). |
reasonCodeOverrides |
array<object> | yes | The rule's reason-code overrides. When a document line has one of these reason codes, the override's account replaces the rule account named by parentAccountType. An inventory increase or decrease created by manufacturing that has its own offset account uses that account instead of an override. An empty array when the rule has none. Example: []. |
reasonCodeOverrides[].id |
string | yes | The unique identifier for the override. Format: UUID. |
reasonCodeOverrides[].reasonCodeId |
string | yes | The unique identifier of the reason code that triggers this override. Format: UUID. See id on GET inventory/reason-codes/:id (getReasonCode). |
reasonCodeOverrides[].accountId |
string | yes | The unique identifier of the account the journal entry uses instead of the rule's account. Format: UUID. See id on GET accounting/accounts/:id (getAccount). |
reasonCodeOverrides[].parentAccountType |
any | yes | Which rule account this override replaces. Only six of the twenty accounts can be overridden. One of: "inventoryAdjustmentGainAccount", "inventoryAdjustmentLossAccount", "salesReturnAccount", "purchaseReturnVarianceGainAccount", "purchaseReturnVarianceLossAccount", "grncClearingAccount". |
lastModifiedDate |
date-time | no | The date and time the rule last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ. Requests that change only the reason-code overrides do not update this field. Example: "2026-05-12T09:30:00.000Z". |
{
"data": {
"id": "8d3f1a60-4c27-4e95-b013-6f2a89d47c5e",
"ruleName": "Finished goods — receipts",
"priority": 10,
"isActive": true,
"matching": {
"entityId": "81e8beb1-1415-4012-9012-8138580f43dc",
"bookId": "b7c19e04-3f52-4a86-9d13-5e8f2a6c0b47",
"itemCategoryId": "a2f47b91-0c6d-4e38-95b1-7d3e6a428c50",
"transactionTypeContext": "RECEIPT"
},
"accounts": {
"inventoryAssetAccountId": "1c9e4b07-52da-4f38-9016-3b7e05c2a94f",
"grniClearingAccountId": "4f0b7d29-6e13-4a85-b2c7-90d1f83e6a52"
},
"reasonCodeOverrides": [],
"lastModifiedDate": "2026-05-12T09:30:00.000Z"
},
"diagnostics": [
{
"code": "<code>",
"message": "<message>",
"severity": "error",
"path": [
"<path>"
],
"details": "<details>"
}
]
}
Errors
| Code | Status |
|---|---|
NOT_FOUND |
400 |
Statuses
400— Invalid request or business failure. Codes: NOT_FOUND401— The request carries no valid access token.403— Not authorized404— Not found429— Too many requests from this client address. The response has no body and noRetry-Afterheader.500— Internal server error