# MYOB — Accounting API: gotchas

> Canonical URL: https://developers.apideck.com/apis/accounting/myob/gotchas

## POST /accounting/bills

MYOB requires a `FreightTaxCode` on bill create and update. Apideck sends the tax rate of the first line item (`line_items[0].tax_rate.id`), so every bill must include at least one line item with a `tax_rate.id`.

MYOB stores bills in layout-specific endpoints (Service, Item, Professional, Miscellaneous). On create, Apideck routes to the Item layout when any line item references an inventory item (`line_items[].item.id`) and to the Service layout otherwise. The returned `id` encodes the layout, so always use ids returned by the API.

On update, MYOB requires optimistic-locking versions: pass the bill's current `row_version` and, for every existing line, its `row_id` and `row_version` (all returned by a get call). Updates and deletes are only supported for Service and Item layout bills.

MYOB does not return the company file's base currency on bill records, so domestic bills (no foreign currency set) are reported with `currency: AUD`. For an NZD-based company file, treat the reported currency of domestic bills as the file's base currency, or read the raw payload via `raw=true`.

`filter[status]` is coarser than the unified enum. MYOB stores only `Open`, `Closed` and `Debit`, so `unpaid` and `partially_paid` both map to `Open` and return the **same** result set — they cannot be distinguished server-side. `paid` maps to `Closed`. To separate unpaid from partially paid, compare `balance` against `total` on the returned records.

For the same reason a partially-paid bill reads back as `status: submitted`, not `partially_paid` — MYOB's `Open` covers submitted, draft and partially paid, and the response mapping resolves it to `submitted`. Use `balance` versus `total` to detect partial payment.

## GET /accounting/credit-notes

MYOB AccountRight has no dedicated credit note endpoint. Credit notes are MYOB Sale/Invoice records with Status "Credit" (a negative balance), so credit notes share the invoice id space and numbering — the same record is visible through both the invoices and credit-notes resources.

MYOB stores credit amounts as negative numbers. Unified `total_amount`, `sub_total`, `total_tax`, `balance` and `remaining_credit` are normalized to positive values; `line_items` amounts are passed through as returned by MYOB (negative for credit lines).

Line items are only available on the detail endpoint (get one), not on the list endpoint.

Write operations (create, update, delete) are not supported on the credit-notes resource. Create a credit note via the invoices endpoint with negative line amounts — MYOB then sets its Status to "Credit" — and update or delete the underlying invoice record the same way.

## GET /accounting/bill-credit-notes

MYOB AccountRight has no dedicated bill credit note endpoint. Bill credit notes are MYOB Purchase/Bill records with Status "Debit" (a negative balance), so they share the bill id space and numbering — the same record is visible through both the bills and bill-credit-notes resources.

MYOB stores credit amounts as negative numbers. Unified `total_amount`, `sub_total`, `total_tax`, `balance` and `remaining_credit` are normalized to positive values; `line_items` amounts are passed through as returned by MYOB (negative for credit lines).

Line items are only available on the detail endpoint (get one), not on the list endpoint.

Write operations (create, update, delete) are not supported on the bill-credit-notes resource. Create a bill credit note via the bills endpoint with negative line amounts — MYOB then sets its Status to "Debit". Update and delete of the underlying bill are supported only for Service and Item layout bills (pass the bill's current `row_version`); MYOB's Purchase/Bill Professional and Miscellaneous layouts are read-only, so a credit note on those layouts cannot be updated or deleted through the connector.

## POST /accounting/suppliers

`tax_rate.id` is required: MYOB needs a purchase tax code on every supplier, and it is also used as the freight tax code. `currency` is not set on create. Only one bank account is stored; its `account_name` is saved in uppercase and may hold up to 32 letters, digits, spaces and `- / * & .`.
`tax_number` is saved as the Australian ABN when it has 11 digits (spaces allowed), and as MYOB's Tax ID number otherwise. Reads return the ABN when the supplier has one, otherwise the Tax ID number.
MYOB stores up to five addresses by position and keeps no address type: the `primary` address becomes the first, `secondary` the second, and any other address follows them. Addresses read back by position — the first as `primary`, the second as `secondary` and the rest as `other` — so a `billing` or `shipping` address sent with a `primary` one reads back as `secondary`. Only `line1`, `city`, `state`, `postal_code`, `country`, `phone_number`, `fax`, `email`, `website`, `contact_name` and `salutation` are stored; `line2` to `line4` and other address fields are ignored, and an address with none of the stored fields is rejected with a `400`. Address `id` values are ignored on create.
`emails` and `websites` accept `primary` and `secondary`; `phone_numbers` also accepts `mobile` and `fax`, which are stored on the primary address. A `secondary` address, email, website or phone number needs something stored on the first address in the same request: a `primary` address, a `primary` email, website or phone number, or a `mobile` or `fax` number. Requests MYOB cannot represent, such as more than five addresses or two `primary` emails, are rejected with a `400`.

## PATCH /accounting/suppliers/{id}

Only the fields you send change; everything else on the supplier, including details the unified model does not expose, is kept. To do this, each update first reads the supplier (two MYOB calls), so the application also needs read consent on suppliers; without it the update returns `403`. If the supplier cannot be read, nothing is sent: `404` when it does not exist, the error MYOB returned (for example `401` or `429`), or `503` for a temporary failure that can be retried. `row_version` is optional; a stale one returns `409`. `currency` is not updated, and a field cannot be cleared by sending it empty or `null`. Changing `tax_rate` changes the purchase tax code only; the freight tax code keeps its value. `tax_number` is written as on create: to the ABN when it has 11 digits, otherwise to the Tax ID number. Reads return the ABN first, so writing a Tax ID number removes a stored ABN.
Each address has an `id` that is its position (`"1"` to `"5"`): send it to change that address. An `id` that does not exist on the supplier, is not written as the read returns it, or whose `type` names another position returns `400`. Without an `id`, a `primary` or `secondary` address changes the first or second address, and any other address is added after the existing ones, so retrying that request adds it again; an update that would leave more than five addresses returns `400`. Addresses cannot be removed. Address fields, contact and bank-account rules are the same as on create.

## POST /accounting/payments

MYOB payments cannot be updated — the MYOB API allows only GET, POST and DELETE on customer payments, so the update operation is unsupported. Delete the payment and recreate it instead.

## PATCH /accounting/journal-entries/{id}

MYOB has no draft or pending-approval workflow for journal entries — every entry posts immediately
on create, so `status` is always `posted`.

Updates replace the whole record rather than patching individual fields: `posted_at`, `line_items`
and `row_version` must all be sent on every update, even to change only `memo`. `row_version` must
be the value most recently returned for that entry — a stale or missing value is rejected.

## GET /accounting/attachments/{reference_type}/{reference_id}

Attachments are supported on bills only. MYOB has no attachment support on invoices,
credit notes, or other records. The `reference_id` must be the layout-encoded bill ID
returned by the bills resource (base64 JSON with `id` and `type` fields where type is
service, product, professional, or misc).

`attachmentsOne` (get single attachment) is unsupported — MYOB exposes no per-attachment
read endpoint (a GET on a single attachment returns 405). Use `attachmentsAll` to list
attachments for a bill and select the file by id or name.

`attachmentsDownload` is unsupported — use the `file_url` from `attachmentsAll` to
download files. MYOB provides presigned S3 URLs in the attachment list response. Two
caveats on those URLs: responses are gzip-encoded (use a client that auto-decompresses,
e.g. `curl --compressed`), and for image uploads MYOB may serve a PDF rendition of the
stored file rather than the original image bytes, while `name` keeps the original
extension. PDFs are returned byte-identical.

`mime_type`, `size`, `created_at` and `updated_at` are always null — MYOB's attachment
object does not carry them.

## POST /accounting/attachments/{reference_type}/{reference_id}

Uploads are supported on bills only — MYOB has no attachment API for invoices, credit
notes, or other records; a non-bill `reference_type` is rejected with a clear error. The
`reference_id` must be the layout-encoded bill ID returned by the bills resource; a raw
MYOB UID is rejected because the bill layout cannot be derived from it. Repeat uploads of
the same file name create separate attachments (MYOB does not deduplicate or replace).

MYOB accepts only .pdf, .tiff, .jpg, .jpeg and .png files, requires the file name to
carry one of those extensions, and validates the extension against the actual content.
Text content types (`text/*`) are rejected upfront: they would be re-encoded as UTF-8,
which corrupts binary files. Send the file's real content type (e.g. application/pdf).
When no `x-apideck-metadata` name is provided, a name is derived from the content type.

The upload response returns the created attachment's `id` and `name` but no `file_url` —
MYOB does not include download URLs on the create response. Fetch the attachment list to
obtain the presigned `file_url`.

## DELETE /accounting/attachments/{reference_type}/{reference_id}/{id}

Deletes are supported on bills only, and the `id` must belong to the bill named by
`reference_id`. An id from a different bill returns `404` rather than deleting it —
MYOB's own API deletes by attachment id alone, so Apideck verifies ownership before
forwarding the delete. The delete removes the file itself, not just the link.

## POST /accounting/bill-payments

MYOB supplier payments cannot be updated — the update operation is unsupported. Delete the payment and recreate it instead.

`allocations[].id` accepts either a bill id returned by the bills resource (layout-encoded) or a raw MYOB purchase UID. In responses, `allocations[].id` contains the raw MYOB purchase UID.

MYOB does not return the company file's base currency on payment records, so domestic payments (no foreign currency set) are reported with `currency: AUD` and `currency_rate: 1.0`. For an NZD-based company file, treat the reported currency of domestic payments as the file's base currency.

## GET /accounting/expenses

MYOB expenses are Spend Money transactions (Banking > Spend Money). `type` is always `expense` (money received back is a Receive Money transaction in MYOB, which this resource does not return), so `filter[type]=refund` returns an empty list. `status` is not returned: MYOB has no draft or void state for Spend Money. `filter[updated_since]` and `filter[status]` are not supported: MYOB keeps no last-modified date on Spend Money, so a change-based filter cannot be honoured.
`account` is the pay-from account (`type: bank_account`). For an Electronic Payments transaction it is MYOB's Electronic Clearing Account. `payment_type` is `credit_card` when the expense was paid from a MYOB Credit Card account and null otherwise (a bank account does not say whether money left as cash, cheque or transfer). It is read from the account list, which costs one extra MYOB call per request. If that lookup fails, `payment_type` is null and `meta.warnings` says so.
`supplier` is the payee and can be any MYOB contact: a supplier, customer, employee or personal contact, so `supplier.id` is not always found by `GET /accounting/suppliers/{id}`. Header `tracking_categories` is the MYOB category and line `tracking_categories` is the MYOB job. `sub_total` is `total_amount - total_tax`; `total_amount` is always tax-inclusive.

## POST /accounting/expenses

MYOB expenses are created as Spend Money transactions. `account.id` (or the deprecated `account_id`) is required and must be a MYOB Bank or Credit Card account (any other account returns `400 AccountIdNotBankType`). Every line needs `line_items[].account.id` (or the deprecated `line_items[].account_id`) and `line_items[].tax_rate.id` (a MYOB tax code); a line amount has at most 2 decimal places and a line `description` at most 1000 characters. `line_items[].total_amount` is gross when `tax_inclusive` is true and net when it is false or left out (MYOB's default). The lines must not add up to a negative total. Each of these is refused with `400` naming the field, as is `type: refund`: Spend Money records money paid out only.
`supplier` can be any MYOB contact (supplier, customer, employee or personal); MYOB fills the payee address from it. `number` is the payment number (max 13 characters) and is auto-numbered when left out; `memo` is at most 255 characters. Only the calendar date of `transaction_date` is used, as written (`2026-11-29T08:00:00+11:00` is 29 November). `currency` cannot be set (MYOB uses the pay-from account's currency) and reads as `AUD` unless the company file uses multi-currency. Electronic Payments transactions cannot be created. The first header `tracking_categories` id is sent as the MYOB category and needs category tracking switched on in the MYOB company file. These are ignored: the header `total_amount`, `total_tax` and `sub_total` (MYOB calculates them), `payment_type`, `reference`, and line `tax_amount` and `unit_price`.

## GET /accounting/expenses/{id}

MYOB expenses are Spend Money transactions (Banking > Spend Money). `type` is always `expense` (money received back is a Receive Money transaction in MYOB, which this resource does not return), so `filter[type]=refund` returns an empty list. `status` is not returned: MYOB has no draft or void state for Spend Money. `filter[updated_since]` and `filter[status]` are not supported: MYOB keeps no last-modified date on Spend Money, so a change-based filter cannot be honoured.
`account` is the pay-from account (`type: bank_account`). For an Electronic Payments transaction it is MYOB's Electronic Clearing Account. `payment_type` is `credit_card` when the expense was paid from a MYOB Credit Card account and null otherwise (a bank account does not say whether money left as cash, cheque or transfer). It is read from the account list, which costs one extra MYOB call per request. If that lookup fails, `payment_type` is null and `meta.warnings` says so.
`supplier` is the payee and can be any MYOB contact: a supplier, customer, employee or personal contact, so `supplier.id` is not always found by `GET /accounting/suppliers/{id}`. Header `tracking_categories` is the MYOB category and line `tracking_categories` is the MYOB job. `sub_total` is `total_amount - total_tax`; `total_amount` is always tax-inclusive.

## PATCH /accounting/expenses/{id}

MYOB replaces the whole transaction on update, so the connector reads the current expense first and keeps every field you do not send. Sending `null` clears `memo` and `supplier`. Changing `supplier` lets MYOB refill the payee address from the new contact; clearing it keeps the previous payee address, because MYOB does not update the address without a contact. `number` sent as `null` or `""` keeps the current payment number.
Sending `line_items` replaces all lines: include a line's `id` (from a read) to keep and change that line, leave `id` out to add a line, and omit a line to delete it. Fields you leave out of a kept line keep their current values; send a line's `tracking_categories: []` (or `null`) to remove its job (the same on the header removes the category), and `description: null` or `quantity: null` to clear them. Changing only `tax_inclusive` reinterprets the current line amounts as gross or net, so the amount paid changes. `row_version` is optional; a stale one returns MYOB's `409`. A line `id` that is not on the expense, or the same `id` twice, returns `400`, as do an empty `line_items`, `type: refund` and lines adding up to a negative total (summing the merged line amounts).


[API reference](https://developers.apideck.com/apis/accounting/reference.md) · [Coverage matrix](https://developers.apideck.com/apis/accounting/coverage)
