{ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "OrderCreate", "description": "Payload for placing a new order.", "$id": "https://raw.githubusercontent.com/api-evangelist/bluecart/refs/heads/main/json-schema/bluecart-order-create-schema.json", "type": "object", "properties": { "clientId": { "type": "integer", "format": "int64", "description": "Identifier of the client placing the order.", "example": 5012 }, "user": { "type": "object", "description": "The user placing the order.", "properties": { "id": { "type": "integer", "format": "int64", "example": 3001 }, "type": { "type": "string", "example": "STAFF" } } }, "deliveryCharge": { "type": "number", "format": "float", "description": "Delivery charge to apply.", "example": 25 }, "deliveryType": { "type": "string", "description": "Delivery method.", "example": "Delivery" }, "requestedDeliveryDate": { "type": "string", "format": "date", "description": "Requested delivery date.", "example": "2026-06-10" }, "currency": { "type": "string", "description": "ISO currency code.", "example": "USD" }, "addresses": { "type": "object", "description": "Billing and shipping addresses.", "additionalProperties": true }, "products": { "type": "array", "description": "Line items to include in the order.", "items": { "title": "OrderProduct", "type": "object", "description": "A line item within an order.", "x-schema-source": "documentation", "x-source-url": "https://docs.bluecart.com/endpoints", "properties": { "productId": { "type": "integer", "format": "int64", "description": "Identifier of the product.", "example": 90210 }, "sku": { "type": "string", "description": "Stock keeping unit of the product.", "example": "WINE-CAB-750" }, "name": { "type": "string", "description": "Product name.", "example": "Cabernet Sauvignon 750ml" }, "quantity": { "type": "number", "description": "Quantity ordered.", "example": 12 }, "price": { "type": "number", "format": "float", "description": "Unit price for this line item.", "example": 18.5 } } } }, "presetCreationDate": { "type": "string", "format": "date-time", "description": "Optional preset creation timestamp for the order.", "example": "2026-06-02T14:30:00Z" } }, "required": [ "clientId", "products" ] }