Query unpublished (draft, archive) documents

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?

1 Like

Hi there,

Thanks for reaching out.

In fact, you need to put the documents that you need to fetch in a release to fetch them, but maybe the better solution for you is to get the locale of the documents.

For that, I will create a feature request and send it to the @features-team.


1 Like

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 :heart: button to show your support for the feature and check out our Feature Request Guidelines.