Skip to main content
GET
/
v1
/
rule-groups
/
?ruleset_id=
{ruleset_id}
Get ruleset details
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

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

ruleset_id
integer
required

The unique ruleset id. The ruleset’s ID can be retrieved from the response provided by the proposal department details endpoint.

Response

200 - application/json

OK

count
integer
required

The total number of records

Example:

100

results
object[]
required
next
string<uri> | null

Next page (applicable in a paginated response)

Example:

"https://api.example.org/demo/{retailer_id}/?page=5"

previous
string<uri> | null

Previous page (applicable in a paginated response)

Example:

"https://api.example.org/demo/{retailer_id}/?page=3"