# Baselinker API requests

**URL:** <https://community.postman.com/t/baselinker-api-requests/39709>\
**Category:** Help Hub\
**Tags:** api-documentation, request, 3rd-party-api\
**Created:** [October 3, 2022, 9:07am UTC](https://community.postman.com/t/baselinker-api-requests/39709 "2022-10-03T09:07:16Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![pablogemba](https://avatars.discourse-cdn.com/v4/letter/p/e95f7d/32.png) [@pablogemba](https://community.postman.com/u/pablogemba)\
**Post date:** [October 3, 2022, 9:07am UTC](https://community.postman.com/t/baselinker-api-requests/39709/1 "2022-10-03T09:07:16Z")

</div>

How should I set up a Query param, and how should the cURL for baselinker API look like?

Here is a Baselinker API documentation

> **[API documentation - baselinker.com](https://api.baselinker.com/index.php)**

Introduction

The API enables the information exchange between an external system and BaseLinker.  
Communication uses data in JSON format. To make a request to the API, send the proper POST request to:  
**[https://api.baselinker.com/connector.php](https://api.baselinker.com/connector.php)**

To send a request for each method, a **token** is required. The token is assigned directly to the BaseLinker user account. User can generate API token in BaseLinker panel in “Account & other → My account → API” section.  
Authorization with http header (X-BLToken) is recommended.

3 values must be submitted to the connector.php file via POST:

1. ~~**token** - unique user API key~~ - DEPRECATED, please use _X-BLToken_ header
2. **method** - the name of the requested API method
3. **parameters** - arguments of the requested function in JSON format

Sample:`curl 'https://api.baselinker.com/connector.php' -H 'X-BLToken: 1-23-ABC' --data-raw 'method=getOrders&parameters=%7B%22date_from%22%3A+1407341754%7D'`

The cURL is not very clear for me:  
what is “-H”?  
What are ’ separators in the cURL?  
Is --data-raw a part of the curl that will be created with request (or it is fine when I set it in Body section like I did)?

I’v set api key, so no longer “error\_message”:“No user token provided.” appears.  
As a body I selected raw/JSON

So how should I set params to make my getOrders request?  
What should i put in Body section?

I tried a lot but nothing seems to be working - always the same message:  
“error\_message”:“An empty or unknown method has been used”

Please help - because i’m stuck 😕

---

<div class="post-metadata">

**Author:** ![w4dd325](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/w4dd325/32/12436_2.png) [@w4dd325](https://community.postman.com/u/w4dd325)\
**Post date:** [October 4, 2022, 11:24am UTC](https://community.postman.com/t/baselinker-api-requests/39709/2 "2022-10-04T11:24:58Z")

</div>

Hi @pablogemba

You can use the “Import” option in Postman and select the “Raw Text” option to import cURL straight in to Postman, like this;

![image](https://us1.discourse-cdn.com/getpostman/original/3X/a/c/aca4fb99472630ab8682dca5311e82b1d96811cc.png)

This will automatically create the request in Postman like this;  
 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/7/0/703008a0d06d9274d29f015bf7d4fb4babf6cc14.png)

![image](https://us1.discourse-cdn.com/getpostman/original/3X/2/3/230195ef5291681454dbf4ec004843c550e30c95.png)

---

<div class="post-metadata">

**Author:** ![pablogemba](https://avatars.discourse-cdn.com/v4/letter/p/e95f7d/32.png) [@pablogemba](https://community.postman.com/u/pablogemba)\
**Post date:** [October 4, 2022, 1:18pm UTC](https://community.postman.com/t/baselinker-api-requests/39709/3 "2022-10-04T13:18:00Z")

</div>

Ok.

Just did what you told me and there are some problems:  
1st. In API documentation, it’s stated - Communication uses data in JSON format.  
And here it’s set for x-www-form-urlencoded.  
2nd. X-BLToken is set as 1-23-ABC (I just went to Authorization tab and made it as API doc said

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/e/7/e7ef30c99ee84bd2e39e4eb1f385ccd23f7b37e0.png)  
Hope that is correct…  
But when I hit SEND, it’s the same outcome again.

{“status”:“ERROR”,“error\_code”:“ERROR\_UNKNOWN\_METHOD”,“error\_message”:“An empty or unknown method has been used”}

Any idea why ?  
Is it because I should make parameters in JSON?

---

<div class="post-metadata">

**Author:** ![w4dd325](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/w4dd325/32/12436_2.png) [@w4dd325](https://community.postman.com/u/w4dd325)\
**Post date:** [October 4, 2022, 1:20pm UTC](https://community.postman.com/t/baselinker-api-requests/39709/4 "2022-10-04T13:20:22Z")

</div>

Can you provide screenshots of what you have tried?

---

<div class="post-metadata">

**Author:** ![pablogemba](https://avatars.discourse-cdn.com/v4/letter/p/e95f7d/32.png) [@pablogemba](https://community.postman.com/u/pablogemba)\
**Post date:** [October 4, 2022, 1:34pm UTC](https://community.postman.com/t/baselinker-api-requests/39709/5 "2022-10-04T13:34:00Z")

</div>

I tried

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/0/f/0f04d4e3963c09f19bc29bd6c8f4d655c17aa1fd.png)  
Of course there is a X-BLToken on the 1st place  
And I’m writing Parameters  
 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/e/c/ec8d2c238b8cb735d2f83d1bc3a317fb82afc362.png)

---

<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:** [October 25, 2022, 12:01pm UTC](https://community.postman.com/t/baselinker-api-requests/39709/6 "2022-10-25T12:01:37Z")

</div>

@pablogemba

In the screenshot where you have the key\value that you want to add to the header.

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/e/7/e7ef30c99ee84bd2e39e4eb1f385ccd23f7b37e0.png)

You have the key as “X-BLToken” and the value as {{Token}} which is a variable that I don’t think you have set anywhere.

Therefore, the error “an empty or unknown method”.

Ideally, this should be set as an environment variable.

---

<div class="post-metadata">

**Author:** ![pablogemba](https://avatars.discourse-cdn.com/v4/letter/p/e95f7d/32.png) [@pablogemba](https://community.postman.com/u/pablogemba)\
**Post date:** [October 25, 2022, 12:56pm UTC](https://community.postman.com/t/baselinker-api-requests/39709/7 "2022-10-25T12:56:28Z")

</div>

So - under the {{Token}} is a value of my real token which I got from my Baselinker.  
It’s set like that, because I don’t want to share an API token in public.

---

<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:** [October 26, 2022, 4:36pm UTC](https://community.postman.com/t/baselinker-api-requests/39709/8 "2022-10-26T16:36:44Z")

</div>

@pablogemba

Ok, but where do you have this set?

Can you confirm that it is set in an environment variable?

---

<div class="post-metadata">

**Author:** ![piotr.weber](https://avatars.discourse-cdn.com/v4/letter/p/b9e5f3/32.png) [@piotr.weber](https://community.postman.com/u/piotr.weber)\
**Post date:** [July 31, 2023, 5:42am UTC](https://community.postman.com/t/baselinker-api-requests/39709/9 "2023-07-31T05:42:38Z")

</div>

Hi guys,  
The problem can be resolved by:

1. Import a cURL file like it has been shown
2. In Body part - parameters, please make sure to input the correct unix time (without “+”)  
 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/0/b/0b8d3e8b18b5233e13309911994a624866853650.png)
3. In authorization  
 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/7/9/798cec79792602283194ae599071f8cfa9cb6bae.png)
4. Headers I’ve got like this:  
 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/4/3/434de8a3ca865b6c2afc88ba1f544c8c807d2bc0.png)

And after all of this it works fine. Hope it helps.

---

<div class="post-metadata">

**Author:** ![research-pilot-84736](https://avatars.discourse-cdn.com/v4/letter/r/dc4da7/32.png) [@research-pilot-84736](https://community.postman.com/u/research-pilot-84736)\
**Post date:** [October 24, 2023, 12:26pm UTC](https://community.postman.com/t/baselinker-api-requests/39709/10 "2023-10-24T12:26:43Z")

</div>

Hello,  
It’s another case with BaseLinker

Generally speaking, my goal is to add and update in live-mode stock positions from [https://www.ordereco.com/stock-position/](https://www.ordereco.com/stock-position/) to BaseLinker virtual warehouse ID: 67017 “E Group BV - local” + catalogue (inventory\_ID = 36705)

I’ve used Kadoa to create GET data

Now, I am generating API call logs (screenshot attached) , but in Postman I’ve stuck on:

{  
“status”: “ERROR”,  
“error\_code”: “ERROR\_STORAGE\_ID”,  
“error\_message”: “Invalid storage identifier provided.”  
}

&

{  
“status”: “ERROR”,  
“error\_code”: “ERROR\_STORAGE\_ID”,  
“error\_message”: “Invalid catalogue identifier provided.”  
}

[https://api.baselinker.com/index.php?method=addInventoryProduct](https://api.baselinker.com/index.php?method=addInventoryProduct)

Thank you in advance for help!

 ![Zrzut ekranu (16)](https://us1.discourse-cdn.com/getpostman/original/3X/2/3/2362b7a8abcd08439047d873214dbf309d71b91c.png)  
 ![Zrzut ekranu (17)](https://us1.discourse-cdn.com/getpostman/original/3X/9/d/9d859f0fe633234ce76d73a9e0f85c97842de38e.png)  
 ![Zrzut ekranu (18)](https://us1.discourse-cdn.com/getpostman/original/3X/1/0/1045ea30fad5052a3b88be8708b8c4d17381f898.png)

---

<div class="post-metadata">

**Author:** ![research-pilot-84736](https://avatars.discourse-cdn.com/v4/letter/r/dc4da7/32.png) [@research-pilot-84736](https://community.postman.com/u/research-pilot-84736)\
**Post date:** [October 25, 2023, 1:06pm UTC](https://community.postman.com/t/baselinker-api-requests/39709/11 "2023-10-25T13:06:42Z")

</div>

we can also use this as example (from Baselinker support)

 ![AK_2023-10-25_14-49-23-f3geh](https://us1.discourse-cdn.com/getpostman/original/3X/a/b/ab9b05c6a06acee4d24e265176833b7808be751b.png)

---

<div class="post-metadata">

**Author:** ![research-pilot-84736](https://avatars.discourse-cdn.com/v4/letter/r/dc4da7/32.png) [@research-pilot-84736](https://community.postman.com/u/research-pilot-84736)\
**Post date:** [October 30, 2023, 10:47am UTC](https://community.postman.com/t/baselinker-api-requests/39709/12 "2023-10-30T10:47:01Z")

</div>

how to configure these parameters?

there are still errors when adding the warehouse ID, product number…

Please somebody

 ![Zrzut ekranu (24)](https://us1.discourse-cdn.com/getpostman/original/3X/c/8/c8cef34887635a6d80cf08a90337f02b9e9873f8.png)  
give me a hint 🙂

{  
“status”: “ERROR”,  
“error\_code”: “ERROR\_STORAGE\_ID”,  
“error\_message”: “Invalid catalogue identifier provided.”  
}

---

<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:** [October 30, 2023, 11:08am UTC](https://community.postman.com/t/baselinker-api-requests/39709/13 "2023-10-30T11:08:36Z")

</div>

@research-pilot-84736

It should be a single parameters field with an JSON string as the value that includes all of the required parameters for that method.

Use the API documentation for the particular method to see what the JSON structure needs to look like.

For example…

[addInventoryProduct - baselinker.com](https://api.baselinker.com/index.php?method=addInventoryProduct)

You might want to consider using one of the online JSON minifier tools to format your JSON string before adding it in Postman.

[JSON Minify Online to Minify, Compact JSON Data and Best (jsonformatter.org)](https://jsonformatter.org/json-minify)

Which will return something like this from the example…

```auto
{"inventory_id":"307","product_id":"2685","is_bundle":false,"ean":"983628103943","sku":"EPL-432","tax_rate":23,"weight":0.25,"height":0.3,"width":0.2,"length":0.05,"star":2,"manufacturer_id":5,"category_id":3,"prices":{"105":20.99,"106":23.99},"stock":{"bl_206":5,"bl_207":7},"locations":{"bl_206":"A-5-2","bl_207":"B-1-5"},"text_fields":{"name":"Harry Potter and the Chamber of Secrets","description":"Basic book description","description_extra1":"Additional description, e.g. of the entire product category","description_extra2":"Second additional description - e.g. IMG tags with photos from an external server","features":{"Cover":"Hardcover","Pages":"300","Language":"English"},"name|de":"Harry Potter und die Kammer des Schreckens"},"images":{"0":"url:http://placehold.it/250x250/image.jpg","3":"url:http://placehold.it/250x250/image2.jpg","5":"url:http://placehold.it/350x350/image34.jpg"},"links":{"shop_23":{"product_id":8,"variant_id":3}}}

```

---

<div class="post-metadata">

**Author:** ![research-pilot-84736](https://avatars.discourse-cdn.com/v4/letter/r/dc4da7/32.png) [@research-pilot-84736](https://community.postman.com/u/research-pilot-84736)\
**Post date:** [October 30, 2023, 12:51pm UTC](https://community.postman.com/t/baselinker-api-requests/39709/14 "2023-10-30T12:51:49Z")

</div>

OK, so add parameters one-by-one using comma separator?  
Was thinking each parameter should have new row

So could you be so kind and advice, how to reach this goal?

> [@research-pilot-84736](#):
>
> Generally speaking, my goal is to add and update in live-mode stock positions from [https://www.ordereco.com/stock-position/](https://www.ordereco.com/stock-position/) to BaseLinker virtual warehouse ID: 67017 “E Group BV - local” + catalogue (inventory\_ID = 36705)
> 
> I’ve used Kadoa to create GET data

---

<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:** [October 30, 2023, 1:09pm UTC](https://community.postman.com/t/baselinker-api-requests/39709/15 "2023-10-30T13:09:28Z")

</div>

> [@research-pilot-84736](#):
>
> OK, so add parameters one-by-one using comma separator?  
> Was thinking each parameter should have new row

No, it needs to be a JSON object as per the documentation.

The field is called “parameters”, not “parameter”.

Like the example I posted in my last post.

---

<div class="post-metadata">

**Author:** ![research-pilot-84736](https://avatars.discourse-cdn.com/v4/letter/r/dc4da7/32.png) [@research-pilot-84736](https://community.postman.com/u/research-pilot-84736)\
**Post date:** [October 30, 2023, 1:29pm UTC](https://community.postman.com/t/baselinker-api-requests/39709/16 "2023-10-30T13:29:13Z")

</div>

Thanks Mike!

Please take a look:

1. I was able to manually add first position from [https://www.ordereco.com/stock-position/](https://www.ordereco.com/stock-position/)
2. I’ve used your example (thank you)
3. How to automate process and sync all products from [https://www.ordereco.com/stock-position/](https://www.ordereco.com/stock-position/) with Baselinker? I’ve generated GET data @ Kadoa

Screenshots attached

Best,  
Lukasz

 ![Zrzut ekranu (28)](https://us1.discourse-cdn.com/getpostman/original/3X/0/c/0cd19f6afac9e6430fef7188be43a2d9b2781d18.png)  
 ![Zrzut ekranu (30)](https://us1.discourse-cdn.com/getpostman/original/3X/2/0/201e92191af38dc1a9ac1afe045ff018a38d2a41.png)  
 ![Zrzut ekranu (27)](https://us1.discourse-cdn.com/getpostman/original/3X/f/c/fcc4e8409f1c888cd41143bfd194625c9808c5f8.png)

---

<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:** [October 30, 2023, 1:49pm UTC](https://community.postman.com/t/baselinker-api-requests/39709/17 "2023-10-30T13:49:23Z")

</div>

Sorry, but I can just see this being one question after another.

I don’t mind helping but you need to have at least tried to do this yourself first as this is your task to complete, not mine.

Therefore I recommend that you visit the Learning Centre in the first instance.

[Overview | Postman Learning Center](https://learning.postman.com/docs/introduction/overview/)

Including the Postman Training links under “Resources”.

![image](https://us1.discourse-cdn.com/getpostman/original/3X/3/b/3b763d56d66445f4c34eeb66c64631335559a741.png)

I would recommend the “Galaxy APIs 101” course first as it gets you used to the application GUI features.

Then the “Galaxy Testing and Automation” course which teaches you how to assert the responses. It includes chaining requests which is what you are now asking.

I would also recommend looking up JSON and JSON arrays in particular, as you will need to learn how to target the elements in the Kadoa response.

---

<div class="post-metadata">

**Author:** ![research-pilot-84736](https://avatars.discourse-cdn.com/v4/letter/r/dc4da7/32.png) [@research-pilot-84736](https://community.postman.com/u/research-pilot-84736)\
**Post date:** [October 30, 2023, 2:06pm UTC](https://community.postman.com/t/baselinker-api-requests/39709/18 "2023-10-30T14:06:04Z")

</div>

Thank you so much

I am not asking for “making the job done”, but some source and clue, how to achieve the goal I am looking for

as I have no coding experience

Best,  
Lukasz

---

<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:** [October 30, 2023, 2:07pm UTC](https://community.postman.com/t/baselinker-api-requests/39709/19 "2023-10-30T14:07:33Z")

</div>

@research-pilot-84736

Hence the recommendation to go through the Learning Centre resources first.

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [October 30, 2023, 5:10pm UTC](https://community.postman.com/t/baselinker-api-requests/39709/20 "2023-10-30T17:10:31Z")

</div>

Closed on October 30, 2023, 5:10pm UTC


