Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
XavierSA
New Member

API connection with Holded ERP

Dear all,

Pleased to be here writing my firs question. I've been reading your post for years.

I'm trying to connect my ERP solution (Holded) directly with an API but I'm not very skilled on it.

We could find a lot of info at: https://developers.holded.com/reference/api-key

I would like to start importing contacts information, info at: https://developers.holded.com/reference/list-contacts-1 . Here we could find a code box with the code to be pasted on the app that will use the API connection, it's easy to select a specific coding language but M is no one of the options. About authentication, I've got the API-key it in another place and it runs properly on the browser when I pressed "Try it!".

* Python:

import requests

url = "https://api.holded.com/api/invoicing/v1/contacts"

headers = {
"accept": "application/json",
"key": "xxxxxxxxxxxxxx"
}

response = requests.get(url, headers=headers)

print(response.text)

 

* C++:

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "https://api.holded.com/api/invoicing/v1/contacts");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "accept: application/json");
headers = curl_slist_append(headers, "key: xxxxxxxxxxxxxx");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);

 

* HTTP:

GET /api/invoicing/v1/contacts HTTP/1.1
Accept: application/json
Key: xxxxxxxxxxxxxx
Host: api.holded.com

 

I tried many options coping other posts but I didn't get the solution.

 

Could you help me?

 

Thanks in advance!

 

4 REPLIES 4
XavierSA
New Member

Thank you very much Artemus.

I tried it but there is something more to do. I did:

- Blank query

- Erase let / in schema

- paste directly 

Web.Contents("https://api.holded.com/api/invoicing/v1/contacts", [Headers=[Accept="application/json"], ApiKeyName="Key"])

- Replace "key" with my key "exxxxxxxx..."

- Power BI send a message to "edit credentials"

- I put my API key at "API Web"

- Power BI show a message asking that it couldn't authenticate the credentials.

 

I don't know what I did wrong.

Maybe It is related with:  (https://developers.holded.com/reference/api-key)

All API requests must be made over HTTPS and Content-type as application/json.

- Include your Api Key in the Header key : . I also tested:

    * 1:

= Web.Contents("https://api.holded.com/api/invoicing/v1/contacts", [Headers=[Accept="application/json"],
ApiKeyName="...

   * 2:

= Web.Contents("https://api.holded.com/api/invoicing/v1/contacts", [Headers=[Accept="application/json"],
ApiKeyName="...

 

 

 

artemus
Microsoft Employee
Microsoft Employee

You do not replace "key". "key" refers to the name of the password field in the header. 

artemus
Microsoft Employee
Microsoft Employee

The code for this would look like:

Web.Contents("https://api.holded.com/api/invoicing/v1/contacts", [Headers=[Accept="application/json"], ApiKeyName="Key"])

 If this works, you should be prompted to enter in the value for the key when you fill in the connection details.

Thank you very much for your answers Artemus,

 

I didn't get the result we expected. I see that:

Captura6.jpg

I tried with the 2 options of levels as https://api.holded.com/api/invoicing/v1  & https://api.holded.com/api/invoicing/v1/contacts without success.

 

I also see that on the technical info of Holded ERP : "Calls made over plain HTTP will fail. API requests without authentication will also fail. "

If I succeed connecting it I will come back and inform.

 

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors