Skip to content

CreditNotes

Michael Newman edited this page Jul 15, 2017 · 5 revisions

See Credit Notes at Xero Developer for more information.

see the home page for application setup.

Get All Credit Notes

$xero->creditNotes()->get();

Get Credit Note by ID

$xero->CreditNotes()->get('7e080362-68ea-11e7-907b-a6006ad3dba0');

Create

$xml = '
    <CreditNote>
        ...
    </CreditNote>
';

$xero->CreditNotes()->create($xml);

Update

$xml = '
    <CreditNote>
        ...
    </CreditNote>
';
$creditNoteId = '7e080362-68ea-11e7-907b-a6006ad3dba0';

$xero->CreditNotes()->update($creditNoteId, $xml);

Allocate

$creditNoteId = '7e080362-68ea-11e7-907b-a6006ad3dba0';
$invoiceIdentifier = '250c4ba0-68eb-11e7-907b-a6006ad3dba0';
$appliedAmount = '104.50';

$xero->CreditNotes()->allocate($creditNoteId, $invoiceIdentifier. $appliedAmount);

Request Parameters

ModifiedAfter
$xero->creditNotes()->modifiedAfter('2017-03-28T12:00:00')->get();
Where
$xero->creditNotes()->where('Type=="ACCPAYCREDIT")')->get();
Order
//Ascending
$xero->creditNotes()->order('Date')->get();

//Descending
$xero->creditNotes()->order('Date', 'DESC')->get();
Page
$xero->bankTransactions()->page(1)->get();
Clone this wiki locally