List Rules
GET
https://backend.sindri1.stacks.localbusiness.pro/api/v1/rulesReturns a paginated list of active rules.
X-Public-KeystringrequiredYour business public key. Used to identify which business is making the request.
X-TimestampstringrequiredCurrent Unix timestamp in seconds. Requests older than 5 minutes are rejected.
X-SignaturestringrequiredHMAC-SHA256 signature of the signing string: {timestamp}\n{METHOD}\n{path}\n{body}, using your private key as the secret.
pageintegerPage number (1-indexed).
per_pageintegerItems per page (max 100). Default: 25.
Values: 1-100
Responses
{
"rules": [
{
"id": 1,
"name": "No Pricing Over Phone",
"description": "Never give exact pricing on the phone. Always schedule an in-person estimate.",
"customer_types": null,
"active": true
}
],
"pagination": {
"current_page": 1,
"per_page": 25,
"total_items": 3,
"total_pages": 1
}
}Authentication — HMAC-SHA256
Every authenticated request requires three headers:
X-Public-KeyYour business public keyX-TimestampUnix timestamp (seconds)X-SignatureHMAC-SHA256 of signing stringSigning string: {timestamp}\n{METHOD}\n{path}\n{body}
Request
GET
https://backend.sindri1.stacks.localbusiness.pro/api/v1/rulesRate Limits
With X-Public-Key: 60 req/min per key
Without: 10 req/min per IP
Code Examples
PUBLIC_KEY="pk_live_..."
PRIVATE_KEY="sk_live_..."
TIMESTAMP=$(date +%s)
PATH_URI="/api/v1/rules"
SIGNATURE=$(printf '%s\n%s\n%s\n' "$TIMESTAMP" "GET" "$PATH_URI" \
| openssl dgst -sha256 -hmac "$PRIVATE_KEY" | awk '{print $2}')
curl -H "X-Public-Key: $PUBLIC_KEY" \
-H "X-Timestamp: $TIMESTAMP" \
-H "X-Signature: $SIGNATURE" \
"https://backend.sindri1.stacks.localbusiness.pro$PATH_URI"