When long url is saved on DB is being modified

Hello, we are requesting short urls consuming the api.
we notice that when se send the folowing long url for example:
https://foo.bar/fo/bar/barfo.php?iCampaignId=983&sCode=T08zdzRNbHlaRGp6Rk9iaC9zVDUxdzdrR1NWMzA5c21NRExqeG5IeVc2STk0V3VMQVA4ZisvK1VrbmVQZGZlT2FhdzZNN204U0tINgpoVXNBVFIzMkRSZWZ1bjZOWnlzUC8wSG1yZEdPV2F4SHJLdVFvMzZmWGc9PQ==&format=simple

the api response with the short url, but its pointing to: (removed the https part due the new user restriction)
foo.bar/fo/bar/barfo.php?iCampaignId=98

if i check the long_url on the database it has been saved as:
foo.bar/fo/bar/barfo.php?iCampaignId=98

But when i short the same long url using the admin page…everything works fine and if i check the database i see that the long url has been saved correctly.

can this be related to the yourls-api.php? o maybe is there a setting i’m missing on the configuration?

regards

The URL passed to the API is, as explained in the readme, properly encoded, right?

yes it is.
I was wondering if the problema could be that on the long URL after CampingID=983
we have “&” maybe the API is thinking that everything that goes after it is a new paramater and not part of the long URL?

Hence the need for encoding.