Matt Bradley Posted October 26, 2022 Posted October 26, 2022 (edited) We're randomly getting 500 errors from the sales_invoices search endpoint: [search] => DA64088 [show_payments_allocations] => 1 Returns a 500 error. Edited October 26, 2022 by Matt Bradley
Steel, Mark Posted October 26, 2022 Posted October 26, 2022 Hi Matt, The sales_invoices search param allows you to pass an alpha numeric string that allows you to find an invoice or invoices by invoice number, reference or contact name. The response will return invoices matching your criteria. I'm not 100% clear on what you're trying to do with the show_payments_allocations but this attribute is very resource intensive and performs an inner join to the allocations table in the backend. If your search results result in a large list of invoices being returned the request will time out as the the gateway response time is only 28 seconds. If you can clarify the use case for this we should be able to provide some help in making the requests more efficient. Thanks Mark
Matt Bradley Posted October 27, 2022 Author Posted October 27, 2022 We're searching here for an invoice by its invoice reference, so this should be returning either 1 or 0 results. I suppose it is possible that the inner join is causing the query to timeout at the API server, but we wouldn't expect this search to be returning more than a single result.
Steel, Mark Posted October 27, 2022 Posted October 27, 2022 Thanks for the info. We're currently looking at the data and can confirm that the problem does not lie with the request. We've been unable to replicate the behaviour using the same params and business. The issue looks to be related to a backend issue. There are over 143 pages of requests logged for this business over the last 7 days so we'll ideally need the x-amzn-RequestId or the x-request-id. If you don't have either of those, could you provide the date/time of the response please? Thanks Mark
Matt Bradley Posted November 1, 2022 Author Posted November 1, 2022 c77839ef-903c-49b7-8932-f39e259cf450
Team Paul Posted February 20, 2023 Posted February 20, 2023 Hi Mark, We are not getting a full response from the sales_Invoices endpoint. It only got only 3 properties Id, Path & Displayed_as. How do we get all properties of the sales_invoices listing?
Team Paul Posted February 20, 2023 Posted February 20, 2023 35 minutes ago, Team Paul said: I am using 'https://api.accounting.sage.com/v3.1/sales_invoices' this endpoint to get all sales invoices list, But API is not getting all details. It is only returning collection in this format {"id": "XXXXXXXX", displayed_as": "SI-",$path": "/sales_invoices/586117de375711e8b45c025132dab352"}. How can we get all data as suggested in the API guideline.
Steel, Mark Posted February 20, 2023 Posted February 20, 2023 https://api.accounting.sage.com/v3.1/sales_invoices is the index request which tells you the number of records available and provides you with the id's of the sales_invoices should you require the detail of the transaction. The path that is returned by the index https://api.accounting.sage.com/v3.1/sales_invoices/586117de375711e8b45c025132dab352 will return the sales invoice details for the requested id. What data do you require from the sales_invoice. If you can provide us with the scope of the integration and the requirements we will be able to suggest the most efficient ways of obtaining the data. Thanks Mark
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now