{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/tradera/main/json-schema/tradera-item-request-schema.json",
  "title": "ItemRequest",
  "x-generated": "2026-10-15",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/tradera-openapi.json#/components/schemas/ItemRequest",
  "type": "object",
  "properties": {
    "title": {
      "type": [
        "string",
        "null"
      ]
    },
    "ownReferences": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      }
    },
    "categoryId": {
      "type": "integer",
      "format": "int32"
    },
    "duration": {
      "type": "integer",
      "format": "int32"
    },
    "restarts": {
      "type": "integer",
      "format": "int32"
    },
    "startPrice": {
      "type": "integer",
      "format": "int32"
    },
    "reservePrice": {
      "type": "integer",
      "format": "int32"
    },
    "buyItNowPrice": {
      "type": "integer",
      "format": "int32"
    },
    "description": {
      "type": [
        "string",
        "null"
      ]
    },
    "paymentOptionIds": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "integer",
        "format": "int32"
      }
    },
    "shippingOptions": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/ItemShipping"
      }
    },
    "acceptedBidderId": {
      "type": "integer",
      "description": "The types of bidders allowed for the Item.\r\nPossible values: 1 = Sweden, 3 = International, 4 = EU.\r\nSee the method !:PublicService.GetAcceptedBidderTypes for the authoritative list.",
      "format": "int32"
    },
    "expoItemIds": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "integer",
        "format": "int32"
      }
    },
    "customEndDate": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "itemAttributes": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "integer",
        "format": "int32"
      }
    },
    "itemType": {
      "type": "integer",
      "format": "int32"
    },
    "autoCommit": {
      "type": "boolean"
    },
    "vat": {
      "type": [
        "integer",
        "null"
      ],
      "format": "int32"
    },
    "shippingCondition": {
      "type": [
        "string",
        "null"
      ]
    },
    "paymentCondition": {
      "type": [
        "string",
        "null"
      ]
    },
    "campaignCode": {
      "type": [
        "string",
        "null"
      ]
    },
    "descriptionLanguageCodeIso2": {
      "type": [
        "string",
        "null"
      ]
    },
    "attributeValues": {
      "$ref": "#/$defs/ItemAttributeValues"
    },
    "restartedFromItemId": {
      "type": [
        "integer",
        "null"
      ],
      "format": "int32"
    }
  },
  "additionalProperties": false,
  "$defs": {
    "ItemAttributeValues": {
      "type": "object",
      "properties": {
        "terms": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/TermValues"
          }
        },
        "numbers": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/NumberValues"
          }
        }
      },
      "additionalProperties": false
    },
    "ItemShipping": {
      "type": "object",
      "properties": {
        "shippingOptionId": {
          "type": [
            "integer",
            "null"
          ],
          "description": "OBSOLETE: Use Tradera.Api.Services.Core.Contracts.Entities.ItemShipping.ShippingProviderId instead. Takes the same numeric ids.",
          "format": "int32"
        },
        "cost": {
          "type": "integer",
          "format": "int32"
        },
        "shippingWeight": {
          "type": [
            "number",
            "null"
          ],
          "format": "double"
        },
        "shippingWeightSpecified": {
          "type": "boolean"
        },
        "shippingProductId": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int32"
        },
        "shippingProductIdSpecified": {
          "type": "boolean"
        },
        "shippingProviderId": {
          "type": [
            "integer",
            "null"
          ],
          "description": "The numeric id of the shipping provider. Call GetShippingOptions (SOAP) or\r\nGET /v4/reference-data/shipping-options (REST) for the providers a seller can use — every\r\nproduct returned carries the ShippingProviderId to send back. The set changes over time,\r\nso read it from the API rather than hard-coding it.\r\n            \r\nDEPRECATED providers, rejected when listing an item: Posten (1), Bussgods (3), UPS (4),\r\nFedEx (5), NotSpecified (10) and PostNordStampDenmark (15). Sellers who used Posten should\r\nuse PostNordParcel (12) or Alternative (6) instead.",
          "format": "int32"
        },
        "sellerSurcharge": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Optional seller-defined surcharge added on top of the shipping product's base cost.\r\nNot yet used to compute the buyer-facing shipping price — Tradera.Api.Services.Core.Contracts.Entities.ItemShipping.Cost is still\r\nthe authoritative, required field today and must be sent. In a future API revision,\r\nTradera.Api.Services.Core.Contracts.Entities.ItemShipping.Cost will be removed and the buyer-facing price will be derived from\r\nthe shipping product (identified by Tradera.Api.Services.Core.Contracts.Entities.ItemShipping.ShippingProductId) adjusted by\r\nTradera.Api.Services.Core.Contracts.Entities.ItemShipping.SellerSurcharge and Tradera.Api.Services.Core.Contracts.Entities.ItemShipping.SellerDiscount.",
          "format": "int32"
        },
        "sellerSurchargeSpecified": {
          "type": "boolean"
        },
        "sellerDiscount": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Optional seller-defined discount subtracted from the shipping product's base cost.\r\nNot yet used to compute the buyer-facing shipping price — Tradera.Api.Services.Core.Contracts.Entities.ItemShipping.Cost is still\r\nthe authoritative, required field today and must be sent. In a future API revision,\r\nTradera.Api.Services.Core.Contracts.Entities.ItemShipping.Cost will be removed and the buyer-facing price will be derived from\r\nthe shipping product (identified by Tradera.Api.Services.Core.Contracts.Entities.ItemShipping.ShippingProductId) adjusted by\r\nTradera.Api.Services.Core.Contracts.Entities.ItemShipping.SellerSurcharge and Tradera.Api.Services.Core.Contracts.Entities.ItemShipping.SellerDiscount.",
          "format": "int32"
        },
        "sellerDiscountSpecified": {
          "type": "boolean"
        }
      },
      "additionalProperties": false
    },
    "NumberValues": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int32"
        },
        "values": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "number",
            "format": "double"
          }
        }
      },
      "additionalProperties": false
    },
    "TermValues": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int32"
        },
        "values": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false
    }
  }
}