curl --request GET \
--url 'https://marketplace-api.fabric.inc/v1/rule-groups/?ruleset_id={ruleset_id}' \
--header 'Authorization: Bearer <token>'import requests
url = "https://marketplace-api.fabric.inc/v1/rule-groups/?ruleset_id={ruleset_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://marketplace-api.fabric.inc/v1/rule-groups/?ruleset_id={ruleset_id}', 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/rule-groups/?ruleset_id={ruleset_id}",
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://marketplace-api.fabric.inc/v1/rule-groups/?ruleset_id={ruleset_id}"
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://marketplace-api.fabric.inc/v1/rule-groups/?ruleset_id={ruleset_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://marketplace-api.fabric.inc/v1/rule-groups/?ruleset_id={ruleset_id}")
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{
"count": 100,
"results": [
{
"id": 574,
"name": "SKU",
"ruleset": {
"id": 36,
"name": "fabric Merchant Ruleset",
"description": "the default fabric merchant ruleset",
"created_at": "2022-06-16T18:08:08.000Z",
"updated_at": "2022-08-24T05:38:42.000Z"
},
"description": "",
"target": null,
"is_required": true,
"position": 0,
"rules": {
"id": 574,
"name": "SKU",
"description": "",
"attribute": {
"id": 2,
"code": "identifier",
"name": "SKU",
"grouping": "identifiers",
"priority": 100,
"description": "Product SKU or Identifier",
"editable_by": "any",
"type": "string",
"units": "",
"default_unit": null,
"available_units": [],
"is_bulk_editable": false
},
"target": null,
"is_required": true,
"position": 0,
"rule_group_id": 124,
"rule_validators": [],
"rule_conditions": [],
"created_at": "2022-06-16T18:08:42.000Z",
"updated_at": "2022-06-16T18:08:42.000Z"
},
"created_at": "2022-06-16T18:08:42.000Z",
"updated_at": "2022-06-16T18:08:42.000Z"
}
],
"next": "https://api.example.org/demo/{retailer_id}/?page=5",
"previous": "https://api.example.org/demo/{retailer_id}/?page=3"
}Get ruleset details
When sending proposals to a retailer partner, rulesets define the required conditions for your product attributes. Failing to meet even one of these conditions will prevent your proposal from being submitted. Use this endpoint to review the specific details of a chosen ruleset, which will guide you in preparing your data file correctly and ensuring a successful proposal submission.
curl --request GET \
--url 'https://marketplace-api.fabric.inc/v1/rule-groups/?ruleset_id={ruleset_id}' \
--header 'Authorization: Bearer <token>'import requests
url = "https://marketplace-api.fabric.inc/v1/rule-groups/?ruleset_id={ruleset_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://marketplace-api.fabric.inc/v1/rule-groups/?ruleset_id={ruleset_id}', 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/rule-groups/?ruleset_id={ruleset_id}",
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://marketplace-api.fabric.inc/v1/rule-groups/?ruleset_id={ruleset_id}"
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://marketplace-api.fabric.inc/v1/rule-groups/?ruleset_id={ruleset_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://marketplace-api.fabric.inc/v1/rule-groups/?ruleset_id={ruleset_id}")
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{
"count": 100,
"results": [
{
"id": 574,
"name": "SKU",
"ruleset": {
"id": 36,
"name": "fabric Merchant Ruleset",
"description": "the default fabric merchant ruleset",
"created_at": "2022-06-16T18:08:08.000Z",
"updated_at": "2022-08-24T05:38:42.000Z"
},
"description": "",
"target": null,
"is_required": true,
"position": 0,
"rules": {
"id": 574,
"name": "SKU",
"description": "",
"attribute": {
"id": 2,
"code": "identifier",
"name": "SKU",
"grouping": "identifiers",
"priority": 100,
"description": "Product SKU or Identifier",
"editable_by": "any",
"type": "string",
"units": "",
"default_unit": null,
"available_units": [],
"is_bulk_editable": false
},
"target": null,
"is_required": true,
"position": 0,
"rule_group_id": 124,
"rule_validators": [],
"rule_conditions": [],
"created_at": "2022-06-16T18:08:42.000Z",
"updated_at": "2022-06-16T18:08:42.000Z"
},
"created_at": "2022-06-16T18:08:42.000Z",
"updated_at": "2022-06-16T18:08:42.000Z"
}
],
"next": "https://api.example.org/demo/{retailer_id}/?page=5",
"previous": "https://api.example.org/demo/{retailer_id}/?page=3"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The unique ruleset id. The ruleset’s ID can be retrieved from the response provided by the proposal department details endpoint.
Response
OK
The total number of records
100
Show child attributes
Show child attributes
Next page (applicable in a paginated response)
"https://api.example.org/demo/{retailer_id}/?page=5"
Previous page (applicable in a paginated response)
"https://api.example.org/demo/{retailer_id}/?page=3"
Was this page helpful?
