# URL parameters

## Introduction

**URL parameters** are used to apply queries/filters to the authentication request URL:

<div align="left"><figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2Fk6XwO0O0gvHYtvMEtN8n%2Furl%20params%201.png?alt=media&#x26;token=07737263-247c-4c06-8faf-2139c7d73331" alt=""><figcaption></figcaption></figure></div>

Any parameters added here are appended to the authentication URL as a query.

## Using URL parameters in authentication requests

In reality, it's unlikely that URL parameters will be commonly used when defining authentication methods however, you can absolutely add them if needed.

URL parameters are added as 'key pairs' - so you specify a 'key' (a valid field name for this API) and then the required value.&#x20;

### Static values

A URL parameter value can be static - for example:

<div align="left"><figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FRknhRUiHU4UV51cihv5H%2Furl%20params%204.png?alt=media&#x26;token=12eeb4d9-622a-44f0-b0a8-922a2ae06c14" alt=""><figcaption></figcaption></figure></div>

In this case, the value would be appended to the request endpoint as a URL query with the value exactly as it is defined - for example:

{% code title="POST" %}

```
https://rest.storefeeder.com/warehouses/?warehouseID=0000001
```

{% endcode %}

### Dynamic values

A URL parameter value can be dynamic, using [auth variables](https://doc.wearepatchworks.com/product-documentation/developer-hub/connector-builder/building-your-own-connector/3-authentication-methods/authentication-method-options/auth-variables) that you've previously defined for the authentication method. In the example below, we have an **auth variable** named `warehouseID:`

<figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FiHbFi0mdr6xbMNFSoL9p%2Furl%20params%205.png?alt=media&#x26;token=aeaaaf13-7070-4684-b647-bd92b6d0659a" alt=""><figcaption></figcaption></figure>

So, when a user [adds an instance](https://doc.wearepatchworks.com/product-documentation/connectors-and-instances/working-with-instances/adding-an-instance) of this connector, they are asked to provide a value for this field - for example:

<div align="left"><figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FmU9YWWtArhyxi7vTYUGk%2Furl%20params%206.png?alt=media&#x26;token=1ca507fc-ce00-4493-84de-d3b8768fe60e" alt="" width="348"><figcaption></figcaption></figure></div>

...and when a process flow runs for this connector, associated API requests are injected with this value wherever a `{{warehouseID}}` variable is found. So, if we've added this variable in a URL parameter, as below:

<div align="left"><figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2Fn3T8OD8KNdeFME28Cb6B%2Furl%20params%207.png?alt=media&#x26;token=b0f178b2-f103-46e6-b7e3-9ae371d9b760" alt=""><figcaption></figcaption></figure></div>

...the resulting API request would include a parameter for whatever `Warehouse ID` the user entered when the instance being used was created.

{% hint style="info" %}
Please refer to the API documentation for your underlying third-party application to find parameters that can be passed in authentication requests.&#x20;
{% endhint %}

## Adding URL parameters

URL parameters are added as key pairs. To add a URL parameter, follow the steps below:

**Step 1:**\
Click the **add new parameter** button:

<div align="left"><figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2F8hpRX8CKJmGVanOzqMyY%2Furl%20params%208.png?alt=media&#x26;token=1f7b5ab5-1dec-412d-84cf-d3a6e560cafd" alt=""><figcaption></figcaption></figure></div>

**Step 2:**\
Complete key pair details as required:

<div align="left"><figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2Ff02wbUPSYh3UQ3wWJXqs%2Furl%20params%209.png?alt=media&#x26;token=ff4271c8-331c-4feb-b19d-c238b95dde9d" alt=""><figcaption></figcaption></figure></div>

{% hint style="info" %}
The **add option** page is the same for all types of parameters that you may encounter in the connector builder. For information about these options please see the [Working with parameters](https://doc.wearepatchworks.com/product-documentation/developer-hub/connector-builder/building-your-own-connector/techniques-for-working-with-variables-and-parameters/working-with-parameters) page.

For guidance on configuring parameters for specific **authentication types**, please see our [Supported authentication types](https://doc.wearepatchworks.com/product-documentation/developer-hub/connector-builder/building-your-own-connector/3-authentication-methods/supported-authentication-types) section.
{% endhint %}

**Step 3**\
Click the **save** button.

## Editing & removing URL parameters

**URL** parameters are standard key pairs - techniques for working with these parameters are the same as those for working with header parameters, body parameters, etc. For more information about these techniques, please see the [Working with parameters ](https://doc.wearepatchworks.com/product-documentation/developer-hub/connector-builder/building-your-own-connector/techniques-for-working-with-variables-and-parameters/working-with-parameters)page.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.wearepatchworks.com/product-documentation/developer-hub/connector-builder/building-your-own-connector/3-authentication-methods/authentication-method-options/url-parameters.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
