Create Import
POST /imports/proposalLineItems
/imports/proposalLineItemsRequired Tokens
| Field | Type | Required | Description |
|---|---|---|---|
| Bearer | Authorization: Bearer <api-key> | Optional | Your API key. Pass it as the Bearer token on every request. |
| Event token | x-Event-Token | Optional | Run **Get Tokens** in the Authorization folder, or call `GET /Events/{eventId}/authorize` manually. |
Creates the Import, resolves every row's planned outcome, and returns the plan. Writes no entity
data — nothing lands on the proposal until Execute Import is called.
The plan is persisted, so execute redeems exactly what was reviewed rather than re-sending the rows.
This request stores importId for the follow-on calls in this folder.
The sample body exercises all three outcomes: row 2 imports, row 3 is the shape of a section heading (a name with no numbers anywhere) and is skipped, and row 4 has an unreadable number and is skipped with the offending column named.
Requires EventAdmin permission on the event.
Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| contextId | Guid | Optional | The proposal the lines land on. Required for this target. |
| fileName | string | Required | Echoed in the wizard header and the receipt. |
| uniqueAttributeKey | string | Optional | The attribute rows are matched on. Null means every row creates. Must name a **mapped** attribute whose schema entry has `canBeUnique`. Proposal line items reject any value — they are create-only. |
| mapping[].fileColumn | string | Required | The header text as it appeared in the file. |
| mapping[].attributeKey | string | Required | A key from **Get Import Schema**. Each may be mapped only once. |
| mapping[].attributePath | string | Optional | Display snapshot only; never used to resolve the attribute. |
| rows[].rowNumber | int | Required | The line number in the user's file. Echoed in the report, never used as a key. |
| rows[].values | object | Required | Cell text keyed by **file column**, not by attribute key. |
| excludedValues | array | Optional | `{ attributeKey, rawValue }`. Every row carrying that value skips as `ExcludedByUser`. Omitted here because no proposal attribute has a reviewable value domain — see **Create Events Import**. |
| valueOverrides | array | Optional | `{ attributeKey, rawValue, value }`. The user's correction of a raw value; `rawValues` still records what the file said. Same note as above. |
Response
Returns the same shape as Get Import, with every row result and executedDate still null.
Errors
| Status | Meaning |
|---|---|
400 | Unknown target, no rows, more than 2,000 rows, an attribute mapped twice, a unique key that is not mapped, an excludedValues or valueOverrides entry naming an unmapped attribute, an archived event type, or a price-locked proposal. |
404 | The proposal or event type named by contextId does not exist in this scope. |
Row cap: 2,000. The wizard refuses a larger file at parse time, but this check is the enforcement — the API is safe on its own.