Create or replace an accounting mapping
Automatically code one dimension for everything from a source, such as a card or merchant.
applyToExistingEntries to also recode entries still in review. On platforms that keep account mappings per subsidiary, such as NetSuite, an account mapping for an account or accounts_payable source applies to the connection’s default subsidiary; every other mapping applies to the whole connection.Authorizations
User API key authentication. Create a key under Settings → API keys in the Slash dashboard (https://app.slash.com/global-settings/api-keys) and send the x-legal-entity header naming the legal entity to act on with every request. Keys scoped to a legal entity are rejected with 403 user_api_key_required.
Headers
Body
Create or replace the mapping of one source for one dimension. Exactly one of valueId (platform and generic dimensions) or customFieldValue (custom-field dimensions) is required.
Also re-code existing entries whose transactions match the source, in the background. Only entries still in_review change; anything already synced or ready to sync is left alone. Has no effect on an accounts_payable mapping, which is read when a bill syncs. Defaults to false, which only affects entries created from now on.
Response
The mapping as stored.
A rule that codes one dimension automatically: whenever an entry's transaction involves the source, the entry gets the mapped value for dimensionKey. An account source codes the fixed, cash-side line of its transactions; every other source codes the editable lines, and accounts_payable sets the account bills are posted to when they sync. Sources are things you can already list through the API (accounts, cards, merchants, recipients, ...); the value is a dimension value id, or for custom-field dimensions the raw field value. One source maps each dimension at most once, so writing the same source and dimension again replaces the earlier mapping.