Get a customer
Get
bash
https://api.bunce.so/v1/customers/{customer_id}
Returns a customer using a customer ID.
Request
Path Parameter string required
customer_id string
required
Customer ID of the customer entity to work with.
bash
curl --request GET \
--url https://api.bunce.so/v1/customers/0000 \
--header 'X-Authorization: sk_live_************************'
go
import (
"fmt"
"net/http"
"io/ioutil"
)
url := "https://api.bunce.so/v1/customers/0000"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Authorization", "sk_live_************************")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
js
import from 'node-fetch'
let = 'https://api.bunce.so/v1/customers/0000'
let = {
: 'GET',
: {
'X-Authorization': 'sk_live_************************',
},
}
(, )
.then(() => .json())
.then(() => .())
.catch(() => .('error:' + ))
php
<?php
$client = new http\Client;
$request = new http\Client\Request;
$request->setRequestUrl('https://api.bunce.so/v1/customers/0000');
$request->setRequestMethod('GET');
$request->setHeaders([
'X-Authorization' => 'sk_live_************************'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
java
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.bunce.so/v1/customers/0000"))
.header("X-Authorization", "sk_live_************************")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
Response
json
{
"data": {
"customer_id": "0000",
"first_name": "John",
"last_name": "Doe",
"email": "johndoe@example.com",
"phone_no": "+23481999999999",
"customer_created_at": "2023-12-17T08:45:52Z",
"updated_at": "2023-12-17T08:45:52Z",
"providers": null,
"last_interaction": null
},
"message": "Customer details",
"success": true
}