Question:
How to find documents based on a product external ID using the Vault API?
Answer:
- Determine the ID of the product based on its External ID using the API. This can be done using a VQL Query based on the Product's External ID or using the Retrieve Object Record Collection API endpoint.
Example:
SELECT id FROM product__v WHERE external_id__v = {external ID}
- Use the Product ID in a query to find Documents.
Example:
Select id, name__v, product__v, status__v, document_number__v FROM documents where product__v = {id}
Related Documentation:
Vault Help Documentation: