Understanding the errors and warnings for the MYOB Business API?
Date Updated: Oct 2021
The following is a list of validation errors and warnings to help developers better understand the business logic behind AccountRight, Essentials and MYOB Business.
There are a list of generic error messages and codes as well as ones that are specific to individual endpoints. Particular endpoints also give you the ability to treat warnings as errors. This list will take you through each scenario and what to expect the API to return when making your calls.
We have broken these down into each collection group of endpoints
Firstly lets start with a list of generic error messages and codes that are standard across all AccountRight endpoints.
HTTP Method | Scenario | Expected Message | HTTP Status Code |
GET, POST, PUT, DELETE |
The API call has taken longer that time out limit. |
|
504 Timeout |
GET, POST, PUT, DELETE |
The number of API calls made per day has exceeded the limit. |
|
403 Forbidden |
GET, POST, PUT, DELETE |
The number of API calls made per second has exceeded the limit. |
|
403 Forbidden |
GET, POST, PUT, DELETE |
The API key is either inactive or has not been provided in the x-myobapi-key header. |
|
403 Forbidden |
POST, PUT |
Error converting value to type, ie: passing 'abcdef' to field of type boolean, passing 'xxxxx' as system GUID |
|
400 Bad Request |
POST, PUT |
Inserting and updating entities without including all required fields |
|
400 Bad Request |
POST, PUT |
Resource not found when passing a unique identifier for things like contact, account, taxcode, item, job |
|
400 Bad Request |
DELETE |
Deleting transactions where Company/Preferences element TransactionsCannotBeChangedMustBeReversed = true |
|
400 Bad Request |
GET, POST, PUT, DELETE |
When a user tries to access a resource for which they do not have access to. Double check the x-myobapi-cftoken header. See best practice guide for Company File Authentication. |
|
403 Forbidden |
POST, PUT |
Dated transactions prior to beginning of financial year |
|
400 Bad Request |
PUT |
Occurs when the RowVerison is out of date when trying to make a PUT request. |
|
409 Conflict |
/Sale/Invoice/Item
HTTP Method | Scenario | Expected Message | HTTP Status Code |
POST, PUT |
Passing a negative UnitPrice |
|
400 Bad Request |
POST, PUT |
ShipQuantity not supplied, UnitPrice is ZERO, Total is NON-ZERO |
|
400 Bad Request |
POST, PUT |
Item sale results in negative inventory |
|
400 Bad Request |
POST, PUT |
ShipQuantity is ZERO, UnitPrice NOT supplied, Total is NON-ZERO |
|
400 Bad Request |
POST, PUT |
ShipQuantity not supplied, UnitPrice not supplied, Total is NON-ZERO |
|
400 Bad Request |
POST |
Cannot use Order with Status "ConvertedToInvoice" when converting order to invoice |
|
400 Bad Request |
POST |
Layout type mismatch on Order conversion |
|
400 Bad Request |
DELETE |
Invoice with payments applied |
|
400 Bad Request |
PUT |
Cannot update Order.UID on existing Invoice |
|
400 Bad Request |
POST, PUT |
Passing Total with more than 2 decimal places |
|
400 Bad Request |
/Sale/Invoice/Service
HTTP Method | Scenario | Expected Message | HTTP Status Code |
POST, PUT |
Missing required fields |
|
400 Bad Request |
POST, PUT |
Passing Total with more than 2 decimal places |
|
400 Bad Request |
POST |
Customer mismatch between Order and Invoice conversion |
|
400 Bad Request |
POST |
Cannot use Order with Status "ConvertedToInvoice" when converting order to invoice |
|
400 Bad Request |
POST |
Layout type mismatch on order conversion |
|
400 Bad Request |
DELETE |
Invoice with payments applied |
|
400 Bad Request |
PUT |
Cannot update Order.UID on existing invoice |
|
400 Bad Request |
/Sale/Invoice/Professional/
HTTP Method | Scenario | Expected Message | HTTP Status Code |
POST, PUT |
Missing required fields |
|
400 Bad Request |
POST, PUT |
Passing Total with more than 2 decimal places |
|
400 Bad Request |
POST |
Customer mismatch between Order and Invoice conversion |
|
400 Bad Request |
POST |
Cannot use Order with Status "ConvertedToInvoice" when converting order to invoice |
|
400 Bad Request |
POST |
Layout type mismatch on order conversion |
|
400 Bad Request |
DELETE |
Invoice with payments applied |
|
400 Bad Request |
PUT |
Cannot update Order.UID on existing invoice |
|
400 Bad Request |
/Sale/Invoice/TimeBilling
HTTP Method | Scenario | Expected Message | HTTP Status Code |
POST, PUT |
Required fields not supplied |
|
400 Bad Request |
POST, PUT |
Date prior to beginning of financial year |
|
400 Bad Request |
POST, PUT |
Not enough stock on hand to complete invoice |
|
400 Bad Request |
POST, PUT |
Creating or updating line of invoice with both Item & Activity |
|
400 Bad Request |
POST |
Posting Zero or Negative amount |
|
400 Bad Request |
/Sale/Invoice/Miscellaneous/
HTTP Method | Scenario | Expected Message | HTTP Status Code |
POST, PUT |
Missing required fields |
|
400 Bad Request |
POST, PUT |
Passing Total with more than 2 decimal places |
|
400 Bad Request |
POST |
Customer mismatch between Order and Invoice conversion |
|
400 Bad Request |
POST |
Cannot use Order with Status "ConvertedToInvoice" when converting order to invoice |
|
400 Bad Request |
POST |
Layout type mismatch on order conversion |
|
400 Bad Request |
DELETE |
Invoice with payments applied |
|
400 Bad Request |
PUT |
Cannot update Order.UID on existing invoice |
|
400 Bad Request |
/Sale/CustomerPayment/
HTTP Method | Scenario | Expected Message | HTTP Status Code |
POST |
No invoice passed in lines array. |
|
400 Bad Request |
DELETE |
Delete customer payment on Order once it's converted to Invoice |
|
400 Bad Request |
POST, PUT |
Date falling within locked period setup in company preferences |
|
400 Bad Request |
DELETE |
Delete system created transaction |
|
400 Bad Request |
/Sale/CustomerPayment/RecordWithDiscountsAndFees
HTTP Method | Scenario | Expected Message | HTTP Status Code |
POST |
Payment with no lines |
|
400 Bad Request |
POST |
Finance charge linked account not set |
|
400 Bad Request |
POST |
Discounts for early payment linked account not set |
|
400 Bad Request |
POST |
Recording payment on invoice where Status: Credit |
|
400 Bad Request |
POST |
Recording discount on partial payment of invoice. |
|
400 Bad Request |
POST |
Account UID is NOT same as UndepositedFunds Linked Account UID |
|
400 Bad Request |
/Sale/Order/Item
HTTP Method | Scenario | Expected Message | HTTP Status Code |
POST, PUT |
Required fields not supplied |
|
400 Bad Request |
PUT |
Incorrect RowID on line |
|
400 Bad Request |
PUT |
Updating line Type ie: "Transaction" to "Header" |
|
400 Bad Request |
POST, PUT |
Date prior to beginning of financial year |
|
400 Bad Request |
POST, PUT |
Date falling within locked period setup in company preferences |
|
400 Bad Request |
POST, PUT |
Decimal precision error on Total field |
|
400 Bad Request |
PUT |
Trying to change customer on existing Order |
|
400 Bad Request |
POST, PUT |
Passing a negative UnitPrice |
|
400 Bad Request |
POST, PUT |
Not enough stock on hand to complete order |
|
400 Bad Request |
DELETE |
Delete Order with payments |
|
400 Bad Request |
POST, PUT |
Update or Delete an Order with Status "ConvertedToInvoice" |
|
400 Bad Request |
/Sale/Order/Service
HTTP Method | Scenario | Expected Message | HTTP Status Code |
POST, PUT |
Required fields not supplied |
|
400 Bad Request |
PUT |
Incorrect RowID on line |
|
400 Bad Request |
PUT |
Updating line Type ie: "Transaction" to "Header" |
|
400 Bad Request |
POST, PUT |
Date prior to beginning of financial year |
|
400 Bad Request |
POST, PUT |
Date falling within locked period setup in company preferences |
|
400 Bad Request |
POST, PUT |
Decimal precision error on Total field |
|
400 Bad Request |
PUT |
Trying to change customer on existing Order |
|
400 Bad Request |
DELETE |
Delete Order with payments |
|
400 Bad Request |
POST, PUT |
Update or Delete an Order with Status "ConvertedToInvoice" |
|
400 Bad Request |
/Sale/Order/Professional
HTTP Method | Scenario | Expected Message | HTTP Status Code |
POST, PUT |
Required fields not supplied |
|
400 Bad Request |
PUT |
Incorrect RowID on line |
|
400 Bad Request |
PUT |
Updating line Type ie: "Transaction" to "Header" |
|
400 Bad Request |
POST, PUT |
Date prior to beginning of financial year |
|
400 Bad Request |
POST, PUT |
Date falling within locked period setup in company preferences |
|
400 Bad Request |
POST, PUT |
Decimal precision error on Total field |
|
400 Bad Request |
PUT |
Trying to change customer on existing Order |
|
400 Bad Request |
DELETE |
Delete Order with payments |
|
400 Bad Request |
POST, PUT |
Update or Delete an Order with Status "ConvertedToInvoice" |
|
400 Bad Request |
/Sale/Order/TimeBilling
HTTP Method | Scenario | Expected Message | HTTP Status Code |
POST, PUT |
Required fields not supplied |
|
400 Bad Request |
POST, PUT |
Date prior to beginning of financial year |
|
400 Bad Request |
PUT |
Trying to change customer on existing Order |
|
400 Bad Request |
POST, PUT |
Not enough stock on hand to complete order |
|
400 Bad Request |
DELETE |
Delete Order with payments |
|
400 Bad Request |
POST, PUT |
Update or Delete an Order with Status "ConvertedToInvoice" |
|
400 Bad Request |
POST, PUT |
Creating or updating line of order with both Item & Activity |
|
400 Bad Request |
POST |
Posting Zero or Negative amount |
|
400 Bad Request |
/Sale/Order/Miscellaneous
HTTP Method | Scenario | Expected Message | HTTP Status Code |
POST, PUT |
Required fields not supplied |
|
400 Bad Request |
PUT |
Incorrect RowID on line |
|
400 Bad Request |
PUT |
Updating line Type ie: "Transaction" to "Header" |
|
400 Bad Request |
POST, PUT |
Date prior to beginning of financial year |
|
400 Bad Request |
POST, PUT |
Date falling within locked period setup in company preferences |
|
400 Bad Request |
POST, PUT |
Decimal precision error on Total field |
|
400 Bad Request |
PUT |
Trying to change customer on existing Order |
|
400 Bad Request |
DELETE |
Delete Order with payments |
|
400 Bad Request |
POST, PUT |
Update or Delete an Order with Status "ConvertedToInvoice" |
|
400 Bad Request |
/Sale/CreditSettlement/
HTTP Method | Scenario | Expected Message | HTTP Status Code |
POST |
Customer.UID does not match customer on CreditFromInvoice |
|
400 Bad Request |
POST |
Credit settlement applied to Invoice of Status Credit |
|
400 Bad Request |
POST |
Over payments |
|
400 Bad Request |
/Sale/CreditRefund/
HTTP Method | Scenario | Expected Message | HTTP Status Code |
POST |
Customer.UID does not match customer on Invoice |
|
400 Bad Request |
POST |
Over payments |
|
400 Bad Request |
POST |
Invoice to refund not in Status: Credit |
|
400 Bad Request |
POST |
No Customer.UID supplied |
|
400 Bad Request |
POST |
Account.UID not found |
|
400 Bad Request |
POST |
Posting Zero or Negative amount |
|
400 Bad Request |
/Purchase/Bill/Item
HTTP Method | Scenario | Expected Message | HTTP Status Code |
POST, PUT |
Negative item purchase results in negative inventory |
|
400 Bad Request |
POST, PUT |
BillQuantity is ZERO, UnitPrice NOT supplied, Total is NON-ZERO |
|
400 Bad Request |
POST, PUT |
BillQuantity not supplied, UnitPrice is ZERO, Total is NON-ZERO |
|
400 Bad Request |
POST, PUT |
Passing a negative UnitPrice |
|
400 Bad Request |
POST, PUT |
BillQuantity not supplied, UnitPrice not supplied, Total is NON-ZERO |
|
400 Bad Request |
POST, PUT |
No date supplied |
|
400 Bad Request |
POST, PUT |
Passing Total with more than 2 decimal places |
|
400 Bad Request |
/Purchase/Bill/Service
HTTP Method | Scenario | Expected Message | HTTP Status Code |
POST, PUT |
Required fields not supplied |
|
400 Bad Request |
POST, PUT |
Passing Total with more than 2 decimal places |
|
400 Bad Request |
POST, PUT |
Duplicate purchase number |
|
400 Bad Request |
POST, PUT |
Duplicate supplier invoice number |
|
400 Bad Request |
POST, PUT |
Supplier contact does not contain an ABN number |
|
400 Bad Request |
PUT |
Purchase bill has already been reconciled |
|
400 Bad Request |
POST, PUT |
Transaction will result in exceeding supplier credit limit |
|
400 Bad Request |
POST, PUT |
Account type is anything other than Expense or CostOfSales in lines array |
|
400 Bad Request |
POST, PUT |
No lines in array |
|
400 Bad Request |
POST, PUT |
Wildcard characters used in Purchase Number field |
|
400 Bad Request |
POST, PUT |
Posting VOID transactions |
|
400 Bad Request |
/Purchase/Bill/Professional
HTTP Method | Scenario | Expected Message | HTTP Status Code |
POST, PUT |
Missing required fields |
|
400 Bad Request |
POST, PUT |
Passing Total with more than 2 decimal places |
|
400 Bad Request |
/Purchase/Bill/Miscellaneous
HTTP Method | Scenario | Expected Message | HTTP Status Code |
POST, PUT |
Missing required fields |
|
400 Bad Request |
POST, PUT |
Passing Total with more than 2 decimal places |
|
400 Bad Request |
/Purchase/SupplierPayment/
HTTP Method | Scenario | Expected Message | HTTP Status Code |
POST, PUT |
No lines in purchases array collection |
|
400 Bad Request |
POST, PUT |
Passing date as null or "" |
|
400 Bad Request |
POST |
Supplier.UID does not match with the supplier on Bill |
|
400 Bad Request |
/Purchase/Order/Item
HTTP Method | Scenario | Expected Message | HTTP Status Code |
POST, PUT |
Required fields not supplied |
|
400 Bad Request |
PUT |
Incorrect RowID on line |
|
400 Bad Request |
PUT |
Updating line Type ie: "Transaction" to "Header" |
|
400 Bad Request |
POST, PUT |
Date prior to beginning of financial year |
|
400 Bad Request |
POST, PUT |
Date falling within locked period setup in company preferences |
|
400 Bad Request |
POST, PUT |
Decimal precision error on Total field |
|
400 Bad Request |
PUT |
Trying to change supplier on existing Order |
|
400 Bad Request |
POST, PUT |
Passing a negative UnitPrice |
|
400 Bad Request |
POST, PUT |
Not enough stock on hand to complete order |
|
400 Bad Request |
DELETE |
Delete Order with payments |
|
400 Bad Request |
POST, PUT |
Update or Delete an Order with Status "ConvertedToBill" |
|
400 Bad Request |
/Purchase/Order/Service
HTTP Method | Scenario | Expected Message | HTTP Status Code |
POST, PUT |
Required fields not supplied |
|
400 Bad Request |
PUT |
Incorrect RowID on line |
|
400 Bad Request |
PUT |
Updating line Type ie: "Transaction" to "Header" |
|
400 Bad Request |
POST, PUT |
Date prior to beginning of financial year |
|
400 Bad Request |
POST, PUT |
Date falling within locked period setup in company preferences |
|
400 Bad Request |
POST, PUT |
Decimal precision error on Total field |
|
400 Bad Request |
PUT |
Trying to change supplier on existing Order |
|
400 Bad Request |
DELETE |
Delete Order with payments |
|
400 Bad Request |
POST, PUT |
Update or Delete an Order with Status "ConvertedToBill" |
|
400 Bad Request |
/Purchase/Order/Professional
HTTP Method | Scenario | Expected Message | HTTP Status Code |
POST, PUT |
Required fields not supplied |
|
400 Bad Request |
PUT |
Incorrect RowID on line |
|
400 Bad Request |
PUT |
Updating line Type ie: "Transaction" to "Header" |
|
400 Bad Request |
POST, PUT |
Date prior to beginning of financial year |
|
400 Bad Request |
POST, PUT |
Date falling within locked period setup in company preferences |
|
400 Bad Request |
POST, PUT |
Decimal precision error on Total field |
|
400 Bad Request |
PUT |
Trying to change supplier on existing Order |
|
400 Bad Request |
DELETE |
Delete Order with payments |
|
400 Bad Request |
POST, PUT |
Update or Delete an Order with Status "ConvertedToBill" |
|
400 Bad Request |
/Purchase/Order/Miscellaneous
HTTP Method | Scenario | Expected Message | HTTP Status Code |
POST, PUT |
Required fields not supplied |
|
400 Bad Request |
PUT |
Incorrect RowID on line |
|
400 Bad Request |
POST, PUT |
Date prior to beginning of financial year |
|
400 Bad Request |
POST, PUT |
Date falling within locked period setup in company preferences |
|
400 Bad Request |
POST, PUT |
Decimal precision error on Total field |
|
400 Bad Request |
PUT |
Trying to change supplier on existing Order |
|
400 Bad Request |
DELETE |
Delete Order with payments |
|
400 Bad Request |
POST, PUT |
Update or Delete an Order with Status "ConvertedToBill" |
|
400 Bad Request |
/Purchase/DebitSettlement/
HTTP Method | Scenario | Expected Message | HTTP Status Code |
POST |
Zero AmountApplied |
|
400 Bad Request |
POST |
Debit settlement applied to Purchase of Status Debit |
|
400 Bad Request |
POST |
Over payments |
|
400 Bad Request |
POST |
Supplier.UID does not match with the supplier on DebitFromBill |
|
400 Bad Request |
/Purchase/DebitRefund/
HTTP Method | Scenario | Expected Message | HTTP Status Code |
POST |
Bill to refund not in Status: Debit |
|
400 Bad Request |
POST |
Over payments |
|
400 Bad Request |
POST |
Supplier.UID does not match with the supplier on Bill |
|
400 Bad Request |
POST |
Account.UID is not same as UndepositedFunds Linked Account.UID |
|
400 Bad Request |
/Inventory/Item/
HTTP Method | Scenario | Expected Message | HTTP Status Code |
PUT |
Occurs when trying to modify the “ItemsPerBuyingUnit” and “ItemsPerSellingUnit” fields after the item has been used in a Sale or Purchase transaction. |
|
400 Bad Request |
PUT |
Change IsBought to false for an Item used on purchases |
|
400 Bad Request |
PUT |
Change IsSold to false for an Item used on sales |
|
400 Bad Request |
PUT |
Change IsInventoried to false for an Item with journal entries |
|
400 Bad Request |
DELETE |
Item used in sale or purchase transaction |
|
400 Bad Request |
DELETE |
Item with x number of items in Inventory |
|
400 Bad Request |
DELETE |
Item with Inventory transactions |
|
400 Bad Request |
POST, PUT |
ExpenseAccount.UID not supplied for Item with IsBought: True and IsInventoried: False |
|
400 Bad Request |
POST, PUT |
CostOfSalesAccount.UID not supplied for Item when IsBought: False, IsSold: True and IsInventoried: True |
|
400 Bad Request |
POST, PUT |
CostOfSalesAccount.UID not supplied for Item when IsBought: True, IsSold: True and IsInventoried: True |
|
400 Bad Request |
POST, PUT |
IncomeAccount.UID not supplied for Item with IsSold: True |
|
400 Bad Request |
POST, PUT |
AssetAccount.UID not supplied for Item with IsInventoried: True |
|
400 Bad Request |
/Inventory/ItemPriceMatrix/
HTTP Method | Scenario | Expected Message | HTTP Status Code |
PUT |
Invalid price level supplied ie: Level G |
|
400 Bad Request |
PUT |
Duplicate QuantityOver values |
|
400 Bad Request |
PUT |
Update without including QuantityOver: 0 |
|
400 Bad Request |
/Inventory/Adjustment/
HTTP Method | Scenario | Expected Message | HTTP Status Code |
POST, PUT |
Adjustment results in negative inventory |
|
400 Bad Request |
POST, PUT |
Adjusting a non-inventoried item |
|
400 Bad Request |
/Banking/SpendMoneyTxn/
HTTP Method | Scenario | Expected Message | HTTP Status Code |
POST, PUT |
Contact required when PayFrom is ElectronicPayments
|
400 Bad Request | |
POST, PUT |
Cannot pay customer contact from Electronic Payments account |
|
400 Bad Request |
POST, PUT |
Category tracking is required |
|
400 Bad Request |
PUT |
Updating reconciled transaction |
|
400 Bad Request |
/Banking/ReceiveMoneyTxn/
HTTP Method | Scenario | Expected Message | HTTP Status Code |
POST |
Account.UID is not same as UndepositedFunds Linked Account.UID |
|
400 Bad Request |
POST, PUT |
Category tracking is required |
|
400 Bad Request |
PUT |
Updating reconciled transaction |
|
400 Bad Request |
/Banking/TransferMoneyTxn/
HTTP Method | Scenario | Expected Message | HTTP Status Code |
POST |
Posting Zero or Negative amount |
|
400 Bad Request |
POST |
Using the same FromAccount UID for ToAccount UID |
|
400 Bad Request |
POST |
AccountType of FromAccount isn't Bank or Credit Card |
|
400 Bad Request |
POST |
AccountType of ToAccount isn't Bank or Credit Card |
|
400 Bad Request |
/Payroll/Timesheet/
HTTP Method | Scenario | Expected Message | HTTP Status Code |
PUT |
'I Use Timesheet..." preference not enabled |
|
400 Bad Request |
PUT |
'I Use Timesheet..." preference enabled for Payroll only |
|
400 Bad Request |
PUT |
'I Use Timesheet..." preference enabled for Payroll only |
|
400 Bad Request |
PUT |
Activity of "Type: Non-Hourly" supplied |
|
400 Bad Request |
PUT |
StartDate is dated after EndDate |
|
400 Bad Request |
PUT |
Date on entries outside range of 'StartDate' and 'EndDate' |
|
400 Bad Request |
PUT |
Timesheet has been processed |
|
400 Bad Request |
PUT |
PayrollWageCategory used NOT assigned to employee |
|
400 Bad Request |
PUT |
PayrollWageCategory used not 'WageType: Hourly' |
|
400 Bad Request |
PUT |
PayrollCategory.UID not supplied |
|
400 Bad Request |
PUT |
StartDate not supplied |
|
400 Bad Request |
PUT |
EndDate not supplied |
|
400 Bad Request |
PUT |
Line entries date not supplied |
|
400 Bad Request |
PUT |
Employee not supplied |
|
400 Bad Request |
/Contact/Employee/
HTTP Method | Scenario | Expected Message | HTTP Status Code |
PUT,POST |
Updating a contact card where the state field is required. From 2018.1, the state field is required if the address Country field is blank or set to "Australia" |
|
400 Bad Request |
/GeneralLedger/GeneralJournal/
HTTP Method | Scenario | Expected Message | HTTP Status Code |
PUT |
Updating General Journal entry that has been reconciled |
|
400 Bad Request |
/TimeBilling/Activity/
HTTP Method | Scenario | Expected Message | HTTP Status Code |
POST, PUT |
Not passing ChargeableDetails when Status = Chargeable |
|
400 Bad Request |