All Collections
Troubleshooting
Why did my API Call return a different number than I was expecting?
Why did my API Call return a different number than I was expecting?
Updated over a week ago

When the return type of an API call in the API connector is of the type JSON, we use JSON.parse to interpret the returned information. While this is standard and works well most of the time, one thing JSON.parse does is round very large numbers (longer than 16 digits). This means that if you are sending a very large number, you may see the last few digits are turned to 0s instead of the numbers you are expecting.

The workaround to this case, if you have control over the server responding to the API call, would be to enclose the number you are sending in quotation marks, making it a string. If the information is being parsed as a string instead of as a number, it will not be rounded by JSON.parse, so the full information you are sending over will be preserved.

Did this answer your question?