curl --request GET \
--url https://api.bspk.com/api/extraction/v1/clients \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.bspk.com/api/extraction/v1/clients"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.bspk.com/api/extraction/v1/clients', 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.bspk.com/api/extraction/v1/clients",
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.bspk.com/api/extraction/v1/clients"
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.bspk.com/api/extraction/v1/clients")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bspk.com/api/extraction/v1/clients")
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[
{
"bspk_id": 12345,
"current_sales_associate_id": "SA_01",
"current_sales_associate_name": "FirstName-84 LastName-84",
"current_store_id": null,
"current_store_name": null,
"client_id": "EXTERNAL_ID_150",
"name": "FirstName-85 LastName-85",
"first_name": "FirstName-85",
"last_name": "LastName-85",
"email": "someone92@example.com",
"mobile_phone": "+14153400067",
"other_phone": "+14153400067",
"birthday": null,
"gender": null,
"nationality": null,
"passport_number": null,
"language": null,
"title": null,
"address": "",
"addresses": [
{
"address": null,
"address_2": null,
"address_3": null,
"address_4": null,
"city": null,
"state": null,
"zip": null,
"country_code": null,
"notes": null
}
],
"preferred_contact_channel": null,
"communication_preferences": {
"chat_opt_in": true,
"email_opt_in": true,
"phone_opt_in": true,
"whatsapp_opt_in": false,
"wechat_opt_in": false,
"line_opt_in": false,
"opt_out": false
},
"preferences": [],
"interests": [],
"preferred_journey": null,
"segment": null,
"referred_by_client_id": null,
"referred_at": null,
"consent": false,
"notify_of_new_collection": false,
"last_contacted_at": "2024-08-02T12:29:24.068Z",
"created_at": "2024-08-07T12:29:24.099Z",
"updated_at": "2024-08-07T12:29:24.099Z"
}
]List Clients
List clients
curl --request GET \
--url https://api.bspk.com/api/extraction/v1/clients \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.bspk.com/api/extraction/v1/clients"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.bspk.com/api/extraction/v1/clients', 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.bspk.com/api/extraction/v1/clients",
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.bspk.com/api/extraction/v1/clients"
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.bspk.com/api/extraction/v1/clients")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bspk.com/api/extraction/v1/clients")
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[
{
"bspk_id": 12345,
"current_sales_associate_id": "SA_01",
"current_sales_associate_name": "FirstName-84 LastName-84",
"current_store_id": null,
"current_store_name": null,
"client_id": "EXTERNAL_ID_150",
"name": "FirstName-85 LastName-85",
"first_name": "FirstName-85",
"last_name": "LastName-85",
"email": "someone92@example.com",
"mobile_phone": "+14153400067",
"other_phone": "+14153400067",
"birthday": null,
"gender": null,
"nationality": null,
"passport_number": null,
"language": null,
"title": null,
"address": "",
"addresses": [
{
"address": null,
"address_2": null,
"address_3": null,
"address_4": null,
"city": null,
"state": null,
"zip": null,
"country_code": null,
"notes": null
}
],
"preferred_contact_channel": null,
"communication_preferences": {
"chat_opt_in": true,
"email_opt_in": true,
"phone_opt_in": true,
"whatsapp_opt_in": false,
"wechat_opt_in": false,
"line_opt_in": false,
"opt_out": false
},
"preferences": [],
"interests": [],
"preferred_journey": null,
"segment": null,
"referred_by_client_id": null,
"referred_at": null,
"consent": false,
"notify_of_new_collection": false,
"last_contacted_at": "2024-08-02T12:29:24.068Z",
"created_at": "2024-08-07T12:29:24.099Z",
"updated_at": "2024-08-07T12:29:24.099Z"
}
]Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Client id owned by the brand
Sales Associate id owned by the brand
Only show clients created after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Combined with the from parameter, only show clients created within the given range (from..to) time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Selects the column that from and to filter, and the column that orders the result. A request that does not send sort uses created_at, which is the creation time. updated_at is the time of the last change: use it to extract a delta of the clients that changed after your last extraction. The other extraction endpoints do not accept this parameter and answer HTTP 422 when a request sends it.
created_at, updated_at Page number of the results to fetch. Default: 1
Results per page (max 1000). Default: 100
Response
Successful response, returns array of clients
BSPK internal unique identifier of the client
Unique identifier of the client
Full name of the client
Title of the client
Address of the client consolidated
Show child attributes
Show child attributes
Email of the client
Mobile phone of the client
Other phone of the client
Birthday of the client
Gender of the client
M, F, NB, null Nationality of the client
Passport Number of the client
Language of the client
The preferred channel of the client
chat, email, line, whastapp, wechat, call, null Unique identifier of the associate that the client is assigned to
Full name of the associate that the client is assigned to
Unique identifier of the store that the client is assigned to
Name of the store that the client is assigned to
Show child attributes
Show child attributes
Show child attributes
Show child attributes
The Segmentention which the client is assigned to
The Journey which the client is assigned to
Unique identifier of the client that referred this client
The date when the client referral was recorded in BSPK
Whether or not the client has given consent
Whether or not the client wants to be notified of new collections
The last date the client was contacted by a Sales Associate
Timestamp of when the client was created
Timestamp of when the client was updated
First name of the client
Last name of the client
