# Dynamic URL without "classic" variables (path in request)

**URL:** <https://community.postman.com/t/dynamic-url-without-classic-variables-path-in-request/46583>\
**Category:** Help Hub\
**Created:** [April 20, 2023, 1:28pm UTC](https://community.postman.com/t/dynamic-url-without-classic-variables-path-in-request/46583 "2023-04-20T13:28:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aerospace-operator14](https://avatars.discourse-cdn.com/v4/letter/a/a698b9/32.png) [@aerospace-operator14](https://community.postman.com/u/aerospace-operator14)\
**Post date:** [April 20, 2023, 1:28pm UTC](https://community.postman.com/t/dynamic-url-without-classic-variables-path-in-request/46583/1 "2023-04-20T13:28:24Z")

</div>

_My question_:  
I need to send a request to an api, where i need to build the request dynamically by adding variables in the url.  
The url needs to be formed like that:  
[https://example.com/portal/customer/{{customerId}](https://example.com/portal/customer/%7B%7BcustomerId%7D)}/  
The customerId changes from request to request. But it’s not defined like in other api with customerid={{customerId}}  
What I can easily achieve is:  
[https://example.com/portal/customer/{{customerId}](https://example.com/portal/customer/%7B%7BcustomerId%7D)}/?customerId=123  
 ![Bildschirmfoto 2023-04-20 um 15.27.17](https://us1.discourse-cdn.com/getpostman/original/3X/7/9/79e9455aea20371ad44a464467279ea23e3cb6bf.png)

What I need is [https://example.com/portal/customer/123](https://example.com/portal/customer/123)

Any ideas?  
Thanks a lot and best regards

---

<div class="post-metadata">

**Author:** ![michaelderekjones](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/michaelderekjones/32/14819_2.png) [@michaelderekjones](https://community.postman.com/u/michaelderekjones)\
**Post date:** [April 26, 2023, 10:44am UTC](https://community.postman.com/t/dynamic-url-without-classic-variables-path-in-request/46583/2 "2023-04-26T10:44:04Z")

</div>

You need to use a variable instead of a parameter and then what you had originally should work.

> [https://example.com/portal/customer/{{customerId}](https://example.com/portal/customer/%7B%7BcustomerId%7D)

If you use parameters, it will keep trying to put the ?parameter=xxx into the URL.

---

<div class="post-metadata">

**Author:** ![aerospace-operator14](https://avatars.discourse-cdn.com/v4/letter/a/a698b9/32.png) [@aerospace-operator14](https://community.postman.com/u/aerospace-operator14)\
**Post date:** [April 27, 2023, 7:02am UTC](https://community.postman.com/t/dynamic-url-without-classic-variables-path-in-request/46583/3 "2023-04-27T07:02:53Z")

</div>

Hi there,  
I coud solve this by using a path variable /:customerID  
Best regards.  
Sören
