Docs

Create Import Mapping

POST /importMappings

POST/importMappings

Required Tokens

FieldTypeRequiredDescription
BearerAuthorization: Bearer <api-key>OptionalYour API key. Pass it as the Bearer token on every request.
Event tokenx-Event-TokenOptionalRun **Get Tokens** in the Authorization folder. Required for the `proposalLineItems` target.
Organization tokenx-Organization-TokenOptionalRun **Get Tokens** in the **Organization API** collection, then set `orgToken` as a variable here. Required for the `events` target instead.

Saves a column mapping for reuse. Stores it against the caller's organization, never against one event — so the mapping is available the next time the same file shape arrives, whichever event it lands on.

The permission is the target'sEventAdmin for proposalLineItems, OrganizationAdmin for events.

Body

FieldTypeRequiredDescription
targetstringRequiredMatched case-insensitively; stored canonically. A mapping is target-specific and is never offered for another target.
namestringRequiredNon-empty. Names are not required to be unique.
configurationstringRequiredNon-empty. **Opaque to this API** — stored and returned byte for byte, never parsed. The client owns the shape.
isDefaultboolOptionalSetting it clears the flag from whichever mapping held it for this target and organization.

What belongs in configuration

Not enforced here, but the shape the wizard writes:

{
  "contextId": null,
  "uniqueAttributeKey": "attr:0198...",
  "columns": [
    { "fileColumn": "Ref", "attributeKey": "attr:0198...", "attributeLabel": "Client Ref" }
  ]
}
KeyWhy it is there
contextIdThe event type the mapping was built against, since event attributes are defined per type. null is legal.
uniqueAttributeKeySaving the match key matters as much as saving the columns — re-picking it every month is the same friction.
columns[].attributeKeyWhat resolution matches on.
columns[].attributeLabelA display snapshot, so a mapping that no longer resolves can still name the attribute it lost. Never used for matching.

Exclusions and value overrides are deliberately not stored. Those are judgements about one file's contents; a mapping is about column shape, and next month's file has different rows.

Response

{ "id": "0198f2c1-..." }

The id is returned rather than a bare 201 so a client can select the mapping it just saved. Captured into the importMappingId variable by this request's post-response script.

Only one default per target

The default is applied automatically when a file is uploaded for that target, so at most one can hold it. Setting it here clears the previous holder for the same target and organization; a default on a different target is untouched.

Errors

StatusMeaning
400target is not a registered import target, or name or configuration is empty.
403The caller lacks the target's declared permission.