POST/Orders/{orderId}/versions
Creates a revision of the order as it is now, or updates the latest one in place when it was never sent and
nothing prices it (200 with replaced true); otherwise appends one (201). Either way the order resets to Draft.
Refused when there is nothing to create (no lines, or no change since the latest revision), when the order is
Paid, or when it is Abandoned or Canceled (reopen first). An event order whose type has documents needs
orderTypeDocumentId (from Orders_GetOrder's type documents), refused while a required input has no value; organization
orders take no document. Nothing else creates a revision: edits never do. An event order's revision freezes each
line's rate as Orders_GetOrder shows it: per-period unitAmount, lineTotal, ratePeriod, resolvedRateCardId and fills.
Works the same on an organization-level order (org token, resource inventory edit), and on an event order of the
organization's active events (org token, order edit).
Path Parameters
| Field | Type | Required | Description |
|---|
| orderId | uuid | Required | |
Request Body
| Field | Type | Required | Description |
|---|
| orderTypeDocumentId | uuid | Optional | |
Response
| Field | Type | Description |
|---|
| versionId | uuid | |
| number | integer | |
| replaced | boolean | |