Justin Levene Posted March 1, 2021 Share Posted March 1, 2021 The error returned is: The request contained parameters that are restricted for Start in United Kingdom [due_date,invoice_lines:quantity,invoice_lines:discount_amount] This only started happening today for a client using the Start version. Link to comment Share on other sites More sharing options...
Farris, Rick Posted March 1, 2021 Share Posted March 1, 2021 (edited) Some additional information and background on this messaging is that it started on March 1st, 2021 as mentioned. The error message is confusing as the 3 fields listed include a line item quantity, when the unit price is allowed. The Artefact is a SALES INVOICE. I seem to remember that due_date might not be supported for any region in SBCA-Start (version) and am looking at a payload similar to the following that is causing the above Error code: 422 for the three attributes/fields mentioned in the error returned. Also, each line item has a quantity which can be inferred by the unit_price and net_amount, so the error message seems to be suggesting not to provide a quantity, either. I believe the discount_amount should probably be omitted if 0, but may also not be supported in the "Start" edition of Sage Business Cloud Accounting in the UK. I do note that goods and services are mixed in the following payload for the SALES INVOICE that is getting the error. The sample payload: { "sales_invoice": { "contact_id": "923c137cab894caa8b3ec9fcf1309d31", "date": "2021-03-31", "due_date": "2021-03-31", "invoice_number_prefix": "", "invoice_number": 403, "reference": "4540156044", "main_address": { "address_line_1": "C/O TEST\r", "address_line_2": "Accounts Payable Department\r", "city": "PO Box 0001\r", "region": "Glasgow\r", "postal_code": "G74 9FU" }, "invoice_lines": [ { "description": "TXU2 TEST PRODUCT", "ledger_account_id": "d2e342ce773b11ebb6a30662051ba57b", "unit_price": 392, "unit_price_includes_tax": false, "quantity": 1, "net_amount": 392, "discount_amount": 0, "tax_rate_id": "GB_STANDARD", "tax_amount": 78.4 }, { "description": "TX-2RL TEST PRODUCT2", "ledger_account_id": "d2e342ce773b11ebb6a30662051ba57b", "unit_price": 364, "unit_price_includes_tax": false, "quantity": 1, "net_amount": 364, "discount_amount": 0, "tax_rate_id": "GB_STANDARD", "tax_amount": 72.8 }, { "description": "SERVICES 01/02/21 to 28/02/21 = 28 days - invoice#403", "ledger_account_id": "d2e342ce773b11ebb6a30662051ba57b", "unit_price": 0, "unit_price_includes_tax": false, "quantity": 1, "net_amount": 0, "discount_amount": 0, "tax_rate_id": "GB_STANDARD", "tax_amount": 0 }, { "description": "ONGOING SERVICES", "ledger_account_id": "d2e342ce773b11ebb6a30662051ba57b", "unit_price": 0, "unit_price_includes_tax": false, "quantity": 1, "net_amount": 0, "discount_amount": 0, "tax_rate_id": "GB_STANDARD", "tax_amount": 0 } ] } } Lastly... Things got complicated in the UK post-brexit! So it's worth mentioning the discussions in the Developer Guides here: https://developer.sage.com/accounting/guides/brexit/sbca_api_brexit_guide/ Which points here to highlight the breaking changes that must be dealt with: https://developer.sage.com/accounting/guides/brexit/artefacts-breaking-changes-to-support-brexit-in-api-31/, specifically the "Required artefact parameters" Edited March 1, 2021 by Farris, Rick text formatting and readability Link to comment Share on other sites More sharing options...
Administrators Ben Smith Posted March 1, 2021 Administrators Share Posted March 1, 2021 Hi, just to add to this - invoicing in Start is significantly more simplistic than in the other variants, allowing the following to be included: Contact Invoice date Reference Description Category (ledger id) Price/net amount VAT rate Total You can then add Notes, and Terms & Conditions etc. I think the ideal solution would be for you to check the variant that a person is using via the businesses/{id} endpoint to check the subscription they have as part of the initial authorisation process/integration: "subscriptions": [ { "created_at": "2017-06-06T08:25:46Z", "updated_at": "2017-06-14T14:28:32Z", "displayed_as": "Accounting", "id": "ACCOUNTING", "active": true, "status": "trial", "accountant_pays": false } ], … This will enable you to change how you post sales invoices and prevent the posting of other transaction types for users of Accounting Start. Hope this helps, Ben Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now