Create CustomerCreditV2 record
Create a new CustomerCreditV2 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_statusback todraft. - 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 names an invoice whose e-invoice the authority has not cleared. The
e_invoicingkey 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_invoicingkey lists the reasons.
Authorizations
Headers
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.
255Body
Input schema for creating Customer Credit records.
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 Deprecated: send the structured billing_address / shipping_address instead.
Deprecated: send the structured billing_address / shipping_address instead.
2Set to "required" to calculate tax for every line and replace any supplied tax amounts before saving, or return 422 when calculation cannot complete. Omit the field to keep caller-supplied tax. The calculation supports native US sales tax (the DualEntry tax engine) and Avalara Sales Tax, VAT, and GST. Native VAT and GST return 422, because this field does not select a rate. Tax addresses: money-in uses shipping_address, then billing_address, then the customer saved address. Money-out uses ship_from_address and ship_to_address, then the vendor and company saved addresses. When a money-in payload has no address, DualEntry copies the customer saved address to billing_address and shipping_address. A money-out record saves only the ship addresses that the payload sends. Returns 422 when calculation cannot resolve a required address.
required If this customer is intercompany, DualEntry also writes a transaction in the elimination company.
draft, posted, archived Response
OK
Deprecated: send the structured billing_address / shipping_address instead.
Deprecated: send the structured billing_address / shipping_address instead.
Posting date (GL date) - the date when the transaction is recorded in the general ledger
Transaction date (inception date) - the date when the transaction actually occurred
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 ^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,16}0*$Total transaction amount
^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,2}0*$Amount that was already applied to Invoices through Customer Refunds or Customer Prepayment Applications
^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,2}0*$Amount that can be applied to Invoices through Customer Refunds or Customer Prepayment Applications
^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,2}0*$draft, posted, archived Date and time the record was created
Date and time the record was last updated
Schema for audit actor information.
Schema for audit actor information.
The e-invoice filing of the record. Null when DualEntry did not file it. Not in v1.