create_mapping
Map CSV columns or constant values to Importer target fields for entities like Journal Entry, Bill, or Invoice. Returns the created mapping with its ID.
Instructions
Creates a new field mapping for an entity (e.g. 'Journal Entry', 'Bill', 'Invoice'). Look up valid target fields with get_fields first. Returns the created mapping including its id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| companyId | Yes | Company id from list_companies. | |
| title | Yes | Human-readable mapping name. | |
| entityName | Yes | Entity this mapping targets — must match list_entities output (e.g. 'Journal Entry'). | |
| fields | Yes | Field mappings. Each entry maps a CSV column or a constant to an Importer target field. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Mapping id. | |
| title | Yes | Mapping name. | |
| entityName | Yes | Entity this mapping targets. | |
| fields | Yes | Persisted field entries. | |
| createdAt | No | ISO timestamp. | |
| updatedAt | No | ISO timestamp. |