Get clients' ideabook actions (likes, dislikes, wishlists)
curl --request GET \
--url https://api.bspk.com/api/extraction/v1/ideabook_actions \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.bspk.com/api/extraction/v1/ideabook_actions"
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/ideabook_actions', 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/ideabook_actions",
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/ideabook_actions"
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/ideabook_actions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bspk.com/api/extraction/v1/ideabook_actions")
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{
"CLIENT_ID_2": [
{
"created_by_sales_associate_id": "SALES_ASOCIATE_ID_1",
"skus": [
"SKU_3",
"SKU_4"
],
"created_date": "2021-03-30T12:40:30.000Z",
"feedback_date": "2024-08-07T12:29:25.370Z",
"feedback_type": "Remove like",
"item_id": "ITEM_ID_2",
"image_url": "https://fake.cdn.aws.com/media/000/000/007/original/file-name-7."
},
{
"created_by_sales_associate_id": null,
"skus": null,
"created_date": "2021-04-01T17:25:10.000Z",
"feedback_date": "2024-08-07T12:29:25.399Z",
"feedback_type": "Remove dislike",
"item_id": null,
"image_url": "https://fake.cdn.aws.com/media/000/000/008/original/file-name-8."
},
{
"created_by_sales_associate_id": "SALES_ASOCIATE_ID_1",
"skus": [
"SKU_3",
"SKU_4"
],
"created_date": "2021-04-03T20:10:20.000Z",
"feedback_date": "2024-08-07T12:29:25.406Z",
"feedback_type": "Remove from wishlist",
"item_id": "ITEM_ID_2",
"image_url": "https://fake.cdn.aws.com/media/000/000/007/original/file-name-7."
}
],
"CLIENT_ID_1": [
{
"created_by_sales_associate_id": "SALES_ASOCIATE_ID_1",
"skus": [
"SKU_1",
"SKU_2"
],
"created_date": "2021-03-30T12:40:30.000Z",
"feedback_date": "2024-08-07T12:29:25.190Z",
"feedback_type": "Like",
"item_id": "ITEM_ID_1",
"image_url": "https://fake.cdn.aws.com/media/000/000/005/original/file-name-5."
},
{
"created_by_sales_associate_id": null,
"skus": null,
"created_date": "2021-04-01T17:25:10.000Z",
"feedback_date": "2024-08-07T12:29:25.291Z",
"feedback_type": "Dislike",
"item_id": null,
"image_url": "https://fake.cdn.aws.com/media/000/000/006/original/file-name-6."
},
{
"created_by_sales_associate_id": "SALES_ASOCIATE_ID_1",
"skus": [
"SKU_1",
"SKU_2"
],
"created_date": "2021-04-03T20:10:20.000Z",
"feedback_date": "2024-08-07T12:29:25.337Z",
"feedback_type": "Add to wishlist",
"item_id": "ITEM_ID_1",
"image_url": "https://fake.cdn.aws.com/media/000/000/005/original/file-name-5."
}
],
"NON_EXISTING_CLIENT_ID": []
}{
"errors": [
{
"title": "No clients found with IDs: [NON_EXISTING_ID, OTHER_NON_EXISTING_ID]",
"code": "not_found"
}
]
}Ideabook
Get clients' ideabook actions (likes, dislikes, wishlists)
Gets a list of ideabook actions for specified clients. The actions include all reactions to ideabook objects (ideabook object can stand for an item or simply attachment shared by sales associate like image or video). Among type of actions that might be performed by client there are:
- like
- dislike
- adding to wishlist
- like removal
- dislike removal
- removing from wishlist
If there are no clients found with given client IDs the API returns an error about no records found.
If among passed clients IDs in the query parameter there is at least one client who exists in the database the API will return an object with client IDs as keys and an array of ideabook actions as values. IDs of the clients that weren’t found in the DB will not be returned in the response object.
GET
/
api
/
extraction
/
v1
/
ideabook_actions
Get clients' ideabook actions (likes, dislikes, wishlists)
curl --request GET \
--url https://api.bspk.com/api/extraction/v1/ideabook_actions \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.bspk.com/api/extraction/v1/ideabook_actions"
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/ideabook_actions', 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/ideabook_actions",
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/ideabook_actions"
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/ideabook_actions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bspk.com/api/extraction/v1/ideabook_actions")
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{
"CLIENT_ID_2": [
{
"created_by_sales_associate_id": "SALES_ASOCIATE_ID_1",
"skus": [
"SKU_3",
"SKU_4"
],
"created_date": "2021-03-30T12:40:30.000Z",
"feedback_date": "2024-08-07T12:29:25.370Z",
"feedback_type": "Remove like",
"item_id": "ITEM_ID_2",
"image_url": "https://fake.cdn.aws.com/media/000/000/007/original/file-name-7."
},
{
"created_by_sales_associate_id": null,
"skus": null,
"created_date": "2021-04-01T17:25:10.000Z",
"feedback_date": "2024-08-07T12:29:25.399Z",
"feedback_type": "Remove dislike",
"item_id": null,
"image_url": "https://fake.cdn.aws.com/media/000/000/008/original/file-name-8."
},
{
"created_by_sales_associate_id": "SALES_ASOCIATE_ID_1",
"skus": [
"SKU_3",
"SKU_4"
],
"created_date": "2021-04-03T20:10:20.000Z",
"feedback_date": "2024-08-07T12:29:25.406Z",
"feedback_type": "Remove from wishlist",
"item_id": "ITEM_ID_2",
"image_url": "https://fake.cdn.aws.com/media/000/000/007/original/file-name-7."
}
],
"CLIENT_ID_1": [
{
"created_by_sales_associate_id": "SALES_ASOCIATE_ID_1",
"skus": [
"SKU_1",
"SKU_2"
],
"created_date": "2021-03-30T12:40:30.000Z",
"feedback_date": "2024-08-07T12:29:25.190Z",
"feedback_type": "Like",
"item_id": "ITEM_ID_1",
"image_url": "https://fake.cdn.aws.com/media/000/000/005/original/file-name-5."
},
{
"created_by_sales_associate_id": null,
"skus": null,
"created_date": "2021-04-01T17:25:10.000Z",
"feedback_date": "2024-08-07T12:29:25.291Z",
"feedback_type": "Dislike",
"item_id": null,
"image_url": "https://fake.cdn.aws.com/media/000/000/006/original/file-name-6."
},
{
"created_by_sales_associate_id": "SALES_ASOCIATE_ID_1",
"skus": [
"SKU_1",
"SKU_2"
],
"created_date": "2021-04-03T20:10:20.000Z",
"feedback_date": "2024-08-07T12:29:25.337Z",
"feedback_type": "Add to wishlist",
"item_id": "ITEM_ID_1",
"image_url": "https://fake.cdn.aws.com/media/000/000/005/original/file-name-5."
}
],
"NON_EXISTING_CLIENT_ID": []
}{
"errors": [
{
"title": "No clients found with IDs: [NON_EXISTING_ID, OTHER_NON_EXISTING_ID]",
"code": "not_found"
}
]
}⌘I
