{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/marketsdk/json-schema/marketsdk-create-listing-dto-schema.json",
  "title": "CreateListingDto",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/marketsdk-listings-api-openapi.yml#/components/schemas/CreateListingDto",
  "type": "object",
  "properties": {
    "seller": {
      "type": "string"
    },
    "category": {
      "type": [
        "string",
        "null"
      ]
    },
    "title": {
      "type": "string",
      "maxLength": 200
    },
    "description": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 20000
    },
    "price": {
      "$ref": "#/$defs/MoneyDto"
    },
    "quantity": {
      "type": "number",
      "default": 1,
      "minimum": 1,
      "maximum": 100000
    },
    "attributes": {
      "type": "object",
      "description": "Validated against the category's attribute schema.",
      "additionalProperties": true
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "expires_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "When a published listing expires."
    }
  },
  "required": [
    "seller",
    "title",
    "price"
  ],
  "$defs": {
    "MoneyDto": {
      "type": "object",
      "properties": {
        "amount": {
          "type": "number",
          "description": "Integer minor units, such as cents."
        },
        "currency": {
          "type": "string",
          "description": "ISO 4217 code. Must be the marketplace currency."
        }
      },
      "required": [
        "amount",
        "currency"
      ]
    }
  }
}