Skip to main content
GET
/
v1
/
auto_fees
/
rule_schema
/
{fee_target}
Rule Schema
curl --request GET \
  --url https://{defaultHost}/v1/auto_fees/rule_schema/{fee_target} \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://{defaultHost}/v1/auto_fees/rule_schema/{fee_target}"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://{defaultHost}/v1/auto_fees/rule_schema/{fee_target}', 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://{defaultHost}/v1/auto_fees/rule_schema/{fee_target}",
  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://{defaultHost}/v1/auto_fees/rule_schema/{fee_target}"

	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://{defaultHost}/v1/auto_fees/rule_schema/{fee_target}")
  .header("Authorization", "Bearer <token>")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://{defaultHost}/v1/auto_fees/rule_schema/{fee_target}")

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
{
  "object": "rule_schema",
  "schema_id": "auto_fee__line_item",
  "attributes": [
    {
      "key": "quantity",
      "metadata": false,
      "supported_values": [],
      "type": "numeric",
      "operators": [
        "is",
        "is_not",
        "is_more_than",
        "is_less_than",
        "is_at_least",
        "is_at_most"
      ]
    },
    {
      "key": "subtotal_amount",
      "metadata": false,
      "supported_values": [],
      "type": "numeric",
      "operators": [
        "is",
        "is_not",
        "is_more_than",
        "is_less_than",
        "is_at_least",
        "is_at_most"
      ]
    },
    {
      "key": "note",
      "metadata": false,
      "supported_values": [],
      "type": "string",
      "operators": [
        "is",
        "is_not",
        "contains",
        "not_contains",
        "start_with",
        "end_with"
      ]
    },
    {
      "key": "customer_prior_product_purchase_quantity",
      "metadata": false,
      "supported_values": [],
      "type": "numeric",
      "operators": [
        "is",
        "is_not",
        "is_more_than",
        "is_less_than",
        "is_at_least",
        "is_at_most"
      ]
    },
    {
      "key": "sku",
      "metadata": false,
      "supported_values": [],
      "type": "string",
      "operators": [
        "is",
        "is_not",
        "contains",
        "not_contains",
        "start_with",
        "end_with"
      ]
    },
    {
      "key": "checkout.metadata",
      "metadata": true,
      "supported_values": [],
      "type": "string",
      "operators": [
        "is",
        "is_not",
        "contains",
        "not_contains",
        "start_with",
        "end_with"
      ]
    },
    {
      "key": "checkout.subtotal_amount",
      "metadata": false,
      "supported_values": [],
      "type": "numeric",
      "operators": [
        "is",
        "is_not",
        "is_more_than",
        "is_less_than",
        "is_at_least",
        "is_at_most"
      ]
    },
    {
      "key": "checkout.email",
      "metadata": false,
      "supported_values": [],
      "type": "string",
      "operators": [
        "is",
        "is_not",
        "contains",
        "not_contains",
        "start_with",
        "end_with"
      ]
    },
    {
      "key": "checkout.email_domain",
      "metadata": false,
      "supported_values": [],
      "type": "string",
      "operators": [
        "is",
        "is_not",
        "contains",
        "not_contains",
        "start_with",
        "end_with"
      ]
    },
    {
      "key": "checkout.first_name",
      "metadata": false,
      "supported_values": [],
      "type": "string",
      "operators": [
        "is",
        "is_not",
        "contains",
        "not_contains",
        "start_with",
        "end_with"
      ]
    },
    {
      "key": "checkout.last_name",
      "metadata": false,
      "supported_values": [],
      "type": "string",
      "operators": [
        "is",
        "is_not",
        "contains",
        "not_contains",
        "start_with",
        "end_with"
      ]
    },
    {
      "key": "checkout.order_type",
      "metadata": false,
      "supported_values": [
        "checkout",
        "subscription"
      ],
      "type": "string",
      "operators": [
        "is",
        "is_not",
        "contains",
        "not_contains",
        "start_with",
        "end_with"
      ]
    },
    {
      "key": "checkout.coupon.id",
      "metadata": false,
      "supported_values": [],
      "type": "uuid",
      "operators": [
        "is",
        "is_not"
      ]
    },
    {
      "key": "checkout.coupon.name",
      "metadata": false,
      "supported_values": [],
      "type": "string",
      "operators": [
        "is",
        "is_not",
        "contains",
        "not_contains",
        "start_with",
        "end_with"
      ]
    },
    {
      "key": "checkout.promotion.id",
      "metadata": false,
      "supported_values": [],
      "type": "uuid",
      "operators": [
        "is",
        "is_not"
      ]
    },
    {
      "key": "checkout.promotion.code",
      "metadata": false,
      "supported_values": [],
      "type": "string",
      "operators": [
        "is",
        "is_not",
        "contains",
        "not_contains",
        "start_with",
        "end_with"
      ]
    },
    {
      "key": "checkout.geo_address.country",
      "metadata": false,
      "supported_values": [],
      "type": "string",
      "operators": [
        "is",
        "is_not",
        "contains",
        "not_contains",
        "start_with",
        "end_with"
      ]
    },
    {
      "key": "customer.id",
      "metadata": false,
      "supported_values": [],
      "type": "uuid",
      "operators": [
        "is",
        "is_not"
      ]
    },
    {
      "key": "customer.created_at",
      "metadata": false,
      "supported_values": [],
      "type": "date",
      "operators": [
        "is",
        "is_not",
        "is_after",
        "is_before",
        "is_on_or_after",
        "is_on_or_before"
      ]
    },
    {
      "key": "customer.order_count",
      "metadata": false,
      "supported_values": [],
      "type": "numeric",
      "operators": [
        "is",
        "is_not",
        "is_more_than",
        "is_less_than",
        "is_at_least",
        "is_at_most"
      ]
    },
    {
      "key": "price.id",
      "metadata": false,
      "supported_values": [],
      "type": "uuid",
      "operators": [
        "is",
        "is_not"
      ]
    },
    {
      "key": "price.created_at",
      "metadata": false,
      "supported_values": [],
      "type": "date",
      "operators": [
        "is",
        "is_not",
        "is_after",
        "is_before",
        "is_on_or_after",
        "is_on_or_before"
      ]
    },
    {
      "key": "price.metadata",
      "metadata": true,
      "supported_values": [],
      "type": "string",
      "operators": [
        "is",
        "is_not",
        "contains",
        "not_contains",
        "start_with",
        "end_with"
      ]
    },
    {
      "key": "price.name",
      "metadata": false,
      "supported_values": [],
      "type": "string",
      "operators": [
        "is",
        "is_not",
        "contains",
        "not_contains",
        "start_with",
        "end_with"
      ]
    },
    {
      "key": "price.recurring_period_count",
      "metadata": false,
      "supported_values": [],
      "type": "numeric",
      "operators": [
        "is",
        "is_not",
        "is_more_than",
        "is_less_than",
        "is_at_least",
        "is_at_most"
      ]
    },
    {
      "key": "price.recurring_interval",
      "metadata": false,
      "supported_values": [
        "day",
        "week",
        "month",
        "year"
      ],
      "type": "string",
      "operators": [
        "is",
        "is_not",
        "contains",
        "not_contains",
        "start_with",
        "end_with"
      ]
    },
    {
      "key": "price.price_type",
      "metadata": false,
      "supported_values": [
        "one_time",
        "finite_recurring",
        "infinite_recurring"
      ],
      "type": "string",
      "operators": [
        "is",
        "is_not",
        "contains",
        "not_contains",
        "start_with",
        "end_with"
      ]
    },
    {
      "key": "product.id",
      "metadata": false,
      "supported_values": [],
      "type": "uuid",
      "operators": [
        "is",
        "is_not"
      ]
    },
    {
      "key": "product.created_at",
      "metadata": false,
      "supported_values": [],
      "type": "date",
      "operators": [
        "is",
        "is_not",
        "is_after",
        "is_before",
        "is_on_or_after",
        "is_on_or_before"
      ]
    },
    {
      "key": "product.metadata",
      "metadata": true,
      "supported_values": [],
      "type": "string",
      "operators": [
        "is",
        "is_not",
        "contains",
        "not_contains",
        "start_with",
        "end_with"
      ]
    },
    {
      "key": "product.name",
      "metadata": false,
      "supported_values": [],
      "type": "string",
      "operators": [
        "is",
        "is_not",
        "contains",
        "not_contains",
        "start_with",
        "end_with"
      ]
    },
    {
      "key": "product.slug",
      "metadata": false,
      "supported_values": [],
      "type": "string",
      "operators": [
        "is",
        "is_not",
        "contains",
        "not_contains",
        "start_with",
        "end_with"
      ]
    },
    {
      "key": "product.product_collections.id",
      "metadata": false,
      "supported_values": [],
      "type": "uuid",
      "operators": [
        "is",
        "is_not"
      ]
    },
    {
      "key": "product.product_collections.metadata",
      "metadata": true,
      "supported_values": [],
      "type": "string",
      "operators": [
        "is",
        "is_not",
        "contains",
        "not_contains",
        "start_with",
        "end_with"
      ]
    },
    {
      "key": "product.product_collections.name",
      "metadata": false,
      "supported_values": [],
      "type": "string",
      "operators": [
        "is",
        "is_not",
        "contains",
        "not_contains",
        "start_with",
        "end_with"
      ]
    },
    {
      "key": "product.product_collections.slug",
      "metadata": false,
      "supported_values": [],
      "type": "string",
      "operators": [
        "is",
        "is_not",
        "contains",
        "not_contains",
        "start_with",
        "end_with"
      ]
    },
    {
      "key": "product.product_group.id",
      "metadata": false,
      "supported_values": [],
      "type": "uuid",
      "operators": [
        "is",
        "is_not"
      ]
    },
    {
      "key": "product.product_group.metadata",
      "metadata": true,
      "supported_values": [],
      "type": "string",
      "operators": [
        "is",
        "is_not",
        "contains",
        "not_contains",
        "start_with",
        "end_with"
      ]
    },
    {
      "key": "product.product_group.name",
      "metadata": false,
      "supported_values": [],
      "type": "string",
      "operators": [
        "is",
        "is_not",
        "contains",
        "not_contains",
        "start_with",
        "end_with"
      ]
    }
  ]
}

Authorizations

Authorization
string
header
required

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

Path Parameters

fee_target
string
required

The fee target type (checkout, line_item, or shipping)

Response

200 - application/json

Success

object
string

A string describing the object type returned.

schema_id
string

The unique identifier for this rule schema (e.g., auto_fee__checkout, auto_fee__line_item).

attributes
object[]

The list of attributes available for building rule conditions.