XeroAPI/xero-php-oauth2

Kindly correct the documentation.

nadeeravista opened this issue · 2 comments

updateOrCreateInvoices

The following line should be a PHP array. Or else it will never work. Always give Error 17

$invoices = { "Invoices": [ { "Type": "ACCREC", "Contact": { "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8" }, "LineItems": [ { "Description": "Acme Tires", "Quantity": 2, "UnitAmount": 20, "AccountCode": "200", "TaxType": "NONE", "LineAmount": 40 } ], "Date": "2019-03-11", "DueDate": "2018-12-10", "Reference": "Website Design", "Status": "AUTHORISED" } ] };

Link to gitlab

Hi @nadeeravista - we are working on new SDK documentation. At the moment we have our Accounting APIs in this new format. All methods are listed with code examples of how to use the methods.

Our code examples are object oriented and don't use raw json for payloads when creating or updating objects.

https://xeroapi.github.io/xero-php-oauth2/docs/v2/accounting/index.html#api-Accounting-updateOrCreateInvoices

Hope this helps.

Thanks for the link for the API documentation. The link you sent me resolved the issue.