{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/resollo-com/json-schema/resollo-com-place-order-response-schema.json",
  "title": "PlaceOrderResponse",
  "x-generated": "2026-11-23",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/resollo-com-openapi.yml#/components/schemas/PlaceOrderResponse",
  "type": "object",
  "required": [
    "order_id",
    "state",
    "product",
    "quantity",
    "total_price",
    "payment_method",
    "shipment_method",
    "payment_safety",
    "created_at"
  ],
  "properties": {
    "order_id": {
      "type": "string",
      "format": "uuid"
    },
    "state": {
      "type": "string",
      "enum": [
        "reserved"
      ]
    },
    "product": {
      "type": "object",
      "required": [
        "id",
        "name",
        "url"
      ],
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "name": {
          "type": "string"
        },
        "url": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    "quantity": {
      "type": "integer"
    },
    "total_price": {
      "$ref": "#/$defs/Money"
    },
    "payment_method": {
      "type": "string",
      "enum": [
        "cash",
        "card",
        "bank",
        "paypal",
        "stripe"
      ]
    },
    "shipment_method": {
      "type": "string",
      "enum": [
        "personal",
        "courier",
        "postal",
        "locker"
      ]
    },
    "payment_safety": {
      "$ref": "#/$defs/PaymentSafety"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  },
  "$defs": {
    "Money": {
      "type": "object",
      "required": [
        "amount",
        "currency"
      ],
      "properties": {
        "amount": {
          "type": "number"
        },
        "currency": {
          "type": "string",
          "description": "ISO 4217 currency code."
        }
      }
    },
    "PaymentSafety": {
      "type": "object",
      "required": [
        "generic",
        "method",
        "currency_mismatch",
        "item_not_as_described",
        "dispute_fallback"
      ],
      "properties": {
        "generic": {
          "type": "string",
          "description": "Platform-wide payment safety framing (Resollo never holds funds)."
        },
        "method": {
          "type": "string",
          "description": "Safety copy specific to the chosen `payment_method`."
        },
        "currency_mismatch": {
          "type": [
            "string",
            "null"
          ],
          "description": "Present only when `currency` differed from the listing's native currency."
        },
        "item_not_as_described": {
          "type": "string"
        },
        "dispute_fallback": {
          "type": "string",
          "description": "How to reach Resollo support if something goes wrong."
        }
      }
    }
  }
}