Search code examples
phpapiinvoices

How can I get an Item code from an Invoice in Xero's API?


How can I get an item code from invoices? I'm working on php and I'm trying this
$Code = $invoice->LineItems->ItemCode;

and

$Code = $invoice->LineItems->LineItem->ItemCode;

But that doesn't work. How can I get it then?

Thanks!


Solution

  • A paged request was necessary to get the Item Code field.