how to call a web service and not send a parameter that the value is null?

Hi All, I have setup a web service in Creatio that is working fine when I send parameters with data.

 

Sometimes I gonna call thie web service without all the parameters on the query, just one or more, it will depends on othe step before.

 

Is there a way to have a web service set up in Creatio with all parameters, but only make the call using the parameters that are not null?

Like 1

Like

3 comments

Hello!

 

It depends on whether the parameters with NULL values are required or not.

 

You can try leaving out the NULL parameters and see how the service responds. If the call fails with an error, then you'll need to include those parameters.

 

Let us know if you need further assistance!

If the API you're calling is picky about the parameters being included without values, you can add the same service method twice, once with the params, and one without. Then just call one or the other based on the needs.

Thanks for the replies, would be nice to have a way to disable a parameter, for situations like this.
For thie particular API I´m calling there are about 10 parameters available, and the way Creatio is doing, it´s sending all (query) parameters, even though its value is empty.
I´m trying to find a work around or a way to call this API sending only the required data.

Show all comments