Create an Invoice Item Adjustment
This topic provides information about creating an adjustment to an invoice item, canceling an adjustment, and deleting an adjustment.
Adjust an Invoice Item
- Create an InvoiceItemAdjustment.
- Specify the type of adjustment (credit or debit).
- Specify either the invoice number or the invoice ID that contains the line item that you want to adjust.
- Specify the amount of the adjustment.
- Specify the SourceType, which describes whether the line item is a charge or tax line item.
- Specify the ID of the line item, either an InvoiceItem.Id or a Taxation.Id.
- Specify the adjustment date.
- Optionally, specify additional fields (comments, reference ID, accounting code).
SOAP Example
<ns1:create xmlns:ns1="http://api.zuora.com/"> <ns1:zObjects xmlns:ns2="http://object.api.zuora.com/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns2:InvoiceItemAdjustment"> <ns2:AccountingCode>test-1</ns2:AccountingCode> <ns2:AdjustmentDate>2010-02-02</ns2:AdjustmentDate> <ns2:Amount>2.00</ns2:Amount> <ns2:Comment>test</ns2:Comment> <ns2:InvoiceNumber>INV-1278576579796</ns2:InvoiceNumber> <ns2:SourceId>402892df29b119720129b11a55030007</ns2:SourceId> <ns2:SourceType>InvoiceDetail</ns2:SourceType> <ns2:Type>Credit</ns2:Type> </ns1:zObjects> </ns1:create>
Cancel an Adjustment to an Invoice Item
To cancel an adjustment to an invoice item:
- Use the query() call to determine ID of the item adjustment that you want to cancel.
- Update the the InvoiceItemAdjustment, and set the Status to Canceled.
SOAP Example
<ns1:update xmlns:ns1="http://api.zuora.com/"> <ns1:zObjects xmlns:ns2="http://object.api.zuora.com/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns2:InvoiceItemAdjustment"> <ns2:Id>402892df29b11b9f0129b11c75150008</ns2:Id> <ns2:Status>Canceled</ns2:Status> </ns1:zObjects> </ns1:update>
Delete an Adjustment to an Invoice Item
To delete an adjustment to an invoice item:
- Use the query() call to determine ID of the item adjustment that you want to cancel.
- Delete the InvoiceItemAdjustment, specifying the ID returned by the query() call.
SOAP Example
<ns1:delete xmlns:ns1="http://api.zuora.com/"> <ns1:type>InvoiceItemAdjustment</ns1:type> <ns1:ids>3028a2152a453a84048a45598aff025e</ns1:ids> </ns1:delete>