Skip to main content
PATCH
/
quotes
/
{quote_id}
Update quote version
curl --request PATCH \
  --url https://api.zenskar.com/quotes/{quote_id} \
  --header 'Content-Type: application/json' \
  --header 'organisation: <api-key>' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "currency": "<string>",
  "start_date": "2023-12-25",
  "end_date": "2023-12-25",
  "valid_from": "2023-12-25",
  "valid_until": "2023-12-25",
  "discounts": [
    {
      "type": "fixed",
      "unit_amount": 123,
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "identifier": "<string>",
      "priority": 123,
      "pricing_period": {
        "cadence": "<string>"
      },
      "label": "<string>"
    }
  ],
  "taxes": [
    {
      "type": "manual",
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "identifier": "<string>",
      "priority": 123,
      "label": "<string>",
      "code": "<string>",
      "unit_amount": 123
    }
  ],
  "custom_data": {},
  "version_metadata": {},
  "line_items": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "delete": true
    }
  ]
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "quote_number": "<string>",
  "quote_mode": "approval-based",
  "organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "business_entity_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "current_version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "current_version": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "quote_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "version_number": 123,
    "name": "<string>",
    "currency": "<string>",
    "status": "draft",
    "quote_type": "new_business",
    "valid_from": "2023-12-25",
    "start_date": "2023-12-25",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "description": "<string>",
    "valid_until": "2023-12-25",
    "validity_config": {},
    "end_date": "2023-12-25",
    "estimate": {},
    "provisioning_config": {},
    "contract_payment_config": {},
    "payment_method_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "contract_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "discounts": [
      {}
    ],
    "taxes": [
      {}
    ],
    "line_items": [],
    "version_metadata": {},
    "created_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  },
  "custom_data": {},
  "created_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}

Documentation Index

Fetch the complete documentation index at: https://docs2.zenskar.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

x-api-key
string
header
default:<your-api-key>
required
organisation
string
header
default:<your-organisation-id>
required

Path Parameters

quote_id
string<uuid>
required

Body

application/json

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

name
string | null

Quote name/title

Required string length: 1 - 255
description
string | null

Detailed quote description

currency
string | null

ISO 4217 currency code (e.g., USD, EUR, GBP)

Required string length: 3
start_date
string<date> | null

Service/subscription start date

end_date
string<date> | null

Service/subscription end date (optional)

valid_from
string<date> | null

Quote validity start date

valid_until
string<date> | null

Quote validity end date (optional)

discounts
Discount · object[] | null

Quote-level discounts (supplements line item discounts)

taxes
Taxes · object[] | null

Quote-level taxes (supplements line item taxes)

custom_data
Custom Data · object

Custom data for this quote version

version_metadata
Version Metadata · object

Version-specific metadata (estimate timestamps, etc.)

line_items
(DeleteLineItemOperation · object | UpdateLineItemOperation · object | CreateLineItemOperation · object)[] | null

Line item operations (create/update/delete) - optional for consolidated updates. When provided, all line item changes are applied atomically with version updates. Auto-discriminated by field presence: product_id=CREATE, id+delete=DELETE, id=UPDATE.

Operation schema for deleting a line item

Auto-discriminated by: id present, delete=True

Required fields:

  • id: the line item ID to delete
  • delete: must be True (discriminates as DELETE)

Note: strict=True was disabled to allow automatic UUID string conversion from JSON. JSON payloads always send UUIDs as strings, and Pydantic's strict mode prevented the automatic conversion, causing validation errors.

Example: { "id": "line-item-uuid", "delete": true }

Response

Successful Response

Response schema for quote (with current version)

id
string<uuid>
required

Quote ID

quote_number
string
required

Human-readable quote number

quote_mode
enum<string>
required

Quote workflow mode

Available options:
approval-based,
self-serve
organisation_id
string<uuid>
required

Organisation ID

customer_id
string<uuid>
required

Customer ID

business_entity_id
string<uuid>
required

Business entity ID

created_at
string<date-time>
required

Created at

updated_at
string<date-time>
required

Updated at

current_version_id
string<uuid> | null

Current version ID

current_version
QuoteVersionResponse · object

Current/active version details

custom_data
Custom Data · object

Custom data

created_by
string<uuid> | null

Creator user ID