POST/extractions/{extractionId}/commit
Turns a reviewed extraction into its result in one transaction and marks it Committed; allowed only from Ready
or Flagged. For an order extraction, send no body: it creates the quote or invoice document with its groups,
lines and adjustments (the document type must be Quote or Invoice, else it is refused with "Choose Quote or Invoice before committing to an order."; the header's vendor must be set, there must be at least one line, and any line marked
ToCreate needs its resource created first) and returns the document id with counts; accepted rate card decisions
update the card the latest revision priced the line with, at Line pricing level, and overridden matches are remembered for the vendor. For an expense
extraction, send the accepted name, date and lines, at least one value, and they are added to the expense; a negative line amount (a discount or credit) is accepted.
Needs Order.Edit on its order (Expense.Edit at the event for an expense extraction).
Path Parameters
| Field | Type | Required | Description |
|---|
| extractionId | uuid | Required | |
Request Body
| Field | Type | Required | Description |
|---|
| name | string | Optional | |
| date | date-time | Optional | |
| lines | CommitFinancialDocumentExtractionRequestAcceptedLine[] | Optional | |
| Field | Type | Description |
|---|
| description | string| null | |
| amount | number | |
Response
| Field | Type | Description |
|---|
| orderDocumentId | uuid| null | |
| expenseId | uuid| null | |
| lineCount | integer | |
| groupCount | integer | |
| adjustmentCount | integer | |
| rateCardsUpdated | integer | |