# Passing webhook doc ids to new query

**URL:** https://community.prismic.io/t/passing-webhook-doc-ids-to-new-query/14749
**Category:** Developing with Prismic
**Tags:** nextjs, javascript
**Created:** [December 12, 2023, 4:04pm UTC](https://community.prismic.io/t/passing-webhook-doc-ids-to-new-query/14749 "2023-12-12T16:04:22Z")
**Posts on this page:** 1
**Showing post:** 7

<div class="post-metadata">

### Author: ![Phil](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/phil/32/14_2.png) [@Phil](https://community.prismic.io/u/Phil)
#### Post date: [December 13, 2023, 11:25am UTC](https://community.prismic.io/t/passing-webhook-doc-ids-to-new-query/14749/7 "2023-12-13T11:25:14Z")

</div>

> [@antoine.duvillier](#):
>
> Could the usage of UID instead of ID be influencing this behavior?

If you're using UIDs with the getByID method it will fail. The UID, which acts as the URL for the document, can be used to query a document with getByUID(type, uid).

If you're trying to invalidate the Next cache then the method here also works:

> [@Caching issue with Next.js App Router - Vercel Deployment](https://community.prismic.io/t/caching-issue-with-next-js-app-router-vercel-deployment/13834/29):
>
> Hello everyone! I wanted to join the conversation as I built the Prismic website using Next.js. I've encountered similar issues as all of you have reported after migrating to app router. I've tried various solutions over the past few months. However, since [version 14.0.2](https://github.com/vercel/next.js/releases/tag/v14.0.2), we haven't experienced any problems with revalidateTag() not revalidating. The only unconventional setup we still have in place is VERCEL\_FORCE\_NO\_BUILD\_CACHE=1. As Nathan mentioned earlier, this is used to opt out of Verce…

---

_[View the full topic](https://community.prismic.io/t/passing-webhook-doc-ids-to-new-query/14749)._
