Get vendor connections - Fabric
Get vendor connections
cURL
curl --request GET \
--url https://marketplace-api.fabric.inc/v1/retailers/{retailer_id}/connections/ \
--header 'Authorization: Bearer <token>'
Python
import requests
url = "https://marketplace-api.fabric.inc/v1/retailers/{retailer_id}/connections/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)
JavaScript
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://marketplace-api.fabric.inc/v1/retailers/{retailer_id}/connections/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://marketplace-api.fabric.inc/v1/retailers/{retailer_id}/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_id}/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))
}
Unirest (Java)
HttpResponse<String> response = Unirest.get("https://marketplace-api.fabric.inc/v1/retailers/{retailer_id}/connections/")
.header("Authorization", "Bearer <token>")
.asString();
Ruby
require 'uri'
require 'net/http'
url = URI("https://marketplace-api.fabric.inc/v1/retailers/{retailer_id}/connections/")
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
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",
"website": null,
"is_onboarded": false,
"is_on_rcn": false,
"requires_subscription": "enabled",
"subscription_expires_at": "2024-09-19T13:32:10Z",
"grace_period_ends_at": "2024-10-26T13:32:10Z",
"subscription_is_expired": false,
"subscription_is_on_grace_period": false,
"subscription_is_delinquent": false,
"inventory_policy": "managed",
"status": "active"
},
"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",
"cover_url": "https://images.sampke.com/retailers/5ef41f6c-3361-40b7-86ce-ecd79c52e9a2/store/cover.jpg",
"profile_tile_url": "https://images.demo.com/retailers/5ef41f6c-3361-40b7-86ce-ecd79c52e9a2/store/profile-tile.jpg",
"joined_at": "2021-08-03T17:24:12Z",
"is_rcn_retailer": false,
"is_onboarded": false,
"platform": "fabric",
"requires_subscription": "disabled",
"brand_permit_creation_allowed": false,
"website": "https://demoabc.com",
"status": "active"
},
"level": "full",
"status": "active",
"suspended_at": null,
"created_at": "2022-06-22T06:56:16Z",
"updated_at": "2022-08-08T15:48:05Z",
"shipping_accounts": [
{
"nickname": "Sample13",
"id": 1,
"owner": "DemoABC",
"carrier": "ALP Brand",
"shipping_methods": {
"name": "White Glove Bronze",
"code": "cory_white_glove",
"id": 5,
"type": "ltl (less than truck load)",
"carrier": {
"id": 229,
"name": "Cory Companies",
"code": "CJCD"
},
"generic_shipping_method": {
"name": "LTL",
"description": "Less than truckload (LTL)",
"id": 5,
"type": "ltl"
}
}
}
],
"options": {
"name": "Sample Option",
"code": "Sample_Option",
"id": 8753,
"description": "Sample description for connection",
"viewable_by": "All",
"editable_by": "Staff"
},
"attachments": [
{
"id": 268,
"content_type": 1,
"object_id": 666,
"file": "Sample file",
"uploaded_by": 646,
"visible_by": "connections",
"original_filename": "Sample1",
"filename": "Sample1",
"tags": [
{
"tag": "demotag",
"id": 432
}
],
"url": "https://assets.sample.com/attachments/path_to_attachment/attachment.pdf"
}
],
"approved_items_count": 1,
"orders_last_7_days_count": 0,
"proposals_received_last_7_days_count": 4,
"contacts": [
{
"name": "sample contact",
"email": "demo@xyz.com",
"id": 1010,
"phone": "9765314368",
"description": "Call",
"created_at": "2021-09-10T15:24:56Z"
}
],
"memos": [
{
"id": 1234,
"text": "Immediate requirement",
"visibility": "any",
"acknowledged_at": "2022-01-10T15:24:56Z",
"notify_people": true,
"created_by": {
"id": 542,
"first_name": "Sample",
"last_name": "Demo",
"title": "Demo",
"status": "Active",
"type": "standard",
"photo_url": "https://assets.demo.com/attachments/path_to_attachment/attachment.pdf",
"profile_photo": "https://assets.demo.com/attachments/path_to_attachment/attachment.pdf",
"is_me": true
},
"created_by_context": "retailer",
"created_at": "2021-09-10T15:24:56Z",
"updated_at": "2022-09-10T15:24:56Z"
}
],
"referral": {
"id": 125,
"referrer": {
"code": "retailer_abc",
"name": "Retailer ABC",
"id": 675
},
"referee": {
"code": "retailer_abc",
"name": "Retailer ABC",
"id": 675
},
"is_brand_first_connection": "false",
"is_retailer_first_connection": true
},
"integration_type": "console",
"onboarding_status": "pending",
"retailer_identifier": null,
"onboarding_target_date": null,
"onboarded_at": "2021-09-10T15:24:56Z",
"onboarding_steps": "Setting the default fulfillment locations is pending."
}
],
"next": "https://api.example.org/demo/accounts/?page=5",
"previous": "https://api.example.org/demo/accounts/?page=3"
}