# Error in Postman call

**URL:** <https://ask.openrouteservice.org/t/error-in-postman-call/5712>\
**Category:** directions\
**Created:** [January 26, 2024, 11:22am UTC](https://ask.openrouteservice.org/t/error-in-postman-call/5712 "2024-01-26T11:22:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![agocurti](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/agocurti/32/3396_2.png) [@agocurti](https://ask.openrouteservice.org/u/agocurti)\
**Post date:** [January 26, 2024, 11:22am UTC](https://ask.openrouteservice.org/t/error-in-postman-call/5712/1 "2024-01-26T11:22:04Z")

</div>

Hi folks!  
I’m trying to use my first API calls using Postman.  
I created a token ( in the following examples) and first I used a simple **GET** call to “[https://api.openrouteservice.org/v2/directions/driving-car?api\_key=](https://api.openrouteservice.org/v2/directions/driving-car?api_key=)&start=\<a,b\>&end=\<c,d\>” and in this case I obtained the correct response.  
Then I’m trying to execute the **POST** call “[https://api.openrouteservice.org/v2/directions/driving-car/gpx?coordinates=[[a,c],[c,d]](https://api.openrouteservice.org/v2/directions/driving-car/gpx?coordinates=%5B%5Ba,c%5D,%5Bc,d%5D)]” adding the header “Authentication=”, but in this case I ever have the response:  
“error”: {  
“code”: 2001,  
“message”: “Request body could not be read”  
}…

What am I doing wrong?

---

<div class="post-metadata">

**Author:** ![amandus](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/amandus/32/669_2.png) [@amandus](https://ask.openrouteservice.org/u/amandus)\
**Post date:** [January 26, 2024, 11:57am UTC](https://ask.openrouteservice.org/t/error-in-postman-call/5712/2 "2024-01-26T11:57:38Z")

</div>

Hi @agocurti,

please read the API documentation:  
[https://openrouteservice.org/dev/#/api-docs/v2/directions/{profile}/post](https://openrouteservice.org/dev/#/api-docs/v2/directions/%7Bprofile%7D/post)

The POST endpoint doesn’t support query parameters.  
You can construct your request in the Playground and then generate example code for curl if you want to import an example request for Postman

Best regards

---

<div class="post-metadata">

**Author:** ![Jules](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/jules/32/187_2.png) [@Jules](https://ask.openrouteservice.org/u/Jules)\
**Post date:** [January 26, 2024, 12:14pm UTC](https://ask.openrouteservice.org/t/error-in-postman-call/5712/3 "2024-01-26T12:14:16Z")

</div>

A general idea, since you’re already using Postman.  
It’s possible to import our ors swagger docs directly as **a simple collection** or a **Swagger OpenAPI 3 Collection** , depending on your plan with Postman.

Just insert this link in Postman via **“File → Import”** : [https://openrouteservice.org/wp-json/ors-api/v1/api-doc/source/V2](https://openrouteservice.org/wp-json/ors-api/v1/api-doc/source/V2)  
(simply add the link to the text field)

That directly gives you all the possible requests, well formatted and ready to be used.

After importing, just set a **header** called “Authorization” together with your key from [Dashboard | ORS](https://openrouteservice.org/dev/#/home) as a **value** to the request you want to make and click **Send**.

You’ll still have to provide working input data, but the API/Postman collection structure is already present and makes it maybe a bit easier with all the examples in place.

---

<div class="post-metadata">

**Author:** ![agocurti](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/agocurti/32/3396_2.png) [@agocurti](https://ask.openrouteservice.org/u/agocurti)\
**Post date:** [January 26, 2024, 12:25pm UTC](https://ask.openrouteservice.org/t/error-in-postman-call/5712/4 "2024-01-26T12:25:42Z")

</div>

Thanks for the fast answers. I understood. Then I can do 2 things:

1. Create a ‘curl example’ from the ORS Playground, then I can import the obtained snippet in Postman

2. Simply I must add (because we are in ‘POST’ use) the requested parameters in Postman, but using the ‘Body’ tab, not the ‘Params’ tab, as in the following example:

 ![sample](https://ask.openrouteservice.org/uploads/default/original/2X/e/ee189f86df1fd963bae1206ece352103cf000147.jpeg)

In both case… it works!

Thanks again, have a nice day

---

<div class="post-metadata">

**Author:** ![Jules](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/jules/32/187_2.png) [@Jules](https://ask.openrouteservice.org/u/Jules)\
**Post date:** [January 26, 2024, 1:46pm UTC](https://ask.openrouteservice.org/t/error-in-postman-call/5712/5 "2024-01-26T13:46:09Z")

</div>

Have a fantastic day, too, and thanks for providing us with your solution. Good to see that it works now!
