curl --request GET \
--url https://api.fabric.inc/v3/catalog-connector/products/{productId} \
--header 'Authorization: Bearer <token>' \
--header 'x-fabric-tenant-id: <x-fabric-tenant-id>'import requests
url = "https://api.fabric.inc/v3/catalog-connector/products/{productId}"
headers = {
"x-fabric-tenant-id": "<x-fabric-tenant-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-fabric-tenant-id': '<x-fabric-tenant-id>', Authorization: 'Bearer <token>'}
};
fetch('https://api.fabric.inc/v3/catalog-connector/products/{productId}', 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.fabric.inc/v3/catalog-connector/products/{productId}",
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>",
"x-fabric-tenant-id: <x-fabric-tenant-id>"
],
]);
$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.fabric.inc/v3/catalog-connector/products/{productId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-fabric-tenant-id", "<x-fabric-tenant-id>")
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.fabric.inc/v3/catalog-connector/products/{productId}")
.header("x-fabric-tenant-id", "<x-fabric-tenant-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fabric.inc/v3/catalog-connector/products/{productId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-fabric-tenant-id"] = '<x-fabric-tenant-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"sku": "NIKE237765",
"productName": "Nike runner shoes",
"id": "6482b9524ffa4978fd9cbf5c",
"itemId": 2700537,
"categoryName": "Sport Shoes",
"categoryId": "648014741adc8a9de14e1a68",
"images": [
"https://myawsomestore.com/is/image/nike/8801290_s7"
],
"attributes": [
{
"name": "Color",
"value": "black",
"id": "6480216349256438cb7d53b5",
"type": "TEXT"
},
{
"name": "Wide Fit",
"value": false,
"id": "640db94f9fc28b255d155a42",
"type": "BOOLEAN"
}
],
"type": "ITEM",
"variants": [
{
"sku": "NIKE237766",
"productName": "Nike runner white shoes",
"id": "648aa9280d7b561b4663038c",
"itemId": 2700538,
"images": [
"https://myawsomestore.com/is/image/nike/8801291_s7"
],
"attributes": [
{
"name": "Color",
"value": "White",
"id": "6480216349256438cb7d53b5",
"type": "TEXT"
},
{
"name": "Wide Fit",
"value": true,
"id": "640db94f9fc28b255d155a42",
"type": "BOOLEAN"
}
],
"createdAt": "2021-12-13T13:56:09.006Z",
"updatedAt": "2021-12-13T13:56:09.006Z"
}
],
"categories": [
{
"name": "Sport Shoes",
"id": "648014741adc8a9de14e1a68",
"isRoot": false,
"attributes": [
{
"name": "Fit",
"value": "Relaxed Fit",
"id": "648014741adc8a9de14e1a00",
"type": "TEXT"
}
]
},
{
"name": "Shoes",
"id": "648aa9258fdef29675dbce42",
"isRoot": true,
"attributes": [
{
"name": "Material",
"value": "Mesh"
}
]
}
],
"collections": [
{
"name": "Flash sale",
"id": "648055dff4aa98d6c43e02da",
"hierarchy": [
{
"name": "Flash Sale",
"id": "648055dff4aa98d6c43e02da",
"isRoot": false,
"attributes": [
{
"name": "Duration",
"value": 600,
"type": "NUMBER"
}
]
},
{
"name": "Sales",
"id": "648055e0f4aa98d6c43e02f7",
"isRoot": true
}
]
}
],
"createdAt": "2021-12-13T13:56:09.006Z",
"updatedAt": "2021-12-13T13:56:09.006Z"
}Retrieve a product by product ID
Use this endpoint to retrieve a single product by its productId.
You must specify the query parameters productId and locale.
Optionally, you can set the following query parameters to true to refine the search results:
excludeBundleProducts: Exclude bundled products from the response.excludeCollections: Exclude collections from the response.excludeCategories: Exclude categories from the response.excludeAttributes: Exclude attributes from the response.excludeVariants: Exclude variants from the response.
If you don’t have the productId, use one of the endpoints to retrieve the product:
curl --request GET \
--url https://api.fabric.inc/v3/catalog-connector/products/{productId} \
--header 'Authorization: Bearer <token>' \
--header 'x-fabric-tenant-id: <x-fabric-tenant-id>'import requests
url = "https://api.fabric.inc/v3/catalog-connector/products/{productId}"
headers = {
"x-fabric-tenant-id": "<x-fabric-tenant-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-fabric-tenant-id': '<x-fabric-tenant-id>', Authorization: 'Bearer <token>'}
};
fetch('https://api.fabric.inc/v3/catalog-connector/products/{productId}', 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.fabric.inc/v3/catalog-connector/products/{productId}",
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>",
"x-fabric-tenant-id: <x-fabric-tenant-id>"
],
]);
$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.fabric.inc/v3/catalog-connector/products/{productId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-fabric-tenant-id", "<x-fabric-tenant-id>")
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.fabric.inc/v3/catalog-connector/products/{productId}")
.header("x-fabric-tenant-id", "<x-fabric-tenant-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fabric.inc/v3/catalog-connector/products/{productId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-fabric-tenant-id"] = '<x-fabric-tenant-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"sku": "NIKE237765",
"productName": "Nike runner shoes",
"id": "6482b9524ffa4978fd9cbf5c",
"itemId": 2700537,
"categoryName": "Sport Shoes",
"categoryId": "648014741adc8a9de14e1a68",
"images": [
"https://myawsomestore.com/is/image/nike/8801290_s7"
],
"attributes": [
{
"name": "Color",
"value": "black",
"id": "6480216349256438cb7d53b5",
"type": "TEXT"
},
{
"name": "Wide Fit",
"value": false,
"id": "640db94f9fc28b255d155a42",
"type": "BOOLEAN"
}
],
"type": "ITEM",
"variants": [
{
"sku": "NIKE237766",
"productName": "Nike runner white shoes",
"id": "648aa9280d7b561b4663038c",
"itemId": 2700538,
"images": [
"https://myawsomestore.com/is/image/nike/8801291_s7"
],
"attributes": [
{
"name": "Color",
"value": "White",
"id": "6480216349256438cb7d53b5",
"type": "TEXT"
},
{
"name": "Wide Fit",
"value": true,
"id": "640db94f9fc28b255d155a42",
"type": "BOOLEAN"
}
],
"createdAt": "2021-12-13T13:56:09.006Z",
"updatedAt": "2021-12-13T13:56:09.006Z"
}
],
"categories": [
{
"name": "Sport Shoes",
"id": "648014741adc8a9de14e1a68",
"isRoot": false,
"attributes": [
{
"name": "Fit",
"value": "Relaxed Fit",
"id": "648014741adc8a9de14e1a00",
"type": "TEXT"
}
]
},
{
"name": "Shoes",
"id": "648aa9258fdef29675dbce42",
"isRoot": true,
"attributes": [
{
"name": "Material",
"value": "Mesh"
}
]
}
],
"collections": [
{
"name": "Flash sale",
"id": "648055dff4aa98d6c43e02da",
"hierarchy": [
{
"name": "Flash Sale",
"id": "648055dff4aa98d6c43e02da",
"isRoot": false,
"attributes": [
{
"name": "Duration",
"value": 600,
"type": "NUMBER"
}
]
},
{
"name": "Sales",
"id": "648055e0f4aa98d6c43e02f7",
"isRoot": true
}
]
}
],
"createdAt": "2021-12-13T13:56:09.006Z",
"updatedAt": "2021-12-13T13:56:09.006Z"
}Authorizations
This is the authorization token used to authenticate the request. You must pass the access token generated from the system app. For more information, see the Making your first API request section.
Headers
A header retrieved from your Copilot Account Details that's used by the API to identify the tenant making the request. Tenant ID must be included in the authentication header for API requests to access any of fabric’s endpoints.
Query Parameters
Response
OK
- Option 1
- Option 2
- Option 3
The details of a product based on the product type.
Was this page helpful?
