React app doesnt fetch from correct link?

Hello,

I fetch by doing this:

fetch('https://site.com/api/item/name/' + id + '/' + mainID + '')

but this fetch fails and when looking in the netwok tab under request URL it says: https://site.com/item/name/45/36

its so weird! I have been looking in the code to solve this for hours but nothing seems wrong?! and the files on the hostserver are the correct files

the reactapp is btw hosted on heroku. other fetches works fine

The “api” part of the url has dissapeared. How do I fix this?

First you post a link to your code.