Accounts

Endpoint for updating an existing account.

put/accounts/{id}/

Request

  • Base URL
    https://api.wafeq.com/v1
  • URL
    https://api.wafeq.com/v1/accounts/{id}/
  • Auth
    API key in header Authorization

Path parameters

idstring required

Query parameters

expandstring

Comma-separated related objects to return in full instead of as IDs. Accepted values: parent, parent.parent. Nested relations are joined with a dot.

Headers

X-Wafeq-Idempotency-Keystring

Client-provided UUID to uniquely identify a request

Request body

account_codestring required

The unique code identifying this account.

account_type'ACCOUNTS_RECEIVABLE' | 'CASH_ADVANCES' | 'CASH_EQUIVALENTS' | 'EMPLOYEE_ADVANCE' | 'INVENTORY' | 'OTHER_CURRENT_ASSETS' | 'PREPAID_EXPENSES' | 'ACCUMULATED_DEPRECIATION' | 'INTANGIBLE_ASSETS' | 'OTHER_NON_CURRENT_ASSETS' | 'PROPERTY_PLANT_AND_EQUIPMENT' | 'ACCOUNTS_PAYABLE' | 'ACCRUED_EXPENSES' | 'OTHER_CURRENT_LIABILITIES' | 'PAYROLL_PAYABLE' | 'SHORT_TERM_LOANS_PAYABLE' | 'TAX_PAYABLE' | 'UNEARNED_REVENUE' | 'VAT' | 'END_OF_SERVICE_BENEFITS' | 'LONG_TERM_LOANS_PAYABLE' | 'OTHER_NON_CURRENT_LIABILITIES' | 'ISSUED_CAPITAL' | 'OTHER_OWNERS_EQUITY' | 'PAID_IN_CAPITAL' | 'SHARE_CAPITAL' | 'TREASURY_STOCK' | 'RETAINED_EARNINGS' | 'OPENING_BALANCE_EQUITY' | 'OTHER_COMPREHENSIVE_INCOME' | 'INTEREST_INCOME' | 'OTHER_INCOME' | 'GENERAL_AND_ADMINISTRATIVE_EXPENSES' | 'MARKETING_EXPENSES' | 'OTHER_OPERATING_EXPENSES' | 'RESEARCH_AND_DEVELOPMENT' | 'DEPRECIATION_AND_AMORTIZATION' | 'INTEREST_EXPENSE' | 'OTHER_NON_OPERATING_EXPENSES' | 'REALIZED_EXCHANGE_GAIN_OR_LOSS' | 'TAX' | 'UNREALIZED_EXCHANGE_GAIN_OR_LOSS' | 'ZAKAT'

The accounting purpose assigned to an account.

View the enum reference

classification'REVENUE' | 'EXPENSE' | 'ASSET' | 'LIABILITY' | 'EQUITY' required

Financial statement classification of an account.

View the enum reference

created_tsstring date-time required

The timestamp in UTC when the account was created

external_idstring

External identifier for the account.

idstring required

The unique identifier of the account.

is_lockedboolean required

Indicates whether the account is locked and cannot be modified.

is_payment_enabledboolean required

Indicates whether the account can be used for payments.

is_postingboolean

Indicates whether the account can be used for posting.

is_systemboolean required

Indicates whether this is a system-generated account that cannot be deleted.

legacy_idstring required

[Deprecated] The legacy identifier of the account.

modified_tsstring date-time required

The timestamp in UTC when the account was last modified

name_arstring

The name of the account in Arabic.

name_enstring required

The name of the account in English.

parentstring nullable

The parent account, if this is a sub-account.

sub_classification'INCOME' | 'COGS' | 'OPERATING_EXPENSE' | 'OTHER_INCOME' | 'NON_OPERATING_EXPENSE' | 'CASH_EQUIVALENTS' | 'CURRENT_ASSET' | 'NON_CURRENT_ASSET' | 'FIXED_ASSET' | 'CURRENT_LIABILITY' | 'NON_CURRENT_LIABILITY' | 'PAID_IN_CAPITAL' | 'RETAINED_EARNINGS' | 'ACCUMULATED_OTHER_COMPREHENSIVE_INCOME' | 'TREASURY_STOCK' | 'OWNERS_EQUITY' | 'OPENING_BALANCE_EQUITY' required

The sub-classification used to group an account.

View the enum reference

Response

account_codestring required

The unique code identifying this account.

account_type'ACCOUNTS_RECEIVABLE' | 'CASH_ADVANCES' | 'CASH_EQUIVALENTS' | 'EMPLOYEE_ADVANCE' | 'INVENTORY' | 'OTHER_CURRENT_ASSETS' | 'PREPAID_EXPENSES' | 'ACCUMULATED_DEPRECIATION' | 'INTANGIBLE_ASSETS' | 'OTHER_NON_CURRENT_ASSETS' | 'PROPERTY_PLANT_AND_EQUIPMENT' | 'ACCOUNTS_PAYABLE' | 'ACCRUED_EXPENSES' | 'OTHER_CURRENT_LIABILITIES' | 'PAYROLL_PAYABLE' | 'SHORT_TERM_LOANS_PAYABLE' | 'TAX_PAYABLE' | 'UNEARNED_REVENUE' | 'VAT' | 'END_OF_SERVICE_BENEFITS' | 'LONG_TERM_LOANS_PAYABLE' | 'OTHER_NON_CURRENT_LIABILITIES' | 'ISSUED_CAPITAL' | 'OTHER_OWNERS_EQUITY' | 'PAID_IN_CAPITAL' | 'SHARE_CAPITAL' | 'TREASURY_STOCK' | 'RETAINED_EARNINGS' | 'OPENING_BALANCE_EQUITY' | 'OTHER_COMPREHENSIVE_INCOME' | 'INTEREST_INCOME' | 'OTHER_INCOME' | 'GENERAL_AND_ADMINISTRATIVE_EXPENSES' | 'MARKETING_EXPENSES' | 'OTHER_OPERATING_EXPENSES' | 'RESEARCH_AND_DEVELOPMENT' | 'DEPRECIATION_AND_AMORTIZATION' | 'INTEREST_EXPENSE' | 'OTHER_NON_OPERATING_EXPENSES' | 'REALIZED_EXCHANGE_GAIN_OR_LOSS' | 'TAX' | 'UNREALIZED_EXCHANGE_GAIN_OR_LOSS' | 'ZAKAT'

The accounting purpose assigned to an account.

View the enum reference

classification'REVENUE' | 'EXPENSE' | 'ASSET' | 'LIABILITY' | 'EQUITY' required

Financial statement classification of an account.

View the enum reference

created_tsstring date-time required

The timestamp in UTC when the account was created

external_idstring

External identifier for the account.

idstring required

The unique identifier of the account.

is_lockedboolean required

Indicates whether the account is locked and cannot be modified.

is_payment_enabledboolean required

Indicates whether the account can be used for payments.

is_postingboolean

Indicates whether the account can be used for posting.

is_systemboolean required

Indicates whether this is a system-generated account that cannot be deleted.

legacy_idstring required

[Deprecated] The legacy identifier of the account.

modified_tsstring date-time required

The timestamp in UTC when the account was last modified

name_arstring

The name of the account in Arabic.

name_enstring required

The name of the account in English.

parentstring nullable

The parent account, if this is a sub-account.

sub_classification'INCOME' | 'COGS' | 'OPERATING_EXPENSE' | 'OTHER_INCOME' | 'NON_OPERATING_EXPENSE' | 'CASH_EQUIVALENTS' | 'CURRENT_ASSET' | 'NON_CURRENT_ASSET' | 'FIXED_ASSET' | 'CURRENT_LIABILITY' | 'NON_CURRENT_LIABILITY' | 'PAID_IN_CAPITAL' | 'RETAINED_EARNINGS' | 'ACCUMULATED_OTHER_COMPREHENSIVE_INCOME' | 'TREASURY_STOCK' | 'OWNERS_EQUITY' | 'OPENING_BALANCE_EQUITY' required

The sub-classification used to group an account.

View the enum reference

Changes