Customers
Get Customer
GET
/
accounts
/
{id}
Get Customer
curl --request GET \
--url https://api.alguna.io/accounts/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.alguna.io/accounts/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.alguna.io/accounts/{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://api.alguna.io/accounts/{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: Bearer <token>"
],
]);
$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.alguna.io/accounts/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.alguna.io/accounts/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.alguna.io/accounts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "ywgWhtGp",
"name": "GoJo",
"aliases": ["JoGo"],
"currency": "USD",
"billingAddress": {
"line1": "123 Main St",
"line2": "Suite 100",
"city": "New York",
"state": "NY",
"postalCode": "10001"
},
"contacts": [
{
"id": "OLgPyqFF",
"email": "sales@gojo.com",
"firstName": "Henry",
"lastName": "Sules",
"isPrimary": true,
"emailPreferences": ["updates"]
},
{
"id": "FdqPzqFG",
"email": "finance@gojo.com",
"firstName": "Accounts",
"lastName": "Receivable",
"isPrimary": false,
"emailPreferences": ["billing"]
}
],
"createdAt": "2023-09-05T21:54:54.609688Z",
"updatedAt": "2023-09-05T21:54:54.609689Z"
}
Params
string
The ID of the account to fetch.
Response
{
"id": "ywgWhtGp",
"name": "GoJo",
"aliases": ["JoGo"],
"currency": "USD",
"billingAddress": {
"line1": "123 Main St",
"line2": "Suite 100",
"city": "New York",
"state": "NY",
"postalCode": "10001"
},
"contacts": [
{
"id": "OLgPyqFF",
"email": "sales@gojo.com",
"firstName": "Henry",
"lastName": "Sules",
"isPrimary": true,
"emailPreferences": ["updates"]
},
{
"id": "FdqPzqFG",
"email": "finance@gojo.com",
"firstName": "Accounts",
"lastName": "Receivable",
"isPrimary": false,
"emailPreferences": ["billing"]
}
],
"createdAt": "2023-09-05T21:54:54.609688Z",
"updatedAt": "2023-09-05T21:54:54.609689Z"
}
string
The Alguna ID of the account.
string
The name of the account.
[]string
The list of alternative or external IDs for the account. These can be used to
identify the account in place of the Alguna
id.[]Contact
The contacts associated with the account.
Show properties
Show properties
string
The Alguna ID of the contact.
string
The email address of the contact.
string
The first name of the contact.
string
The last name of the contact.
string
Whether the contact is the primary contact for the account.
[]string
The email preferences for the contact. Valid values are
updates and
billing.Address
string
The ISO 4217 currency in which the account is billed.
datetime
The date and time at which the account was created.
datetime
The date and time at which the account was last updated.
⌘I
Get Customer
curl --request GET \
--url https://api.alguna.io/accounts/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.alguna.io/accounts/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.alguna.io/accounts/{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://api.alguna.io/accounts/{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: Bearer <token>"
],
]);
$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.alguna.io/accounts/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.alguna.io/accounts/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.alguna.io/accounts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "ywgWhtGp",
"name": "GoJo",
"aliases": ["JoGo"],
"currency": "USD",
"billingAddress": {
"line1": "123 Main St",
"line2": "Suite 100",
"city": "New York",
"state": "NY",
"postalCode": "10001"
},
"contacts": [
{
"id": "OLgPyqFF",
"email": "sales@gojo.com",
"firstName": "Henry",
"lastName": "Sules",
"isPrimary": true,
"emailPreferences": ["updates"]
},
{
"id": "FdqPzqFG",
"email": "finance@gojo.com",
"firstName": "Accounts",
"lastName": "Receivable",
"isPrimary": false,
"emailPreferences": ["billing"]
}
],
"createdAt": "2023-09-05T21:54:54.609688Z",
"updatedAt": "2023-09-05T21:54:54.609689Z"
}