Fetch all attributes
Get
bash
https://api.bunce.so/v1/attributes
Returns a paginated list of attributes.
Request
Query Parameters
per_page int | Specify how many records you want to retrieve per page. If not specify we use a default value of 20. |
cursor string | Specify exactly what cursor you want to retrieve. |
bash
curl --request GET \
--url 'https://api.bunce.so/v1/attributes' \
--header 'Accept: application/json' \
--header 'X-Authorization: sk_live_************************'
go
import (
"fmt"
"net/http"
"io/ioutil"
)
url := "https://api.bunce.so/v1/attributes"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Accept", "application/json")
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/attributes'
let = {
: 'GET',
: {
: 'application/json',
'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/attributes');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'page' => '1',
'per_page' => '10'
]));
$request->setHeaders([
'Accept' => 'application/json',
'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/attributes"))
.header("Accept", "application/json")
.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
{
"success": true,
"data": [
{
"id": "9b7b5e35-9785-4d92-91d0-d1c63d178b4a",
"name": "new update",
"data_type": "text"
},
{
"id": "9b7b5e35-b249-41c7-bd68-9f715ea0d1ca",
"name": "last_name",
"data_type": "text"
},
{
"id": "9b7b5e35-b714-435b-be8d-f2b78d0eff82",
"name": "email",
"data_type": "text"
},
{
"id": "9b7b5e35-bb4b-4780-af02-0814108d264b",
"name": "phone_number",
"data_type": "text"
},
{
"id": "9b7b5e35-d153-47ff-960d-0c115f9ec597",
"name": "date_of_birth",
"data_type": "text"
},
{
"id": "9b7b5e35-fc71-4ad6-998e-cdede9ea8087",
"name": "device_token",
"data_type": "text"
},
{
"id": "9b7b5e36-0113-4a4f-a950-6c9c60d4750e",
"name": "device_type",
"data_type": "text"
},
{
"id": "9b7d554b-77a1-41d4-806c-24bad46632b2",
"name": "New Attribute II",
"data_type": "text"
},
{
"id": "9b7df08f-1215-40c0-b46f-2df5cbff4017",
"name": "Date Of Birth",
"data_type": "date"
},
{
"id": "9bb5f516-cb05-4f4a-95f9-47f10999429c",
"name": "Another Attribute",
"data_type": "text"
},
{
"id": "9bb64536-6bad-4980-bd16-439e26cf7975",
"name": "Date of Birth",
"data_type": "date"
}
],
"meta": {
"has_next_page": false,
"has_prev_page": false,
"next_page_cursor": null,
"prev_page_cursor": null,
"per_page": 20
},
"message": "Company attributes fetched successfully"
}
json
{
"success": true,
"data": [],
"meta": {
"has_next_page": false,
"has_prev_page": false,
"next_page_cursor": null,
"prev_page_cursor": null,
"per_page": 20
},
"message": "Company attributes fetched successfully"
}