API provides different data than in backend

Hello there,

I have an issue with API. The problem is that API sometimes provides another data than the backend has. For example - I have "Title" in Slice zone which can be only h2 or h3. By default in backend it's h2, but in response sometimes I see it as h1. Problem can be solved by changing heading, saving it, changing back and saving again. But this is not ideal solution.

Does anybody have a clue what's wrong there and how to solve it?

Thanks

Hi Johannes,

Welcome to the Prismic community.
In fact I will need you repository name in order to be able to investigate this issue, ideally the API will always return the same result, except if maybe you mixing live/draft versions.

Looking forward to your reply,
Fares

1 Like

Hello Fares,

Thank you for your answer. Repo name is "Sparwelt Content (sparwelt-content)". Regarding API - yes, ideally it should return same result, but unfortunately in our case it's not.

Thank you!

Hi Fares, any news here?

Hi,

I apologize for the delay, thanks for sharing the repository name, can you also share with us the id of the document (an API link to the document) and the field that you are suspecting that is changing.

It would great if you can provide us with 2 responses that of the same document & fields that show different data (screenshots would be great).

Frankly, I highly dought that there will be an issue like this, It otherwise we will get many complains from your clients, but let's investigate.

Looking forward to your reply,
Fares

Hello Fares,

Thank you for your answer. I'll try to provide what i have. So this is document link (hopefully this is what you need) https://sparwelt-content.prismic.io/api/v2/documents/search?ref=X4ljGxEAACEA2FXn&q=[[%3Ad%20%3D%20at(document.id%2C%20"Xkv0QBAAACwAsLZ7")]]
Here is screenshot with incorrect data (h1 instead of h2)

And 4 response examples (2 with correct data and 2 with incorrect)
correct


incorrect

Please let me know if you need more details.

Thank you!

1 Like

Hi Fares,

posted above some details.

Thanks!

1 Like

Hi Fares,

any updates here?

Thanks!

Hi Johannes,

I apologise for the delay, I'm going to try to reproduce this issue on my end today, I will let you know if I succeed in doing that.

Hi

I've escalated this issue to our production team as I wasn't been able to reproduce it on my end.

I will reach back to you once I get some updates.

I also advice you compare the data on the API level and not on the code level as seen in your screenshot.

Hi Fares,

Sorry for the slow reply. Somehow link which was provided above not working anymore, but as far as I understand problem exist on API level and on API level the data is different. Did you already have a chance to check it?

Thanks!

Hi Johannes,

Ok, in-fact there is already an issue created in our issue tracker about this, and I will get back to you once I get some updates.

Thank you very much, Fares

Hello Fares,

any news here?

Hi,

I've reached out to your production team and they told us that the issue has been fixed, can you please confirm?

This issue has been closed due to inactivity. Flag to reopen.