Get customer account by ID
curl --request GET \
--url https://b.anny.co/api/v1/customer-accounts/{customer_account_id}import requests
url = "https://b.anny.co/api/v1/customer-accounts/{customer_account_id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://b.anny.co/api/v1/customer-accounts/{customer_account_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://b.anny.co/api/v1/customer-accounts/{customer_account_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://b.anny.co/api/v1/customer-accounts/{customer_account_id}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://b.anny.co/api/v1/customer-accounts/{customer_account_id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://b.anny.co/api/v1/customer-accounts/{customer_account_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": {
"type": "customer-accounts",
"id": "5fb1965e-66b4-4676-8b04-fbf39d57cc64",
"attributes": {
"title": null,
"sex": 0,
"birth_date": null,
"given_name": "Florian",
"family_name": "Schmitt",
"email": "florian.schmitt@anny.co",
"company": null,
"mobile": "+491741234656",
"mobile_verified_at": null,
"phone": null,
"locale": "en",
"timezone": "UTC",
"activated_at": null,
"created_at": "2021-09-24T09:37:35.000000Z",
"updated_at": "2021-09-24T09:38:38.000000Z"
},
"links": {
"self": "https://b.anny.co/api/v1/customer-accounts/5fb1965e-66b4-4676-8b04-fbf39d57cc64"
}
}
}{
"errors": [
{
"status": "401",
"code": "jwt_token_invalid",
"title": "Token invalid.",
"detail": "The token is invalid."
}
]
}Account
Get customer account information
GET
/
api
/
v1
/
customer-accounts
/
{customer_account_id}
Get customer account by ID
curl --request GET \
--url https://b.anny.co/api/v1/customer-accounts/{customer_account_id}import requests
url = "https://b.anny.co/api/v1/customer-accounts/{customer_account_id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://b.anny.co/api/v1/customer-accounts/{customer_account_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://b.anny.co/api/v1/customer-accounts/{customer_account_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://b.anny.co/api/v1/customer-accounts/{customer_account_id}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://b.anny.co/api/v1/customer-accounts/{customer_account_id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://b.anny.co/api/v1/customer-accounts/{customer_account_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": {
"type": "customer-accounts",
"id": "5fb1965e-66b4-4676-8b04-fbf39d57cc64",
"attributes": {
"title": null,
"sex": 0,
"birth_date": null,
"given_name": "Florian",
"family_name": "Schmitt",
"email": "florian.schmitt@anny.co",
"company": null,
"mobile": "+491741234656",
"mobile_verified_at": null,
"phone": null,
"locale": "en",
"timezone": "UTC",
"activated_at": null,
"created_at": "2021-09-24T09:37:35.000000Z",
"updated_at": "2021-09-24T09:38:38.000000Z"
},
"links": {
"self": "https://b.anny.co/api/v1/customer-accounts/5fb1965e-66b4-4676-8b04-fbf39d57cc64"
}
}
}{
"errors": [
{
"status": "401",
"code": "jwt_token_invalid",
"title": "Token invalid.",
"detail": "The token is invalid."
}
]
}Pfadparameter
Abfrageparameter
Include relations. Relevant business-account includes: business_account, business_account.logo_image, business_account.primary_address.
Beispiel:
"business_account.logo_image,business_account.primary_address"
Antwort
OK
An end-user account (authenticated customer) with profile and community features.
Show child attributes
Show child attributes
⌘I