Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create quotes not working and giving a 500 Internal Server Error without any detail of what is wrong! #343

Closed
MuhammadUmair98 opened this issue Jan 17, 2024 · 3 comments

Comments

@MuhammadUmair98
Copy link

MuhammadUmair98 commented Jan 17, 2024

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.
xero_quotes_instance

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);

And this is the error that i get:
xero_quote_error

Copy link

PETOSS-385

Copy link

Thanks for raising an issue, a ticket has been created to track your request

@Sallyhornet
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants