Credit Notes

Partial update credit note

Changed on

Endpoint for partially updating an existing credit note.

patch/credit-notes/{id}/

Request

  • Base URL
    https://api.wafeq.com/v1
  • URL
    https://api.wafeq.com/v1/credit-notes/{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: attachments, branch, contact, contact.persons, journal, line_items, line_items.account, line_items.cost_center, line_items.item, line_items.tax_rate, project, warehouse. 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

amountnumber double

The total amount of the credit note, including taxes.

attachmentsstring[]

Any files or documents attached to this credit note.

balancenumber double

The remaining balance of the credit note.

branchstring nullable

The branch associated with this credit note.

contactstring

The contact associated with this credit note.

created_tsstring date-time

The timestamp in UTC when the credit note was created

credit_note_datestring date

The date when the credit note was issued.

credit_note_numberstring

The unique number assigned to this credit note.

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'

An ISO 4217 currency code.

View the enum reference

custom_fieldsobject

A mapping of custom field IDs to their values.

exchange_ratenumber double nullable

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

external_idstring

External identifier for the credit note.

idstring

The unique identifier of the credit note.

is_summaryboolean

Whether this credit note summarizes transactions over a period.

language'en' | 'ar'

The language of a document or response.

View the enum reference

legacy_idstring

[Deprecated] The legacy identifier of the credit note.

modified_tsstring date-time

The timestamp in UTC when the credit note was last modified

notesstring

Any additional notes or comments for this credit note.

place_of_supplystring

Only required if your organization is in the UAE: one of ABU_DHABI, AJMAN, DUBAI, FUJAIRAH, RAS_AL_KHAIMAH, SHARJAH, UMM_AL_QUWAIN or OUTSIDE_UAE

projectstring nullable

The project associated with this credit note, if applicable.

referencestring

An optional reference number or code for this credit note.

rounding_amountnumber double

The payable rounding amount for tax inclusive documents.

status'DRAFT' | 'SENT' | 'FINALIZED'

The processing status of a sales document.

View the enum reference

summary_period_endstring date nullable

The end date of the period covered by this summary credit note. Required when is_summary is true.

summary_period_startstring date nullable

The start date of the period covered by this summary credit note. Required when is_summary is true.

tax_amountnumber double

The total tax amount applied to this credit note.

tax_amount_type'TAX_INCLUSIVE' | 'TAX_EXCLUSIVE'

Whether amounts include or exclude tax.

View the enum reference

warehousestring nullable

The warehouse associated with this credit note, if applicable.

Response

amountnumber double required

The total amount of the credit note, including taxes.

attachmentsstring[]

Any files or documents attached to this credit note.

balancenumber double required

The remaining balance of the credit note.

branchstring nullable

The branch associated with this credit note.

contactstring required

The contact associated with this credit note.

created_tsstring date-time required

The timestamp in UTC when the credit note was created

credit_note_datestring date required

The date when the credit note was issued.

credit_note_numberstring required

The unique number assigned to this credit note.

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

custom_fieldsobject

A mapping of custom field IDs to their values.

exchange_ratenumber double nullable

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

external_idstring

External identifier for the credit note.

idstring required

The unique identifier of the credit note.

is_summaryboolean

Whether this credit note summarizes transactions over a period.

language'en' | 'ar'

The language of a document or response.

View the enum reference

legacy_idstring required

[Deprecated] The legacy identifier of the credit note.

modified_tsstring date-time required

The timestamp in UTC when the credit note was last modified

notesstring

Any additional notes or comments for this credit note.

place_of_supplystring

Only required if your organization is in the UAE: one of ABU_DHABI, AJMAN, DUBAI, FUJAIRAH, RAS_AL_KHAIMAH, SHARJAH, UMM_AL_QUWAIN or OUTSIDE_UAE

projectstring nullable

The project associated with this credit note, if applicable.

referencestring

An optional reference number or code for this credit note.

rounding_amountnumber double required

The payable rounding amount for tax inclusive documents.

status'DRAFT' | 'SENT' | 'FINALIZED'

The processing status of a sales document.

View the enum reference

summary_period_endstring date nullable

The end date of the period covered by this summary credit note. Required when is_summary is true.

summary_period_startstring date nullable

The start date of the period covered by this summary credit note. Required when is_summary is true.

tax_amountnumber double required

The total tax amount applied to this credit note.

tax_amount_type'TAX_INCLUSIVE' | 'TAX_EXCLUSIVE'

Whether amounts include or exclude tax.

View the enum reference

warehousestring nullable

The warehouse associated with this credit note, if applicable.

Changes

    • breaking

      added to the request property allOf list (media type: application/json)

    • breaking

      added to the request property allOf list (media type: application/x-www-form-urlencoded)

    • breaking

      added to the request property allOf list (media type: multipart/form-data)

    • breaking

      added to the request property allOf list (media type: application/json)

    • breaking

      added to the request property allOf list (media type: application/x-www-form-urlencoded)

    • breaking

      added to the request property allOf list (media type: multipart/form-data)

    • breaking

      removed the enum value ar of the request property (media type: application/json)

    • breaking

      removed the enum value ar of the request property (media type: application/x-www-form-urlencoded)

    • breaking

      removed the enum value ar of the request property (media type: multipart/form-data)

    • breaking

      removed the enum value en of the request property (media type: application/json)

    • breaking

      removed the enum value en of the request property (media type: application/x-www-form-urlencoded)

    • breaking

      removed the enum value en of the request property (media type: multipart/form-data)

    • breaking

      the request property type changed from string to no type (media type: application/json)

    • breaking

      the response's property type changed from string to no type for status

    • warning

      removed from the request property allOf list (media type: application/json)

    • warning

      removed from the request property allOf list (media type: application/x-www-form-urlencoded)

    • warning

      removed from the request property allOf list (media type: multipart/form-data)

    • warning

      removed the request property (media type: application/json)

    • warning

      removed the request property (media type: application/x-www-form-urlencoded)

    • warning

      removed the request property (media type: multipart/form-data)

    • warning

      removed the optional property from the response with the status

    • info

      added the new optional query request parameter expand

    • info

      added the new optional request property (media type: application/json)

    • info

      added the new optional request property (media type: application/x-www-form-urlencoded)

    • info

      added the new optional request property (media type: multipart/form-data)

    • info

      added the new optional request property (media type: application/json)

    • info

      added the new optional request property (media type: application/x-www-form-urlencoded)

    • info

      added the new optional request property (media type: multipart/form-data)

    • info

      added the new optional request property (media type: application/json)

    • info

      added the new optional request property (media type: application/x-www-form-urlencoded)

    • info

      added the new optional request property (media type: multipart/form-data)

    • info

      the request property type was generalized from string to no type (media type: application/x-www-form-urlencoded)

    • info

      the request property type was generalized from string to no type (media type: multipart/form-data)

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added to the response property allOf list for the response status

    • info

      added to the response property allOf list for the response status

    • info

      removed from the response property allOf list for the response status

    • info

      removed the ar enum value from the response property for the response status

    • info

      removed the en enum value from the response property for the response status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status