Create quotes not working and giving a 500 Internal Server Error without any detail of what is wrong!
MuhammadUmair98 opened this issue · 3 comments
SDK you're using (please complete the following information):
- Version 2.32.2
Describe the bug
I am trying to create a quote on xero as soon as user creates a quote on my application. I have the accounting.transaction scope set
as well and the similar thing for invoice is working successfully. I am attaching my xero quote instance as well.
The above instance is stored in a variable called $xero_quote
and this is how i call the xero_api
$config = Configuration::getDefaultConfiguration()->setAccessToken( {{ TOKEN_HERE }} );
$api_instance = new AccountingApi(
new Client(),
$config
);
$quotes = new \XeroAPI\XeroPHP\Models\Accounting\Quotes();
$arr_quotes = [];
array_push($arr_quotes, $xero_quote);
$quotes->setQuotes($arr_quotes);
$api_instance->updateOrCreateQuotes($xero_auth_detail->tenants[0]['Id'], $quotes, $quote->id);
PETOSS-385
Thanks for raising an issue, a ticket has been created to track your request
This is an API validation issue rather than an issue with the SDK.
You will get an error 500 if any data in the request is not correct, for example the account code seems to be 000 in the request. If account code 000 does not exist in the Xero organisation you will see the error.
If you still need help, please can you contact Xero Support using this form , giving details of your client id, the Xero tenant name and/or id and the time, date and timezone of the most recent error.