Skip to main content
GET
/
timmi-project
/
api
/
v4
/
clients
/
{id}
Get a Client by id
curl --request GET \
  --url https://{host}/timmi-project/api/v4/clients/{id} \
  --header 'Authorization: <authorization>'
import requests

url = "https://{host}/timmi-project/api/v4/clients/{id}"

headers = {"Authorization": "<authorization>"}

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

print(response.text)
const options = {method: 'GET', headers: {Authorization: '<authorization>'}};

fetch('https://{host}/timmi-project/api/v4/clients/{id}', 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://{host}/timmi-project/api/v4/clients/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);

$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://{host}/timmi-project/api/v4/clients/{id}"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "<authorization>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://{host}/timmi-project/api/v4/clients/{id}")
.header("Authorization", "<authorization>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://{host}/timmi-project/api/v4/clients/{id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'

response = http.request(request)
puts response.read_body
{
  "name": "<string>",
  "code": "<string>",
  "id": 123,
  "externalCode": "<string>",
  "owner": {
    "id": 2,
    "firstName": "<string>",
    "lastName": "<string>",
    "dtContractEnd": "<string>",
    "picture": {
      "href": "<string>"
    },
    "establishmentId": 2
  }
}
{
"type": "<string>",
"title": "<string>",
"traceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"errors": {}
}
{
"type": "<string>",
"title": "<string>",
"traceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"errors": {}
}
{
"type": "<string>",
"title": "<string>",
"traceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"errors": {}
}
{
"type": "<string>",
"title": "<string>",
"traceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"errors": {}
}

Headers

Authorization
string
required

API key. Value must be formatted like so: lucca application={api_key}.

Path Parameters

id
integer
required

Identifier of the client.

Response

OK

A client must belong to a single organization [blocked].

The organizationId field is required upon creation (POST) and cannot be modified later.

name
string
required
Minimum string length: 1
code
string
required

Unique code for this client. Used for identifying the client in invoices export if externalCode is null.

Minimum string length: 1
id
number
read-only
externalCode
null | string

Used for identifying the client in invoices exports. Is not subject to unicity.

owner
null | object
read-only