List address books
curl --request GET \
--url https://api-contact.beem.africa/public/v1/address-books \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api-contact.beem.africa/public/v1/address-books"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api-contact.beem.africa/public/v1/address-books', 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-contact.beem.africa/public/v1/address-books",
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: Basic <encoded-value>"
],
]);
$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-contact.beem.africa/public/v1/address-books"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
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-contact.beem.africa/public/v1/address-books")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-contact.beem.africa/public/v1/address-books")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"data": [
{
"addressbook": "Default",
"contacts_count": 30,
"description": "",
"created": "2021-03-10T19:10:47.708Z",
"id": "604919718fb019194453764e"
},
{
"description": "Test Group",
"addressbook": "Trial",
"contacts_count": 0,
"created": "2021-07-08T14:28:54.155Z",
"id": "60e70ba6ffe24b0019011782"
}
],
"pagination": {
"totalItems": 2,
"currentPage": 1,
"pageSize": 10,
"totalPages": 1,
"startPage": 1,
"endPage": 1,
"startIndex": 0,
"endIndex": 0,
"pages": [
1
]
}
}{
"code": 120,
"message": "Invalid Authorization Parameters"
}API Reference
List address books
GET
/
address-books
List address books
curl --request GET \
--url https://api-contact.beem.africa/public/v1/address-books \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api-contact.beem.africa/public/v1/address-books"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api-contact.beem.africa/public/v1/address-books', 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-contact.beem.africa/public/v1/address-books",
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: Basic <encoded-value>"
],
]);
$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-contact.beem.africa/public/v1/address-books"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
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-contact.beem.africa/public/v1/address-books")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-contact.beem.africa/public/v1/address-books")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"data": [
{
"addressbook": "Default",
"contacts_count": 30,
"description": "",
"created": "2021-03-10T19:10:47.708Z",
"id": "604919718fb019194453764e"
},
{
"description": "Test Group",
"addressbook": "Trial",
"contacts_count": 0,
"created": "2021-07-08T14:28:54.155Z",
"id": "60e70ba6ffe24b0019011782"
}
],
"pagination": {
"totalItems": 2,
"currentPage": 1,
"pageSize": 10,
"totalPages": 1,
"startPage": 1,
"endPage": 1,
"startIndex": 0,
"endIndex": 0,
"pages": [
1
]
}
}{
"code": 120,
"message": "Invalid Authorization Parameters"
}Authorizations
basicAuthaccessToken
Beem API credentials: API key as username, API secret as password.
Query Parameters
Page number for pagination (default: 1).
Required range:
x >= 1Number of items per page (default: 10).
Required range:
x >= 1Search query to filter address books by name (case-insensitive, partial match).
Filter by parent vendor ID (reseller accounts).
Filter address books created on or after this date.
Filter address books created on or before this date.
⌘I
