Load Request.schema
Generated from
specification/schemas/load-request.schema.json. Edit the canonical source file, not this page.
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://openfreytprotocol.example/schemas/v0/load-request", "title": "LoadRequest", "description": "A shipper's request for transport capacity between two areas within a pickup and delivery window.", "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "description": "UUIDv7 resource identifier." }, "resourceVersion": { "type": "integer", "minimum": 1, "description": "Optimistic-concurrency counter. Incremented on every mutation." }, "ownerOrganizationId": { "type": "string", "description": "Opaque broker-scoped identifier of the organization that owns this resource." }, "createdAt": { "type": "string", "format": "date-time", "description": "ISO 8601 / RFC 3339 timestamp when the resource was first created." }, "updatedAt": { "type": "string", "format": "date-time", "description": "ISO 8601 / RFC 3339 timestamp of the most recent mutation." }, "externalReferences": { "type": "array", "items": { "$ref": "#/$defs/ExternalReference" }, "description": "Namespaced references to records in external systems (TMS, ERP, etc.)." }, "status": { "type": "string", "enum": ["draft", "published", "proposed", "matched", "withdrawn", "expired", "cancelled"], "description": "Lifecycle state of the load request." }, "originArea": { "$ref": "https://openfreytprotocol.example/schemas/v0/area", "description": "Geographic area from which the goods are collected." }, "destinationArea": { "$ref": "https://openfreytprotocol.example/schemas/v0/area", "description": "Geographic area to which the goods must be delivered." }, "requiredCapacity": { "type": "object", "description": "The capacity required to transport this load.", "properties": { "weightKg": { "type": "number", "minimum": 0, "description": "Required weight capacity in kilograms." }, "volumeM3": { "type": "number", "minimum": 0, "description": "Required volume capacity in cubic metres." }, "loadingMetres": { "type": "number", "minimum": 0, "description": "Required loading metres on the trailer floor." }, "vehicleBodyTypes": { "type": "array", "items": { "type": "string" }, "description": "Acceptable vehicle body types for this load." } } }, "pickupWindowStart": { "type": "string", "format": "date-time", "description": "Earliest ISO 8601 date-time at which goods can be collected." }, "pickupWindowEnd": { "type": "string", "format": "date-time", "description": "Latest ISO 8601 date-time by which goods must be collected." }, "deliveryWindowStart": { "type": "string", "format": "date-time", "description": "Earliest ISO 8601 date-time at which goods can be delivered." }, "deliveryWindowEnd": { "type": "string", "format": "date-time", "description": "Latest ISO 8601 date-time by which goods must be delivered." } }, "required": [ "id", "resourceVersion", "ownerOrganizationId", "createdAt", "updatedAt", "status", "originArea", "destinationArea", "requiredCapacity", "pickupWindowStart", "pickupWindowEnd", "deliveryWindowStart", "deliveryWindowEnd" ], "$defs": { "ExternalReference": { "type": "object", "properties": { "system": { "type": "string" }, "type": { "type": "string" }, "value": { "type": "string" } }, "required": ["system", "type", "value"] } }}