import_id
If the Transaction was imported, this field is a unique (by account) import identifier. If this transaction was imported through File Based Import or Direct Import and not through the API, the import_id will have the format: 'YNAB:[milliunit_amount]:[iso_date]:[occurrence]'. For example, a transaction dated 2015-12-30 in the amount of -$294.23 USD would have an import_id of 'YNAB:-294230:2015-12-30:1’. If a second transaction on the same account was imported and had the same date and same amount, its import_id would be 'YNAB:-294230:2015-12-30:2’.
So whether your transactions were imported via file, YNAB auto-import, or via API some other way, import_id is the only property a YNAB transaction has for holding a unique ID generated by YNAB or the bank.
Answering my own question from #12.
I believe that mapping is safe. I've implemented it in this tiny PR.
From YNAB's API docs:
So whether your transactions were imported via file, YNAB auto-import, or via API some other way,
import_id
is the only property a YNAB transaction has for holding a unique ID generated by YNAB or the bank.