Import mappings
With the move from the old Moneybird to the new Moneybird, all ids of entities in an administration have changed. Some API developers might have saved old ids in their database. In order for them to keep querying our API with the right ids, we have added an API for the import mappings. By querying the import mapping API, you can transform old ids to new ids in the new Moneybird. This should be a one-time conversion, this API will not be indefinitely available.
List all import mappings for the given type
Returns a list of mappings from old ids to new ids for the given type.
Type
should be any of: financial_account bank_mutation contact document_attachment general_journal identity
incoming_invoice attachment payment history invoice_attachment transaction ledger_account
tax_rate product print_invoice recurring_template invoice workflow document_style
Parameters
Parameter | Type | Description |
---|---|---|
type |
Symbol |
Required |
Example: returns all import mappings of an administration for the given type
Request
curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
-XGET \
https://moneybird.com/api/v2/123/import_mappings/invoice.json?
Response
Status: 200 OK
[
{
"administration_id": 123,
"entity_type": "invoice",
"old_id": 21312,
"new_id": "111503236562683663"
}
]
Returns the import mapping for the given type and id
Returns a single mapping from the given type and id to a new id in the new MoneyBird. The given id can be both an old id or a new id, in both cases the correct mapping will be returned.
Type
should be any of: financial_account bank_mutation contact document_attachment general_journal identity
incoming_invoice attachment payment history invoice_attachment transaction ledger_account
tax_rate product print_invoice recurring_template invoice workflow document_style
Parameters
Parameter | Type | Description |
---|---|---|
type |
Symbol |
Required |
Example: returns the import mapping of the given id, given an old id
Request
curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
-XGET \
https://moneybird.com/api/v2/123/import_mappings/invoice/21312.json?
Response
Status: 200 OK
{
"administration_id": 123,
"entity_type": "invoice",
"old_id": 21312,
"new_id": "111503236562683663"
}
Example: returns the import mapping of the given id, given the new id
Request
curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
-XGET \
https://moneybird.com/api/v2/123/import_mappings/invoice/111503236562683663.json?
Response
Status: 200 OK
{
"administration_id": 123,
"entity_type": "invoice",
"old_id": 21312,
"new_id": "111503236562683663"
}
Example: returns a 404 when the mapping does not exist
Request
curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
-XGET \
https://moneybird.com/api/v2/123/import_mappings/invoice/312.json?