Business rules

In addition to the schema validation, some extra business rules apply. They are explained in this document to ensure your listings can be processed without issues.

Conditional required fields

These fields are only required when certain other fields are present or contain a specific value.

Acceptance date

When <acceptance-type> is set to per date, acceptance-date must be set:

<acceptance>
  <acceptance-type>per date</acceptance-type>
  <acceptance-date>2020-12-30</acceptance-date>
</acceptance>

When immediately or in consulation is set, the date field is prohibited.

Price

In some cases the price node is required

Sale

When using the <sale> complex type, the <price> node must be set when either asking price or purchase price is set for <price-type>:

<sale>
  <price>350000</price>
  <price-type>asking price</price-type>
</sale>

<price> is optional when price on request is set.

Rent

When using the <rent> complex type, the <price> node must be set when rent price is set for <price-type>:

<rent>
  <price>1000</price>
  <price-type>rent price</price-type>
</rent>

<price-type> is optional when price on request is set.

Rent Duration

When specifying a duration for a rent listing, a few rules apply.

  • When both <minimum> and <maximum> are set, <maximum> must be greater than or equal to <minimum>
  • When <maximum> is set, <temporary> must also be set

The following snippets, for example, are valid:

<duration>
  <minimum>6</minimum>
  <maximum>12</maximum>
  <temporary>1</temporary>
</duration>
<duration>
  <maximum>12</maximum>
  <temporary>1</temporary>
</duration>
<duration>
  <minimum>6</minimum>
</duration>