Request schema for partially updating a quote version (PATCH semantics)
Supports consolidated updates to both version fields AND line items in a single request.
Only fields provided in the request will be updated. Uses exclude_unset=True
in service layer to apply partial updates.
Example - Version fields only:
{
"name": "Updated Quote Name",
"discounts": [{"type": "percentage", "value": 10}]
}
Example - Version fields + line items (consolidated with smart union):
{
"name": "Updated Quote Name",
"line_items": [
{
"id": "existing-uuid",
"quantity": [{"value": 200, "effective_from": "2025-01-01"}]
}, // UPDATE (has id, no delete)
{
"product_id": "new-product-uuid",
"pricing_id": "pricing-uuid"
}, // CREATE (has product_id, no id)
{
"id": "delete-uuid",
"delete": true
} // DELETE (has id + delete: true)
]
}
State Constraints:
- Editable in DRAFT status (both modes)
- Editable in PENDING_APPROVAL (approval-based mode only)
- Not editable in SENT, ACCEPTED, or later states