Customer Credits

Update CustomerCredit record (partial)

Changed on

Partially update an existing CustomerCredit record. Send only the fields you want to change. Anything you don't send stays as it is. Updates are subject to the same constraints as the full update endpoint: period locks, payment-applied restrictions, and approval-workflow rules apply.

Side effects

  • If an approval workflow matches this request, DualEntry can set record_status back to draft.
  • If this request posts a credit for an invoice that DualEntry filed, DualEntry checks the credit note with the authority and queues the filing.

Additional validations

  • Fails with 422 if the credit note filing of the credit runs or the authority cleared it, or if the request changes invoice_number of a filed credit note. An archive gets the same answer. The e_invoicing key holds the reason.
  • Fails with 422 if the credit names an invoice whose e-invoice the authority has not cleared. The e_invoicing key holds the reason. Post the credit after the authority clears the invoice.
  • Fails with 422 if the e-invoice of the posted record has data that the authority refuses. The e_invoicing key lists the reasons.
patch/public/v2/customer-credits/{record_number}/

Request

  • Base URL: https://api.dualentry.com
  • URL: https://api.dualentry.com/public/v2/customer-credits/{record_number}/
  • Auth: none declared

Path parameters

record_numberinteger required

The number attribute of the record.

Headers

Idempotency-Keystring

Optional. A unique value (a UUID works well) identifying this operation. If the request is repeated with the same key, the original response is replayed instead of the operation running again, so a retry cannot create a duplicate record. Results are replayable for 48 hours. Reusing a key with a different request body returns 422.

Request body

custom_fieldsobject[] nullable
supply_datestring date nullable
place_of_supplystring nullable
tax_metadataRecordTaxMetadata
auto_calculate_tax'required'
invoice_numberinteger nullable
cash_sale_numberinteger nullable
customer_idinteger nullable

If this customer is intercompany, DualEntry also writes a transaction in the elimination company.

company_idinteger nullable
currency_iso_4217_code'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BHD' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BRL' | 'BSD' | 'BTN' | 'BWP' | 'BYN' | 'BZD' | 'CAD' | 'CDF' | 'CHF' | 'CLF' | 'CLP' | 'CNY' | 'COP' | 'CRC' | 'CUP' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ERN' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KPW' | 'KRW' | 'KWD' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'LYD' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRU' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SDG' | 'SEK' | 'SGD' | 'SHP' | 'SLL' | 'SOS' | 'SRD' | 'STN' | 'SVC' | 'SYP' | 'SZL' | 'THB' | 'TJS' | 'TMT' | 'TND' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'UYU' | 'UZS' | 'VES' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XAG' | 'XAU' | 'XCD' | 'XDR' | 'XOF' | 'XPD' | 'XPF' | 'XPT' | 'YER' | 'ZAR' | 'ZMW' | 'ZWL'
memostring nullable
reference_numberstring
record_status'draft' | 'posted' | 'archived'
contract_idinteger nullable
bill_to_addressstring nullable

Deprecated: send the structured billing_address / shipping_address instead.

ship_to_addressstring nullable

Deprecated: send the structured billing_address / shipping_address instead.

datestring date nullable
transaction_datestring date nullable

Response

OK

bill_to_addressstring required

Deprecated: send the structured billing_address / shipping_address instead.

ship_to_addressstring required

Deprecated: send the structured billing_address / shipping_address instead.

customer_idinteger nullable
customer_namestring nullable
transaction_idsinteger[] required
internal_idinteger required
numberinteger required
codestring nullable
invoice_numberinteger nullable required
cash_sale_numberinteger nullable required
datestring date required

Posting date (GL date) - the date when the transaction is recorded in the general ledger

transaction_datestring date required

Transaction date (inception date) - the date when the transaction actually occurred

company_idinteger required
company_namestring required
company_currencystring required
currency_iso_4217_code'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BHD' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BRL' | 'BSD' | 'BTN' | 'BWP' | 'BYN' | 'BZD' | 'CAD' | 'CDF' | 'CHF' | 'CLF' | 'CLP' | 'CNY' | 'COP' | 'CRC' | 'CUP' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ERN' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KPW' | 'KRW' | 'KWD' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'LYD' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRU' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SDG' | 'SEK' | 'SGD' | 'SHP' | 'SLL' | 'SOS' | 'SRD' | 'STN' | 'SVC' | 'SYP' | 'SZL' | 'THB' | 'TJS' | 'TMT' | 'TND' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'UYU' | 'UZS' | 'VES' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XAG' | 'XAU' | 'XCD' | 'XDR' | 'XOF' | 'XPD' | 'XPF' | 'XPT' | 'YER' | 'ZAR' | 'ZMW' | 'ZWL' required
exchange_ratestring required
amountstring required

Total transaction amount

used_amountstring required

Amount that was already applied to Invoices through Customer Refunds or Customer Prepayment Applications

remaining_amountstring required

Amount that can be applied to Invoices through Customer Refunds or Customer Prepayment Applications

memostring required
reference_numberstring required
record_status'draft' | 'posted' | 'archived' required
contract_idinteger nullable
contractedboolean
created_atstring date-time required

Date and time the record was created

updated_atstring date-time required

Date and time the record was last updated

Changes

    • info

      added the optional property ///// to the response with the status

    • warning

      added the new kintsugi enum value to the ///// response property for the response status

    • warning

      added the new kintsugi enum value to the ///// response property for the response status

    • info

      added the new optional request property

    • info

      added the optional property to the response with the status