Obtener datos de empresa
curl --request GET \
--url https://api.kubifactu.com/api/clientcompanies/{companyId} \
--header 'X-Qbikode-UserApiKey: <api-key>'import requests
url = "https://api.kubifactu.com/api/clientcompanies/{companyId}"
headers = {"X-Qbikode-UserApiKey": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Qbikode-UserApiKey': '<api-key>'}};
fetch('https://api.kubifactu.com/api/clientcompanies/{companyId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.kubifactu.com/api/clientcompanies/{companyId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Qbikode-UserApiKey: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.kubifactu.com/api/clientcompanies/{companyId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Qbikode-UserApiKey", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.kubifactu.com/api/clientcompanies/{companyId}")
.header("X-Qbikode-UserApiKey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kubifactu.com/api/clientcompanies/{companyId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Qbikode-UserApiKey"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "9dcccd85-496d-4ed8-8f78-edfacac68964",
"company_name": "Empresa de ejemplo",
"tax_id_number": "S6271969E",
"email": "[email protected]",
"api_key": "Xxv3en85OJOtI7Q6XFNGuA3FPwDNsnhk1kbtlQ5RgRSAdoo47eSGGYbgfLs8Qf2obGJluvY28a0tIqeM1UjzdbHDSDp1Q0fNX9sz"
}
}{
"data": {
"error": {
"code": "E-UNAUTH-APIKEY",
"message": "No client with API-KEY '5tVySMGJOpq8HfMgIX28Qz6kF0dFOoq37x55PLZcWsGeGeYkNgJyAcRTlFJ5NbVoDRm8qtCywEoiN3A9JkBanMBXYmxiqR3BItxgxx' was found.",
"http_code": 403,
"errors": null,
"details": {
"request_id": "2cc8ef846029ec69613711ad1d85f6dfebf16ffb"
}
}
}
}{
"data": {
"error": {
"message": "Client Company with id [0195fa87-a315-710a-8aa2-25e1d690f6tr] not found.",
"errors": null,
"details": {
"request_id": "2cc8ef846029ec69613711ad1d85f6dfebf16ffb"
}
}
}
}API Reference
Obtener datos de empresa
Devuelve los datos de la empresa.
GET
/
api
/
clientcompanies
/
{companyId}
Obtener datos de empresa
curl --request GET \
--url https://api.kubifactu.com/api/clientcompanies/{companyId} \
--header 'X-Qbikode-UserApiKey: <api-key>'import requests
url = "https://api.kubifactu.com/api/clientcompanies/{companyId}"
headers = {"X-Qbikode-UserApiKey": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Qbikode-UserApiKey': '<api-key>'}};
fetch('https://api.kubifactu.com/api/clientcompanies/{companyId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.kubifactu.com/api/clientcompanies/{companyId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Qbikode-UserApiKey: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.kubifactu.com/api/clientcompanies/{companyId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Qbikode-UserApiKey", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.kubifactu.com/api/clientcompanies/{companyId}")
.header("X-Qbikode-UserApiKey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kubifactu.com/api/clientcompanies/{companyId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Qbikode-UserApiKey"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "9dcccd85-496d-4ed8-8f78-edfacac68964",
"company_name": "Empresa de ejemplo",
"tax_id_number": "S6271969E",
"email": "[email protected]",
"api_key": "Xxv3en85OJOtI7Q6XFNGuA3FPwDNsnhk1kbtlQ5RgRSAdoo47eSGGYbgfLs8Qf2obGJluvY28a0tIqeM1UjzdbHDSDp1Q0fNX9sz"
}
}{
"data": {
"error": {
"code": "E-UNAUTH-APIKEY",
"message": "No client with API-KEY '5tVySMGJOpq8HfMgIX28Qz6kF0dFOoq37x55PLZcWsGeGeYkNgJyAcRTlFJ5NbVoDRm8qtCywEoiN3A9JkBanMBXYmxiqR3BItxgxx' was found.",
"http_code": 403,
"errors": null,
"details": {
"request_id": "2cc8ef846029ec69613711ad1d85f6dfebf16ffb"
}
}
}
}{
"data": {
"error": {
"message": "Client Company with id [0195fa87-a315-710a-8aa2-25e1d690f6tr] not found.",
"errors": null,
"details": {
"request_id": "2cc8ef846029ec69613711ad1d85f6dfebf16ffb"
}
}
}
}Authorizations
API-KEY del intermediario que hace la petición. Este dato se puede consultar en el panel web, en la página de Perfil de usuario.
Path Parameters
ID de la empresa a editar.
Response
Datos de la empresa.
Show child attributes
Show child attributes
⌘I