codat test Posted June 28, 2021 Share Posted June 28, 2021 Hi All, I have an Invoice with a non EU customer against it. I am trying to update the invoice via the (https://api.accounting.sage.com/v3.1/sales_invoices/{key}) endpoint, when I execute the request I get an error message from Sage API stating that I need to select the EU Goods/Services on each item line. However I am providing the the the Id of the EUGoodsServicesType as "GOODS" or "SERVICES" but I'm not having any luck with this. Its worth to mention that update works when I update an Invoice with an EU Customer. Please could you advice on this issue? Regards, Abe Error from API: Please select the EU Goods/Services on each item line. Link to comment Share on other sites More sharing options...
Steel, Mark Posted June 28, 2021 Share Posted June 28, 2021 Hi Abe, thank you for your question. Could you confirm the following points please: The business sending the sales invoice is based in the UK The business sending the sales invoice is registered for VAT The delivery address of the contact on the sales invoice. If the contact is registered for VAT The invoice date If at all possible, could you send us the full JSON response for a GET request to the sales_invoice/id in question and the PUT request your are making for the update please. Thanks Mark Link to comment Share on other sites More sharing options...
codat test Posted June 29, 2021 Author Share Posted June 29, 2021 Hi Mark, Thanks for quick response. The business sending the invoice is based in the UK. - Yes The business sending the sales invoice is registered for VAT - Yes The delivery address of the sales contact: "Address": { "Id": "30fa6562cd244d98b0c75a391c9581c1", "DisplayedAs": "20 Estate Ave Drive Road CU DEW Cuba" } The does not have a VAT number so my guess is that the contact is not registered for VAT Invoice date: 28/06/2021 I have also attached the files for Get and Put. Regards, Abe Put invoice.json Get Invoice.json Link to comment Share on other sites More sharing options...
codat test Posted June 29, 2021 Author Share Posted June 29, 2021 Hi Mark, Apologies, please find the Put Request below: { "SalesInvoice": { "Id": "7313dda9bad04f6fb2aafcb74d8c1efb", "DisplayedAs": null, "Transaction": null, "CreatedAt": null, "UpdatedAt": null, "DeletedAt": "0001-01-01T00:00:00", "InvoiceNumber": null, "ContactName": null, "ContactReference": null, "Contact": null, "ContactId": "ccfe555153094837b97bdedbb715ca24", "Date": "2021-06-24T00:00:00", "DueDate": "2021-07-24T00:00:00", "Reference": null, "MainAddressFreeForm": null, "MainAddress": { "Id": "30fa6562cd244d98b0c75a391c9581c1", "Name": null, "DisplayedAs": "20 Estate Ave\nDrive Road\nCU DEW\nCuba", "$path": null, "AddressType": null, "AddressTypeId": null, "address_line_1": "20 Estate Ave", "address_line_2": "Drive Road", "City": null, "Region": "", "PostalCode": "CU DEW", "Country": null, "CountryId": null, "CountryGroup": null, "CountryGroupId": null }, "DeliveryAddressFreeForm": null, "DeliveryAddress": null, "Notes": null, "TermsAndConditions": null, "ShippingNetAmount": null, "ShippingTaxRate": null, "ShippingTaxAmount": null, "ShippingTaxBreakdown": null, "ShippingTotalAmount": null, "NetAmount": 0, "TaxAmount": 0, "TotalAmount": 0, "TotalPaid": null, "OutstandingAmount": 0, "Currency": null, "CurrencyId": "GBP", "ExchangeRate": 1, "BaseCurrencyShippingNetAmount": null, "BaseCurrencyShippingTaxAmount": null, "BaseCurrencyShippingTaxBreakdown": null, "BaseCurrencyShippingTotalAmount": null, "TotalDiscountAmount": null, "BaseCurrencyTotalDiscountAmount": null, "BaseCurrencyNetAmount": null, "BaseCurrencyTaxAmount": null, "BaseCurrencyTotalAmount": null, "BaseCurrencyOutstandingAmount": null, "Status": null, "Sent": false, "VoidReason": null, "InvoiceLines": [ { "Id": null, "DisplayedAs": null, "Description": "Updating line item", "Product": null, "LedgerAccount": null, "LedgerAccountId": "9a994b92267a11e797950a57719b2edb", "Quantity": 1.0000000000, "UnitPrice": 100.0000000000, "NetAmount": 0, "TaxRate": null, "TaxRateId": "GB_ZERO", "TaxAmount": 0.00, "TaxBreakdown": null, "TotalAmount": 100.00, "BaseCurrencyUnitPrice": null, "BaseCurrencyNetAmount": null, "BaseCurrencyTaxAmount": null, "BaseCurrencyTaxBreakdown": null, "BaseCurrencyTotalAmount": 0, "EuGoodsServicesType": { "Id": "SERVICES", "DisplayedAs": null }, "Service": null, "ServiceId": null, "ProductId": null, "DiscountAmount": 0, "BaseCurrencyDiscountAmount": null, "DiscountPercentage": null } ], "TaxAddressRegion": null, "WithholdingTaxRate": null, "WithholdingTaxAmount": null, "BaseCurrencyWithholdingTaxAmount": null, "LastPaid": null } } Link to comment Share on other sites More sharing options...
codat test Posted June 29, 2021 Author Share Posted June 29, 2021 Hi Mark, Sorry it's me again. I have managed to figure out the issue. I was not setting the property "eu_goods_services_type_id" with the id . I was setting "eu_goods_services_type" with an object. Thanks Abe Link to comment Share on other sites More sharing options...
Steel, Mark Posted June 29, 2021 Share Posted June 29, 2021 Hi Abe, thanks for the info. From the values in the PUT request it appears that you are not setting the goods/service indicator at all. You need to set it as in the below. { "sales_invoice":{ "invoice_lines": [ { "description": "Test Item Line", "quantity": "1.0", "unit_price": "100.0", "net_amount": "100.0", "tax_rate_id": "GB_ZERO", "tax_amount": "0.0", "ledger_account_id": "2c8ec978b3bb11ebb35d02665419b6eb", "eu_goods_services_type_id": "SERVICES" } ] } } Thanks Mark 1 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