I understand your analogy.
With that in mind – all REST APIs provide basic validation to prevent invalid data from being entered, and this is no different with Manager. If I was to put a completely wrong value into a field, it’d come back at me with an error. So it’s unlikely to be “injecting data directly into the database”.
Expanding on that… a REST API can include different fields to the form in the standard UI. And fields that it does provide, should be fully supported. Any that are not supported, shouldn’t be included.
I’ve just had a look at the documentation for a POST request to the SalesInvoice object.
This is what it suggests in the API example when loading the API in a web browser:
{
"IssueDate": "0001-01-01",
"DueDate": "By",
"DueDateDate": null,
"DueDateDays": null,
"Reference": null,
"QuoteNumber": null,
"OrderNumber": null,
"Customer": null,
"SalesQuote": null,
"SalesOrder": null,
"BillingAddress": null,
"Description": null,
"Lines": null,
"SalesInventoryLocation": null,
"LineDescription": false,
"Discount": false,
"DiscountType": "Percentage",
"AmountsIncludeTax": false,
"Rounding": false,
"RoundingMethod": "None",
"WithholdingTax": false,
"WithholdingTaxType": "Rate",
"WithholdingTaxPercentage": 0.0,
"WithholdingTaxAmount": 0.0,
"EarlyPaymentDiscount": false,
"EarlyPaymentDiscountType": "Percentage",
"EarlyPaymentDiscountRate": 0.0,
"EarlyPaymentDiscountAmount": 0.0,
"EarlyPaymentDiscountDays": null,
"LatePaymentFees": false,
"LatePaymentFeesPercentage": 0.0,
"TotalAmountInWords": false,
"TotalAmountInBaseCurrency": false,
"Bilingual": false,
"HideDueDate": false,
"CustomTitle": false,
"SalesInvoiceCustomTitle": null,
"HasSalesInvoiceCustomTheme": false,
"SalesInvoiceCustomTheme": null,
"AutomaticReference": false,
"ClosedInvoice": false,
"CustomFields": null
}
AutomaticReference is present in that list (3rd from the bottom). Therefore, it should either be fully supported – or removed from Manager’s API documentation for the SalesInvoice object.
If it is to be removed, so be it, but since it is in the documentation, it is natural for an API user to assume that it works. Would you agree? 