I'm synchronizing my content between Prismic and Algolia through a webhook. This content is localized, so I need to have separated indexes in Algolia (one for each locale). For better performances, I need to know which index to update when a document is published, archived or edited.
Each time the webhook is triggered, I get the list of updated documents (by IDs) but I don't get the list of edited locales, so I'm querying each document ID to get it's lang.
My problem is that when a document is not published, the API does not return it to me. Is there any parameter to request archived or draft documents?
Thanks for reaching out.
You can put the documents that you need to fetch in a release then you can get the locale of the documents.
This is being tracked as an open feature request.
If you have another use-case for this feature, you can 'Flag' this topic to reopen. Please use the button to show your support for the feature and check out our Feature Request Guidelines.
Any updates on this? We are creating static pages and when a page is deleted we only get the id of the deleted page but cannot fetch it to get the slug and then delete the file with that slug on our static storage.
Hello @adolfo.yanes, we don't have any news about this feature. If this changes we'll announce it in our progress page What's new - Prismic
Any update on this? Currently there is no way to revalidate content that gets unpublished, since the webhook only returns the document id but there is no way to query the unpublished document.
Yes, it isn't possible to know which documents get unpublished. You'd need to use a workaround to see if the document exists in a release or not.