Vendor Credits

Create VendorCredit record

Changed on

Create a new VendorCredit record with the provided data. Validates all required fields and business rules.

Side effects

  • If an approval workflow matches this request, DualEntry can set record_status back to draft.
post/public/v2/vendor-credits/

Request

  • Base URL: https://api.dualentry.com
  • URL: https://api.dualentry.com/public/v2/vendor-credits/
  • Auth: none declared

Query parameters

apply_default_classificationsboolean

When false, store submitted line classifications, including an empty list. When omitted, organization defaults apply to new lines with omitted or empty classifications only when the organization setting is enabled.

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

supply_datestring date nullable
place_of_supplystring nullable
tax_metadataRecordTaxMetadata
custom_fieldsobject[] nullable
datestring date required
transaction_datestring date nullable
auto_calculate_tax'required'
bill_numberinteger nullable
direct_expense_numberinteger nullable
vendor_idinteger required

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

company_idinteger 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
memostring
record_status'draft' | 'posted' | 'archived'

Response

OK

supply_datestring date nullable required
place_of_supplystring nullable
tax_metadataRecordTaxMetadata
transaction_idsinteger[] required
internal_idinteger required
numberinteger required
codestring nullable
bill_numberinteger nullable
direct_expense_numberinteger nullable
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
vendor_idinteger required
vendor_namestring required
currency_iso_4217_codestring nullable required
exchange_ratestring required
memostring required
amountstring required

Total transaction amount

used_amountstring required

Amount that was already applied to Bills through Vendor Refunds or Vendor Prepayment Applications

remaining_amountstring required

Amount that can be applied to Bills through Vendor Refunds or Vendor Prepayment Applications

record_status'draft' | 'posted' | 'archived' required
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