Klanten ophalen
/v1/clients
Authorization: HTTP
Query
| Naam | Type | Beschrijving |
|---|---|---|
page
|
integer | Paginanummer (vanaf 1, default 1) |
per_page
|
integer | Items per pagina (default 25, max 200) |
search
|
string | Zoeken |
contact_type
|
string | Filter op contacttype |
Request body
Geen
Response
b2c3d4e5-f6a7-8901-bcde-f12345678901
company
private
company
Voorbeeld BV
null
null
[email protected]
+31612345678
Amsterdam
NL
D-1001
1
25
1
1
{
"data": [
{
"guid": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"type": "company",
"company_name": "Voorbeeld BV",
"firstname": null,
"lastname": null,
"email": "[email protected]",
"phone": "+31612345678",
"city": "Amsterdam",
"country": "NL",
"debtor_number": "D-1001"
}
],
"meta": {
"page": 1,
"per_page": 25,
"total": 1,
"pages": 1
}
}
Examples
curl -X GET "https://api.appficient.nl/v1/clients" \
-H "Authorization: Bearer apf_xxxxxxxx" \
-H "Accept: application/json"
import requests
url = 'https://api.appficient.nl/v1/clients'
headers = {
'Authorization': 'Bearer apf_xxxxxxxx',
'Accept': 'application/json',
}
response = requests.get(url, headers=headers)
data = response.json()
const url = 'https://api.appficient.nl/v1/clients';
const options = {
method: 'GET',
headers: {
Authorization: 'Bearer apf_xxxxxxxx',
Accept: 'application/json',
},
};
const res = await fetch(url, options);
const json = await res.json();
<?php
$url = 'https://api.appficient.nl/v1/clients';
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer apf_xxxxxxxx',
'Accept: application/json',
],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
$json = json_decode($response, true);
postman request GET 'https://api.appficient.nl/v1/clients' \
--header 'Authorization: Bearer apf_xxxxxxxx' \
--header 'Accept: application/json'
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using var client = new HttpClient();
client.DefaultRequestHeaders.Authorization =
new AuthenticationHeaderValue("Bearer", "apf_xxxxxxxx");
client.DefaultRequestHeaders.Accept.Add(
new MediaTypeWithQualityHeaderValue("application/json"));
using var request = new HttpRequestMessage(
HttpMethod.Get,
"https://api.appficient.nl/v1/clients");
var response = await client.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
HttpClient client = HttpClient.newHttpClient();
HttpRequest.Builder builder = HttpRequest.newBuilder()
.uri(URI.create("https://api.appficient.nl/v1/clients"))
.header("Accept", "application/json")
.header("Authorization", "Bearer apf_xxxxxxxx");
HttpRequest request = builder.GET().build();
HttpResponse<String> response = client.send(
request, HttpResponse.BodyHandlers.ofString());
String json = response.body();
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
req, err := http.NewRequest("GET", "https://api.appficient.nl/v1/clients", nil)
if err != nil {
panic(err)
}
req.Header.Set("Accept", "application/json")
req.Header.Set("Authorization", "Bearer apf_xxxxxxxx")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
fmt.Println(res.StatusCode, string(data))
}
require 'net/http'
require 'json'
require 'uri'
uri = URI('https://api.appficient.nl/v1/clients')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
req = Net::HTTP::Get.new(uri)
req['Accept'] = 'application/json'
req['Authorization'] = 'Bearer apf_xxxxxxxx'
res = http.request(req)
data = JSON.parse(res.body)
{
"data": [
{
"guid": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"type": "company",
"company_name": "Voorbeeld BV",
"firstname": null,
"lastname": null,
"email": "[email protected]",
"phone": "+31612345678",
"city": "Amsterdam",
"country": "NL",
"debtor_number": "D-1001"
}
],
"meta": {
"page": 1,
"per_page": 25,
"total": 1,
"pages": 1
}
}
Curl, Node en response staan rechts naast dit endpoint.