Forum Discussion

XavierSA's avatar
XavierSA
New Member
3 years ago

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