--- title: "Example: Use Request and Collection Data as Query Parameters in a ProcessMaker Platform API Call" slug: "example-use-request-and-collection-data-as-query-parameters-in-a-processmaker-platform-api-call" updated: 2025-05-12T15:48:04Z published: 2025-05-12T15:48:04Z canonical: "docs.processmaker.com/example-use-request-and-collection-data-as-query-parameters-in-a-processmaker-platform-api-call" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.processmaker.com/llms.txt > Use this file to discover all available pages before exploring further. # Example: Use Request and Collection Data as Query Parameters in a ProcessMaker Platform API Call Learn how to reference Request data and Collection record data as parameters when calling a ProcessMaker Platform API endpoint. ## Overview > [!NOTE] > **Intended audience:** Process designers, Web designers, graphic designers, software developers, coding engineers > > **Tags:** Collections; PMQL; Request Variable In the example below, reference Request data and data from a specified r in the URL query to a ProcessMaker API endpoint. Determine dynamically the specific Collection record by including a PMQL query within a ProcessMaker Platform API call. The PMQL query uses a Request variable's value using mustache syntax for the Request variable's value in the URL to the API call. Consider the following use case. Reference Collection data from Collection `5` for records created based on Requests started on a specific date. Determine the date dynamically by referencing a date in Request data stored in a [Request variable](/v1/docs/request-variable) `date`. The date that each Request starts is stored in another Request variable `date_work_start`. 1. [Log on](/v1/docs/participant-basics#log-on-to-processmaker-platform) to ProcessMaker Platform. 2. Open a new Web browser tab or window. 3. Connect to the API for your ProcessMaker Platform instance, such as`https://MyOrganization.processmaker.net/api/1.0`. For more information, see [Access ProcessMaker Platform RESTful API Documentation](https://docs.processmaker.com/apidocs). 4. Append to your URL the [Collections](/v1/docs/collections) syntax as desired such as `https://MyOrganization.processmaker.net/api/1.0/collections/5/records`. In the URL above, `collections/5/records` calls for the records in Collection `5`. 5. Perform [PMQL](/v1/docs/search-using-processmaker-query-language-pmql) syntax as desired such as `https://MyOrganization.processmaker.net/api/1.0/collections/5/records?pmql=data.date_work_start`. Where `data` is calling the information of the collection records which specifically call information in the variable `date_work_start`. 6. Add a [Request variable](/v1/docs/request-variable) to your PMQL such as`https://MyOrganization.processmaker.net/api/1.0/collections/5/records?pmql=data.date_work_start="{{date}}"`, where the `{{date}}` is a comparison value that requires quotations marks. 7. Optionally, test your URL using a [Data Connector](/v1/docs/data-connectors) Endpoint.