Account Default

The account default resource.

Basehttps://rest.carbon.ms/accountDefault
GET/accountDefault

List account defaults

Retrieve a paginated list of account defaults. Filter, order, and select columns with PostgREST query parameters.

Query parameters

selectstring

Comma-separated columns to return. Defaults to all.

orderstring

Column to sort by, e.g. `createdAt.desc`.

limitinteger

Maximum rows to return.

offsetinteger

Rows to skip, for pagination.

GEThttps://rest.carbon.ms/accountDefault
curl --request GET \
  --url 'https://rest.carbon.ms/accountDefault?select=*&limit=10' \
  --header 'Authorization: Bearer <api-key>'
Response
[
  {
    "companyId": "xyz789",
    "salesAccount": "string",
    "salesDiscountAccount": "string",
    "costOfGoodsSoldAccount": "string",
    "purchaseVarianceAccount": "string",
    "inventoryAdjustmentVarianceAccount": "string",
    "materialVarianceAccount": "string",
    "laborAndMachineVarianceAccount": "string"
  }
]
GET/accountDefault

Retrieve a account default

Fetch a single account default by filtering on `companyId`.

Query parameters

companyIdstring

Match on the account default's `companyId`, e.g. `eq.{id}`.

GEThttps://rest.carbon.ms/accountDefault
curl --request GET \
  --url 'https://rest.carbon.ms/accountDefault?companyId=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>'
Response
{
  "companyId": "xyz789",
  "salesAccount": "string",
  "salesDiscountAccount": "string",
  "costOfGoodsSoldAccount": "string",
  "purchaseVarianceAccount": "string",
  "inventoryAdjustmentVarianceAccount": "string",
  "materialVarianceAccount": "string",
  "laborAndMachineVarianceAccount": "string"
}
POST/accountDefault

Create a account default

Create a new account default.

Body parameters

salesAccountstringrequired

References account.id

salesDiscountAccountstringrequired

References account.id

costOfGoodsSoldAccountstringrequired

References account.id

purchaseVarianceAccountstringrequired

References account.id

inventoryAdjustmentVarianceAccountstringrequired

References account.id

materialVarianceAccountstringrequired

References account.id

laborAndMachineVarianceAccountstringrequired

References account.id

indirectCostAccountstringrequired

References account.id

maintenanceAccountstringrequired

References account.id

assetDepreciationExpenseAccountstringrequired

References account.id

assetGainsAndLossesAccountstringrequired

References account.id

serviceChargeAccountstringrequired

References account.id

interestAccountstringrequired

References account.id

supplierPaymentDiscountAccountstringrequired

References account.id

customerPaymentDiscountAccountstringrequired

References account.id

roundingAccountstringrequired

References account.id

assetAquisitionCostAccountstringrequired

References account.id

assetAquisitionCostOnDisposalAccountstringrequired

References account.id

accumulatedDepreciationAccountstringrequired

References account.id

accumulatedDepreciationOnDisposalAccountstringrequired

References account.id

inventoryAccountstringrequired

References account.id

workInProgressAccountstringrequired

References account.id

receivablesAccountstringrequired

References account.id

inventoryShippedNotInvoicedAccountstringrequired

References account.id

bankCashAccountstringrequired

References account.id

bankLocalCurrencyAccountstringrequired

References account.id

bankForeignCurrencyAccountstringrequired

References account.id

prepaymentAccountstringrequired

References account.id

payablesAccountstringrequired

References account.id

salesTaxPayableAccountstringrequired

References account.id

purchaseTaxPayableAccountstringrequired

References account.id

reverseChargeSalesTaxPayableAccountstringrequired

References account.id

retainedEarningsAccountstringrequired

References account.id

goodsReceivedNotInvoicedAccountstringrequired

References account.id

overheadVarianceAccountstringrequired

References account.id

lotSizeVarianceAccountstringrequired

References account.id

subcontractingVarianceAccountstringrequired

References account.id

currencyTranslationAccountstringrequired

References account.id

laborAbsorptionAccountstring

References account.id

POSThttps://rest.carbon.ms/accountDefault
curl --request POST \
  --url https://rest.carbon.ms/accountDefault \
  --header 'Authorization: Bearer <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'Prefer: return=representation' \
  --data '{"salesAccount":"string","salesDiscountAccount":"string","costOfGoodsSoldAccount":"string","purchaseVarianceAccount":"string","inventoryAdjustmentVarianceAccount":"string","materialVarianceAccount":"string","laborAndMachineVarianceAccount":"string","indirectCostAccount":"string","maintenanceAccount":"string","assetDepreciationExpenseAccount":"string","assetGainsAndLossesAccount":"string","serviceChargeAccount":"string","interestAccount":"string","supplierPaymentDiscountAccount":"string","customerPaymentDiscountAccount":"string","roundingAccount":"string","assetAquisitionCostAccount":"string","assetAquisitionCostOnDisposalAccount":"string","accumulatedDepreciationAccount":"string","accumulatedDepreciationOnDisposalAccount":"string","inventoryAccount":"string","workInProgressAccount":"string","receivablesAccount":"string","inventoryShippedNotInvoicedAccount":"string","bankCashAccount":"string","bankLocalCurrencyAccount":"string","bankForeignCurrencyAccount":"string","prepaymentAccount":"string","payablesAccount":"string","salesTaxPayableAccount":"string","purchaseTaxPayableAccount":"string","reverseChargeSalesTaxPayableAccount":"string","retainedEarningsAccount":"string","goodsReceivedNotInvoicedAccount":"string","overheadVarianceAccount":"string","lotSizeVarianceAccount":"string","subcontractingVarianceAccount":"string","currencyTranslationAccount":"string"}'
Response
{
  "companyId": "xyz789",
  "salesAccount": "string",
  "salesDiscountAccount": "string",
  "costOfGoodsSoldAccount": "string",
  "purchaseVarianceAccount": "string",
  "inventoryAdjustmentVarianceAccount": "string",
  "materialVarianceAccount": "string",
  "laborAndMachineVarianceAccount": "string"
}
PATCH/accountDefault

Update a account default

Update an existing account default, matched on `companyId`.

Body parameters

salesAccountstringrequired

References account.id

salesDiscountAccountstringrequired

References account.id

costOfGoodsSoldAccountstringrequired

References account.id

purchaseVarianceAccountstringrequired

References account.id

inventoryAdjustmentVarianceAccountstringrequired

References account.id

materialVarianceAccountstringrequired

References account.id

laborAndMachineVarianceAccountstringrequired

References account.id

indirectCostAccountstringrequired

References account.id

maintenanceAccountstringrequired

References account.id

assetDepreciationExpenseAccountstringrequired

References account.id

assetGainsAndLossesAccountstringrequired

References account.id

serviceChargeAccountstringrequired

References account.id

interestAccountstringrequired

References account.id

supplierPaymentDiscountAccountstringrequired

References account.id

customerPaymentDiscountAccountstringrequired

References account.id

roundingAccountstringrequired

References account.id

assetAquisitionCostAccountstringrequired

References account.id

assetAquisitionCostOnDisposalAccountstringrequired

References account.id

accumulatedDepreciationAccountstringrequired

References account.id

accumulatedDepreciationOnDisposalAccountstringrequired

References account.id

inventoryAccountstringrequired

References account.id

workInProgressAccountstringrequired

References account.id

receivablesAccountstringrequired

References account.id

inventoryShippedNotInvoicedAccountstringrequired

References account.id

bankCashAccountstringrequired

References account.id

bankLocalCurrencyAccountstringrequired

References account.id

bankForeignCurrencyAccountstringrequired

References account.id

prepaymentAccountstringrequired

References account.id

payablesAccountstringrequired

References account.id

salesTaxPayableAccountstringrequired

References account.id

purchaseTaxPayableAccountstringrequired

References account.id

reverseChargeSalesTaxPayableAccountstringrequired

References account.id

retainedEarningsAccountstringrequired

References account.id

goodsReceivedNotInvoicedAccountstringrequired

References account.id

overheadVarianceAccountstringrequired

References account.id

lotSizeVarianceAccountstringrequired

References account.id

subcontractingVarianceAccountstringrequired

References account.id

currencyTranslationAccountstringrequired

References account.id

laborAbsorptionAccountstring

References account.id

PATCHhttps://rest.carbon.ms/accountDefault
curl --request PATCH \
  --url 'https://rest.carbon.ms/accountDefault?companyId=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'Prefer: return=representation' \
  --data '{"salesAccount":"string"}'
Response
{
  "companyId": "xyz789",
  "salesAccount": "string",
  "salesDiscountAccount": "string",
  "costOfGoodsSoldAccount": "string",
  "purchaseVarianceAccount": "string",
  "inventoryAdjustmentVarianceAccount": "string",
  "materialVarianceAccount": "string",
  "laborAndMachineVarianceAccount": "string"
}
DELETE/accountDefault

Delete a account default

Delete a account default, matched on `companyId`. Returns 204 No Content.

Query parameters

companyIdstring

The `companyId` of the account default to delete, e.g. `eq.{id}`.

DELETEhttps://rest.carbon.ms/accountDefault
curl --request DELETE \
  --url 'https://rest.carbon.ms/accountDefault?companyId=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>'
204 No Content