Work with Conditions in the Postrequestbody

I have two propertyTypes: SingleFamilyProperty or CondominiumProperty.
Some of the objects (ie yearOfConstruction or numberOfRooms) are used in both propertyTypes. But for example buildingVolume is only used by SingleFamilyProperty and
for example flatType is only used by Condominium Property.

How I have to program it, that I can used the same POST-Request for both propertyTypes?

Hi @frosch31 - apply if & else condition or switch case in pre-req tab

Could give me an example how to write it correctly. Thanks in advance Martin

Hey @frosch31 :wave: Welcome to the Postman Community :tada:

So that we can precisely understand, can you tell me what exactly you are trying to achieve? Also would you please share the POST request that you are trying to use as well as API documentation if that’s publicly available?

From Line25 (Part_Property_Service_1) until Line 64 (Part_Property_Service_2) will be used for both propertyType as SingleFamilyProperty or CondominiumProperty. In the Picture 2 from the Line 65 until the end will be used if the propertyType is SingleFamilyProperty and other Objects if the propertyType is Codominium Property.

Otherwise it could be helpful to make an example with similar constellation. Thanks in advance for your help

Hey @frosch31!

Sorry but I am still not sure what you are trying to achieve here :thinking:
Is there API documentation that is publicly available for the POST request in question?