Expenses

Endpoint for updating an existing expense.

put/expenses/{id}/

Request

  • Base URL
    https://api.wafeq.com/v1
  • URL
    https://api.wafeq.com/v1/expenses/{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: account, account.parent, attachments, branch, contact, contact.persons, journal, paid_through_account, paid_through_account.parent, project, tax_rate, cost_center. Nested relations are joined with a dot. Pass journal to replace the journal ID with its object (ID, date, currency, reference, notes and timestamps). Documents without a journal still return null. Journal line items are retrieved separately with GET /v1/journal-line-items/?journal={journal_id}.

Headers

X-Wafeq-Idempotency-Keystring

Client-provided UUID to uniquely identify a request

Request body

accountstring required

The account associated with this expense.

amountnumber double required

The monetary amount of the expense.

attachmentsstring[]

Any files or documents attached to this expense.

branchstring nullable

The branch associated with this expense, if applicable.

contactstring

The contact associated with this expense, if applicable.

cost_centerstring nullable

The cost center associated with this expense, if applicable.

created_tsstring date-time required

The timestamp in UTC when the expense was created

currency'AED' | 'SAR' | 'USD' | 'EUR' | 'CAD' | 'AFN' | 'ALL' | 'AMD' | 'ARS' | 'AUD' | 'AZN' | 'BAM' | 'BDT' | 'BGN' | 'BHD' | 'BIF' | 'BND' | 'BOB' | 'BRL' | 'BWP' | 'BYN' | 'BZD' | 'CDF' | 'CHF' | 'CLP' | 'CNY' | 'COP' | 'CRC' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ERN' | 'ETB' | 'GBP' | 'GEL' | 'GHS' | 'GNF' | 'GTQ' | 'HKD' | 'HNL' | 'HRK' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KHR' | 'KMF' | 'KRW' | 'KWD' | 'KZT' | 'LBP' | 'LKR' | 'LYD' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MOP' | 'MUR' | 'MXN' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SDG' | 'SEK' | 'SGD' | 'SOS' | 'SYP' | 'THB' | 'TND' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'UYU' | 'UZS' | 'VES' | 'VND' | 'XAF' | 'XOF' | 'YER' | 'ZAR' | 'ZMW' required

An ISO 4217 currency code.

View the enum reference

datestring date required

The date when the expense was incurred.

descriptionstring required

A detailed description of the expense.

exchange_ratenumber double nullable

The exchange rate to the organization base currency at the time of the document.

external_idstring

External identifier for the expense.

idstring required

The unique identifier for this expense.

legacy_idstring required

[Deprecated] The legacy identifier of the expense.

modified_tsstring date-time required

The timestamp in UTC when the expense was last modified

paid_through_accountstring required

The account used to pay for this expense.

projectstring nullable

The project associated with this expense, if applicable.

referencestring

An optional reference code or number for this expense.

statusstring required

The posting status of the expense (DRAFT or POSTED). DRAFT expenses do not post to the ledger; use the mark-as-posted / mark-as-draft endpoints to transition.

tax_amount_type'TAX_INCLUSIVE' | 'TAX_EXCLUSIVE'

Whether amounts include or exclude tax.

View the enum reference

tax_ratestring

The tax rate applied to this expense, if applicable.

Response

accountstring required

The account associated with this expense.

amountnumber double required

The monetary amount of the expense.

attachmentsstring[]

Any files or documents attached to this expense.

branchstring nullable

The branch associated with this expense, if applicable.

contactstring

The contact associated with this expense, if applicable.

cost_centerstring nullable

The cost center associated with this expense, if applicable.

created_tsstring date-time required

The timestamp in UTC when the expense was created

currency'AED' | 'SAR' | 'USD' | 'EUR' | 'CAD' | 'AFN' | 'ALL' | 'AMD' | 'ARS' | 'AUD' | 'AZN' | 'BAM' | 'BDT' | 'BGN' | 'BHD' | 'BIF' | 'BND' | 'BOB' | 'BRL' | 'BWP' | 'BYN' | 'BZD' | 'CDF' | 'CHF' | 'CLP' | 'CNY' | 'COP' | 'CRC' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ERN' | 'ETB' | 'GBP' | 'GEL' | 'GHS' | 'GNF' | 'GTQ' | 'HKD' | 'HNL' | 'HRK' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KHR' | 'KMF' | 'KRW' | 'KWD' | 'KZT' | 'LBP' | 'LKR' | 'LYD' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MOP' | 'MUR' | 'MXN' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SDG' | 'SEK' | 'SGD' | 'SOS' | 'SYP' | 'THB' | 'TND' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'UYU' | 'UZS' | 'VES' | 'VND' | 'XAF' | 'XOF' | 'YER' | 'ZAR' | 'ZMW' required

An ISO 4217 currency code.

View the enum reference

datestring date required

The date when the expense was incurred.

descriptionstring required

A detailed description of the expense.

exchange_ratenumber double nullable

The exchange rate to the organization base currency at the time of the document.

external_idstring

External identifier for the expense.

idstring required

The unique identifier for this expense.

legacy_idstring required

[Deprecated] The legacy identifier of the expense.

modified_tsstring date-time required

The timestamp in UTC when the expense was last modified

paid_through_accountstring required

The account used to pay for this expense.

projectstring nullable

The project associated with this expense, if applicable.

referencestring

An optional reference code or number for this expense.

statusstring required

The posting status of the expense (DRAFT or POSTED). DRAFT expenses do not post to the ledger; use the mark-as-posted / mark-as-draft endpoints to transition.

tax_amount_type'TAX_INCLUSIVE' | 'TAX_EXCLUSIVE'

Whether amounts include or exclude tax.

View the enum reference

tax_ratestring

The tax rate applied to this expense, if applicable.

Changes

    • info

      added the new optional query request parameter expand

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status