CE Comms Dev Posted July 28, 2021 Posted July 28, 2021 Following this guide https://developer.sage.com/accounting/quick-start/preparing-to-create-test-data/ Each failing request has a line in the Postman console TypeError: Cannot read property 'id' of undefined , which is happening on the lines in the test, so maybe that is not related to the 422 error. var setresp = pm.environment.get("invoice_metadata") var indexCount = parseInt(pm.collectionVariables.get("indexcount")-1) var invData = setresp[indexCount] invData[2] = bodyData.contact.id invData[3] = bodyData.id
CE Comms Dev Posted July 28, 2021 Author Posted July 28, 2021 I found the issue was actually due to not being registered for VAT. Adding VAT details at https://accounts-extra.sageone.com/settings/financial_settings fixed this
CE Comms Dev Posted July 28, 2021 Author Posted July 28, 2021 [{"$severity":"error","$dataCode":"RecordInvalid","$message":"You cannot add tax, your business is not registered for tax","$source":"line_items.tax_amount"}] Error in response body confirming the above
Administrators Ben Smith Posted August 2, 2021 Administrators Posted August 2, 2021 Hi, Thanks for your post, currently we do require the business to be a UK VAT registered in order to work correctly (as referred to in the pre-requisites), I'll make some changes to that based on your issue, to call out where to do it if you already have an existing business you want to work with. I appreciate the feedback thank you! Ben
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now