example.order
Publish a new version
version 2.0 ▾
- Canonical URL
- https://schematalog.com/api/schemas/example.order/versions/2.0 (opens in a new tab)
- Published
- 22 August 2026 23:11
Supersedes: example.order v1.1
Properties
| Parameter | Description | Type | Required | Nullable | Default | Example |
|---|---|---|---|---|---|---|
created_at |
ISO 8601 Timestamp | Optional | ||||
currency |
ISO 4217 currency code. | String | Required | |||
lines |
List of Object | Optional | ||||
order_id |
UUID | Required | ||||
total |
Number | Required |
Definition
{ "type": "object", "$schema": "https://json-schema.org/draft/2020-12/schema", "required": [ "order_id", "total", "currency" ], "properties": { "lines": { "type": "array", "items": { "type": "object" } }, "total": { "type": "number", "minimum": 0 }, "currency": { "type": "string", "description": "ISO 4217 currency code." }, "order_id": { "type": "string", "format": "uuid" }, "created_at": { "type": "string", "format": "date-time" } }, "$id": "https://schematalog.com/api/schemas/example.order/versions/2.0", "title": "example.order" }
$id: https://schematalog.com/api/schemas/example.order/versions/2.0 $schema: https://json-schema.org/draft/2020-12/schema properties: created_at: format: date-time type: string currency: description: ISO 4217 currency code. type: string lines: items: type: object type: array order_id: format: uuid type: string total: minimum: 0 type: number required: - order_id - total - currency title: example.order type: object
from __future__ import annotations from typing import Any, Dict, List, Optional from uuid import UUID from pydantic import AwareDatetime, BaseModel, Field, confloat class ExampleOrder(BaseModel): lines: Optional[List[Dict[str, Any]]] = None total: confloat(ge=0.0) currency: str = Field(..., description='ISO 4217 currency code.') order_id: UUID created_at: Optional[AwareDatetime] = None
{ "type": "record", "name": "ExampleOrder", "fields": [ { "name": "lines", "type": [ "null", { "type": "array", "items": { "type": "record", "name": "LinesItem", "fields": [], "namespace": "example.order" } } ], "default": null }, { "name": "total", "type": "double" }, { "name": "currency", "type": "string", "doc": "ISO 4217 currency code." }, { "name": "order_id", "type": { "type": "string", "logicalType": "uuid" } }, { "name": "created_at", "type": [ "null", { "type": "long", "logicalType": "timestamp-millis" } ], "default": null } ], "namespace": "example.order" }