Docs

Create Import

POST /imports/proposalLineItems

POST/imports/proposalLineItems

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, 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

FieldTypeRequiredDescription
contextIdGuidOptionalThe proposal the lines land on. Required for this target.
fileNamestringRequiredEchoed in the wizard header and the receipt.
uniqueAttributeKeystringOptionalThe 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[].fileColumnstringRequiredThe header text as it appeared in the file.
mapping[].attributeKeystringRequiredA key from **Get Import Schema**. Each may be mapped only once.
mapping[].attributePathstringOptionalDisplay snapshot only; never used to resolve the attribute.
rows[].rowNumberintRequiredThe line number in the user's file. Echoed in the report, never used as a key.
rows[].valuesobjectRequiredCell text keyed by **file column**, not by attribute key.
excludedValuesarrayOptional`{ 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**.
valueOverridesarrayOptional`{ 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

StatusMeaning
400Unknown 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.
404The 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.