Closed rabrowne85 closed 2 years ago
It sounds like you may have been using SummarizeErrors=false. Using this paramater, you would get a code 200 but also a validation error if the credit note failed.
You can view your logs at https://developer.xero.com/myapps/
Once logged in, select your App and click on the "history" tab. Here you will be able to filter the logs by method, status, date and endpoint.
Successful calls will have the response redacted, but this is particularly useful for looking at your unsuccessful calls.
If you are still unclear as to why the credit note is not in Xero, please can you reach out to the support team using this link https://developer.xero.com/contact-xero-developer-platform-support/ with details of your app's client id and the timestamp of the call (with your timezone)
@Sallyhornet thanks for the information. I am indeed using the SummarizeErrors = false
as I understood this to give me information on all items individually, as opposed to a general response, which it does. However, I did not realise that it also always gives a status 200, hence my confusion. You are right that there is a validation error, the line_amount
does not tally to the expected discounted price. Again I understood this to be calculated based on the other information provided if not specifically set, but it is not.
As I now have a way to debug further, I will close this issue. Thanks again for your help.
SDK you're using (please complete the following information):
Describe the bug When using the SDK to create a credit note with type
ACCRECCREDIT
the request is processed as successful (200 status code), but the response is returning theCreditNoteId
as all zeros (i.e. 00000000-0000-0000-0000-000000000000) and cannot be found in the Xero Demo Company. The status is confirmed in the API History of the developer area.To Reproduce Generally following the example from: updateOrCreateCreditNotes.
Expected behavior In the
$result
object, I would expect to get the uniqueCreditNoteId
and be able to find the credit note in the Xero interface against the contact.Screenshots Not applicable
Additional context I am using Laravel 9, but the
$xero
variable is resolved to:\XeroAPI\XeroPHP\Api\AccountingApi::class
. I started with version 1.12.1 but updated to 1.13.0 to confirm the update hadn't corrected the issue and it has not.