Write API - Item removed from a catalog but still in document

Hello ! I have a question about the behavior of the Write API integration field. When an item of a catalog is used in a document and this item is removed from the catalog I can still see the item data when I'm requesting the document. Is it a normal behavior? It's pretty useful when I want to do a full re-sync of a catalog (reset + post all items of the catalog again) to not lose the relationship between the document and the catalog item. I just wanted to know if I can rely on these feature ?

Hi Raoul,

Welcome to the Prismic community,

Well, when you delete an item in your category, it is not supposed to disappear from your published documents until you unpublish/publish them. This is by design.

But not sure about the behavior when you create back the same item then unpublish/publish

In fact, I'm doing some tests on this and will get back to you soon.

Fares

I've done some tests, and here is the current behavior:

I've created a catalog using Integration fields write API and by adding items to your document and then saved and published.

And then deleted all items using the https://if-api.prismic.io/if/write/[name-of-catalog]/reset

Then check the API response and the catalog item still exists in the API response, even if I make modifications unpublish/publish.

So for your use case, if you delete some items from the catalog, they will not disappear except if you remove them from the document manually,

Please let me know if you need any more clarifications.

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