GET
/
v1
/
pricing-rules
/
:id
curl --location 'https://api.stateset.com/v1/pricing-rules/pr_0901f083-aa1c-43c5-af5c-0a9d2fc64e30' \
--header 'Authorization: Bearer YOUR_API_KEY'
{
  "id": "pr_0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
  "object": "pricing_rule",
  "name": "B2B Volume Pricing - Electronics",
  "type": "volume_based",
  "priority": 10,
  "price_adjustment": {
    "method": "percentage_discount",
    "round_to": 99,
    "minimum_margin": 15
  },
  "conditions": {
    "customer_segments": ["wholesale", "distributor"],
    "customer_ids": [],
    "product_ids": [],
    "category_ids": ["cat_electronics"],
    "sku_patterns": [],
    "channels": [],
    "quantity_breaks": [
      {
        "min_quantity": 10,
        "max_quantity": 49,
        "adjustment": {
          "method": "percentage_discount",
          "value": 10
        }
      },
      {
        "min_quantity": 50,
        "max_quantity": 99,
        "adjustment": {
          "method": "percentage_discount",
          "value": 15
        }
      },
      {
        "min_quantity": 100,
        "max_quantity": null,
        "adjustment": {
          "method": "percentage_discount",
          "value": 20
        }
      }
    ]
  },
  "validity": {
    "start_date": "2024-01-01T00:00:00Z",
    "end_date": null,
    "is_active": true,
    "schedule": null
  },
  "currency": "USD",
  "status": "active",
  "created_at": "2024-01-20T13:00:00Z",
  "updated_at": "2024-05-15T09:30:00Z",
  "created_by": "user_123",
  "statistics": {
    "times_applied": 342,
    "total_discount_given": 458950,
    "affected_orders": 342,
    "last_applied": "2024-06-20T15:45:00Z",
    "average_discount_per_order": 1342,
    "top_customers": [
      {
        "customer_id": "cust_wholesale_001",
        "times_used": 45,
        "total_saved": 67500
      }
    ]
  }
}
This endpoint retrieves detailed information about a specific pricing rule, including its conditions, application statistics, and current status.

Authentication

This endpoint requires a valid API key with pricing:read permissions.
Authorization: Bearer YOUR_API_KEY

Path Parameters

id
string
required
The unique identifier of the pricing rule

Response

Returns the pricing rule object if found.
curl --location 'https://api.stateset.com/v1/pricing-rules/pr_0901f083-aa1c-43c5-af5c-0a9d2fc64e30' \
--header 'Authorization: Bearer YOUR_API_KEY'
{
  "id": "pr_0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
  "object": "pricing_rule",
  "name": "B2B Volume Pricing - Electronics",
  "type": "volume_based",
  "priority": 10,
  "price_adjustment": {
    "method": "percentage_discount",
    "round_to": 99,
    "minimum_margin": 15
  },
  "conditions": {
    "customer_segments": ["wholesale", "distributor"],
    "customer_ids": [],
    "product_ids": [],
    "category_ids": ["cat_electronics"],
    "sku_patterns": [],
    "channels": [],
    "quantity_breaks": [
      {
        "min_quantity": 10,
        "max_quantity": 49,
        "adjustment": {
          "method": "percentage_discount",
          "value": 10
        }
      },
      {
        "min_quantity": 50,
        "max_quantity": 99,
        "adjustment": {
          "method": "percentage_discount",
          "value": 15
        }
      },
      {
        "min_quantity": 100,
        "max_quantity": null,
        "adjustment": {
          "method": "percentage_discount",
          "value": 20
        }
      }
    ]
  },
  "validity": {
    "start_date": "2024-01-01T00:00:00Z",
    "end_date": null,
    "is_active": true,
    "schedule": null
  },
  "currency": "USD",
  "status": "active",
  "created_at": "2024-01-20T13:00:00Z",
  "updated_at": "2024-05-15T09:30:00Z",
  "created_by": "user_123",
  "statistics": {
    "times_applied": 342,
    "total_discount_given": 458950,
    "affected_orders": 342,
    "last_applied": "2024-06-20T15:45:00Z",
    "average_discount_per_order": 1342,
    "top_customers": [
      {
        "customer_id": "cust_wholesale_001",
        "times_used": 45,
        "total_saved": 67500
      }
    ]
  }
}