Get vendor connections - Fabric
Get vendor connections
cURL
curl --request GET \
--url https://marketplace-api.fabric.inc/v1/retailers/{retailer_pk}/connections/ \
--header 'Authorization: Bearer <token>'
Python
import requests
url = "https://marketplace-api.fabric.inc/v1/retailers/{retailer_pk}/connections/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)
JavaScript (Fetch)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://marketplace-api.fabric.inc/v1/retailers/{retailer_pk}/connections/', 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://marketplace-api.fabric.inc/v1/retailers/{retailer_pk}/connections/",
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;
}
Go
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://marketplace-api.fabric.inc/v1/retailers/{retailer_pk}/connections/"
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))
}
HTTP Response Example
{
"count": 1023,
"results": [
{
"id": 1000,
"brand": {
"code": "demo-brand",
"id": 500,
"name": "Marla Cielo",
"joined_at": "2022-09-10T15:24:56Z",
"logo_url": "https://images.revcascade.com/retailers/defaults/logo-lg.png",
"cover_url": "https://images.revcascade.com/retailers/defaults/cover.png",
"profile_tile_url": "https://images.revcascade.com/retailers/defaults/profile-tile.png",
"requires_subscription": "enabled",
"subscription_expires_at": "2024-09-19T13:32:10Z",
"grace_period_ends_at": "2024-10-26T13:32:10Z"
},
"retailer": {
"name": "Demo Retailer",
"code": "demo-retailer",
"id": 500,
"logo_url": "https://images.demo.com/retailers/5ef41f6c-3361-40b7-86ce-ecd79c52e9a2/store/logo-lg.png",
"website": "https://demoabc.com",
"joined_at": "2021-08-03T17:24:12Z"
},
"level": "full",
"status": "active",
"shipping_accounts": [
{
"nickname": "Sample13",
"owner": "DemoABC",
"carrier": "ALP Brand",
"shipping_methods": {
"name": "White Glove Bronze",
"code": "cory_white_glove",
"type": "ltl (less than truck load)"
}
}
],
"contacts": [
{
"name": "sample contact",
"email": "demo@xyz.com"
}
]
}
],
"next": "https://api.example.org/demo/accounts/?page=5",
"previous": "https://api.example.org/demo/accounts/?page=3"
}