Pricing rules API
REST endpoints for pricing rules in SKUFlow: 6 operations with parameters, request and response fields, permissions and curl examples.
Base URL: https://app.skuflow.ai/api. Every call needs Authorization: Bearer skf_… (Authentication); {organizationId} ($ORGANIZATION_ID in the examples) is your business's id.
| Operation | Endpoint | Risk |
|---|---|---|
| Pricing rules | GET /organizations/{organizationId}/pricing-rules | read |
| Add a pricing rule | POST /organizations/{organizationId}/pricing-rules | write |
| A pricing rule | GET /organizations/{organizationId}/pricing-rules/{pricingRuleId} | read |
| Change a pricing rule | PATCH /organizations/{organizationId}/pricing-rules/{pricingRuleId} | write |
| Delete a pricing rule | DELETE /organizations/{organizationId}/pricing-rules/{pricingRuleId} | sensitive |
| Preview a price | GET /organizations/{organizationId}/pricing-rules/preview | read |
Pricing rules
GET /organizations/{organizationId}/pricing-rules
The business's pricing rules: markup by cost tier (percent or multiplier), what they match (kind, brand, category, supplier), rounding and minimum margin. A product follows its own rule, else the most specific matching rule (ties by priority), else the default, else keystone ×2 ending .99. Read-only.
| Permission | products.read (Owner, Admin, Staff, Member) |
| Risk | read, OAuth scope skuflow.read. Read: reads only. |
| MCP tool | pricingRules_list (toolset catalog) |
Example
curl "https://app.skuflow.ai/api/organizations/$ORGANIZATION_ID/pricing-rules" \
-H "Authorization: Bearer $SKUFLOW_API_KEY"Response
200: the answer's fields
| Field | Type | Description |
|---|---|---|
items | array of object | |
items[].id | string | |
items[].name | string | |
items[].priority | integer | |
items[].active | boolean | |
items[].isDefault | boolean | |
items[].kind | enum or null | APPAREL (garments: colour × size), PROMO (promotional items), LARGE_FORMAT (banners and signs priced per square foot from a material) or OTHER. One of APPAREL, PROMO, LARGE_FORMAT, OTHER. |
items[].brand | string or null | |
items[].category | string or null | |
items[].supplierConnectionId | string or null | |
items[].tiers | array of object | Cost tiers: the tier with the highest starting cost at or under a product's cost applies. Up to 20 items. |
items[].tiers[].minCostCents | integer | The tier applies from this unit cost (cents) up to the next tier's. 0–100000000. |
items[].tiers[].mode | enum | Percent: cost × (1 + value ÷ 100). MULTIPLIER: cost × value. One of PERCENT, MULTIPLIER. |
items[].tiers[].value | number | The markup percent (e.g. 60 for +60 %) or the multiplier (e.g. 1.8). 0–10000. |
items[].rounding | enum | One of NONE, END_99, WHOLE_DOLLAR. |
items[].minMarginPercent | number or null | |
items[].productCount | integer | Products that chose this rule (others may match it). |
items[].createdAt | string (date-time) | |
items[].updatedAt | string (date-time) |
Add a pricing rule
POST /organizations/{organizationId}/pricing-rules
Creates a rule and reprices every product that now follows it (owner prices are kept). repriced counts variants whose price changed. One tier must start at cost 0.
| Permission | pricing.manage (Owner, Admin) |
| Risk | write, OAuth scope skuflow.write. Write: creates or changes records inside the business; nothing leaves it. |
| MCP tool | pricingRules_create (toolset catalog) |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Up to 200 characters. |
priority | integer | No | Lower wins among equally specific rules. 0–100000. |
active | boolean | No | |
isDefault | boolean | No | Used when no other rule matches (one per business). |
kind | enum or null | No | Match only this product kind. One of APPAREL, PROMO, LARGE_FORMAT, OTHER. |
brand | string or null | No | Match only this brand (any case). Up to 200 characters. |
category | string or null | No | Match only this category. Up to 200 characters. |
supplierConnectionId | string or null | No | Match only products from this supplier connection. |
tiers | array of object | Yes | Cost tiers: the tier with the highest starting cost at or under a product's cost applies. Up to 20 items. |
tiers[].minCostCents | integer | Yes | The tier applies from this unit cost (cents) up to the next tier's. 0–100000000. |
tiers[].mode | enum | Yes | Percent: cost × (1 + value ÷ 100). MULTIPLIER: cost × value. One of PERCENT, MULTIPLIER. |
tiers[].value | number | Yes | The markup percent (e.g. 60 for +60 %) or the multiplier (e.g. 1.8). 0–10000. |
rounding | enum | No | NONE, END_99 (up to .99) or WHOLE_DOLLAR. One of NONE, END_99, WHOLE_DOLLAR. |
minMarginPercent | number or null | No | The price never leaves less margin than this. 0–95. |
Example
curl -X POST "https://app.skuflow.ai/api/organizations/$ORGANIZATION_ID/pricing-rules" \
-H "Authorization: Bearer $SKUFLOW_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Dana Whitfield","tiers":[{"minCostCents":12500,"mode":"PERCENT","value":1}]}'Response
200: the answer's fields
| Field | Type | Description |
|---|---|---|
id | string | |
name | string | |
priority | integer | |
active | boolean | |
isDefault | boolean | |
kind | enum or null | APPAREL (garments: colour × size), PROMO (promotional items), LARGE_FORMAT (banners and signs priced per square foot from a material) or OTHER. One of APPAREL, PROMO, LARGE_FORMAT, OTHER. |
brand | string or null | |
category | string or null | |
supplierConnectionId | string or null | |
tiers | array of object | Cost tiers: the tier with the highest starting cost at or under a product's cost applies. Up to 20 items. |
tiers[].minCostCents | integer | The tier applies from this unit cost (cents) up to the next tier's. 0–100000000. |
tiers[].mode | enum | Percent: cost × (1 + value ÷ 100). MULTIPLIER: cost × value. One of PERCENT, MULTIPLIER. |
tiers[].value | number | The markup percent (e.g. 60 for +60 %) or the multiplier (e.g. 1.8). 0–10000. |
rounding | enum | One of NONE, END_99, WHOLE_DOLLAR. |
minMarginPercent | number or null | |
productCount | integer | Products that chose this rule (others may match it). |
createdAt | string (date-time) | |
updatedAt | string (date-time) | |
repriced | integer |
A pricing rule
GET /organizations/{organizationId}/pricing-rules/{pricingRuleId}
One pricing rule with its cost tiers, match criteria, rounding and minimum margin. Read-only.
| Permission | products.read (Owner, Admin, Staff, Member) |
| Risk | read, OAuth scope skuflow.read. Read: reads only. |
| MCP tool | pricingRules_get (toolset catalog) |
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
pricingRuleId | path | string | Yes |
Example
curl "https://app.skuflow.ai/api/organizations/$ORGANIZATION_ID/pricing-rules/{pricingRuleId}" \
-H "Authorization: Bearer $SKUFLOW_API_KEY"Response
200: the answer's fields
| Field | Type | Description |
|---|---|---|
id | string | |
name | string | |
priority | integer | |
active | boolean | |
isDefault | boolean | |
kind | enum or null | APPAREL (garments: colour × size), PROMO (promotional items), LARGE_FORMAT (banners and signs priced per square foot from a material) or OTHER. One of APPAREL, PROMO, LARGE_FORMAT, OTHER. |
brand | string or null | |
category | string or null | |
supplierConnectionId | string or null | |
tiers | array of object | Cost tiers: the tier with the highest starting cost at or under a product's cost applies. Up to 20 items. |
tiers[].minCostCents | integer | The tier applies from this unit cost (cents) up to the next tier's. 0–100000000. |
tiers[].mode | enum | Percent: cost × (1 + value ÷ 100). MULTIPLIER: cost × value. One of PERCENT, MULTIPLIER. |
tiers[].value | number | The markup percent (e.g. 60 for +60 %) or the multiplier (e.g. 1.8). 0–10000. |
rounding | enum | One of NONE, END_99, WHOLE_DOLLAR. |
minMarginPercent | number or null | |
productCount | integer | Products that chose this rule (others may match it). |
createdAt | string (date-time) | |
updatedAt | string (date-time) |
Change a pricing rule
PATCH /organizations/{organizationId}/pricing-rules/{pricingRuleId}
Changes the fields sent and reprices every product that follows the rule (owner prices kept).
| Permission | pricing.manage (Owner, Admin) |
| Risk | write, OAuth scope skuflow.write. Write: creates or changes records inside the business; nothing leaves it. |
| MCP tool | pricingRules_update (toolset catalog) |
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
pricingRuleId | path | string | Yes |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | No | Up to 200 characters. |
priority | integer | No | Lower wins among equally specific rules. 0–100000. |
active | boolean | No | |
isDefault | boolean | No | Used when no other rule matches (one per business). |
kind | enum or null | No | Match only this product kind. One of APPAREL, PROMO, LARGE_FORMAT, OTHER. |
brand | string or null | No | Match only this brand (any case). Up to 200 characters. |
category | string or null | No | Match only this category. Up to 200 characters. |
supplierConnectionId | string or null | No | Match only products from this supplier connection. |
tiers | array of object | No | Cost tiers: the tier with the highest starting cost at or under a product's cost applies. Up to 20 items. |
tiers[].minCostCents | integer | Yes | The tier applies from this unit cost (cents) up to the next tier's. 0–100000000. |
tiers[].mode | enum | Yes | Percent: cost × (1 + value ÷ 100). MULTIPLIER: cost × value. One of PERCENT, MULTIPLIER. |
tiers[].value | number | Yes | The markup percent (e.g. 60 for +60 %) or the multiplier (e.g. 1.8). 0–10000. |
rounding | enum | No | NONE, END_99 (up to .99) or WHOLE_DOLLAR. One of NONE, END_99, WHOLE_DOLLAR. |
minMarginPercent | number or null | No | The price never leaves less margin than this. 0–95. |
Example
curl -X PATCH "https://app.skuflow.ai/api/organizations/$ORGANIZATION_ID/pricing-rules/{pricingRuleId}" \
-H "Authorization: Bearer $SKUFLOW_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Dana Whitfield","priority":1,"active":true}'Response
200: the answer's fields
| Field | Type | Description |
|---|---|---|
id | string | |
name | string | |
priority | integer | |
active | boolean | |
isDefault | boolean | |
kind | enum or null | APPAREL (garments: colour × size), PROMO (promotional items), LARGE_FORMAT (banners and signs priced per square foot from a material) or OTHER. One of APPAREL, PROMO, LARGE_FORMAT, OTHER. |
brand | string or null | |
category | string or null | |
supplierConnectionId | string or null | |
tiers | array of object | Cost tiers: the tier with the highest starting cost at or under a product's cost applies. Up to 20 items. |
tiers[].minCostCents | integer | The tier applies from this unit cost (cents) up to the next tier's. 0–100000000. |
tiers[].mode | enum | Percent: cost × (1 + value ÷ 100). MULTIPLIER: cost × value. One of PERCENT, MULTIPLIER. |
tiers[].value | number | The markup percent (e.g. 60 for +60 %) or the multiplier (e.g. 1.8). 0–10000. |
rounding | enum | One of NONE, END_99, WHOLE_DOLLAR. |
minMarginPercent | number or null | |
productCount | integer | Products that chose this rule (others may match it). |
createdAt | string (date-time) | |
updatedAt | string (date-time) | |
repriced | integer |
Delete a pricing rule
DELETE /organizations/{organizationId}/pricing-rules/{pricingRuleId}
Destructive: deletes the rule; products that chose it follow the matching rule again and are repriced now.
| Permission | pricing.manage (Owner, Admin) |
| Risk | sensitive, OAuth scope skuflow.sensitive. Sensitive: moves money, deletes, sends or shows something to a customer, or grants or revokes access. |
| MCP tool | pricingRules_delete (toolset catalog) |
| Approval | Over MCP, this tool always waits for your approval in SKUFlow. See Approvals. |
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
pricingRuleId | path | string | Yes |
Example
curl -X DELETE "https://app.skuflow.ai/api/organizations/$ORGANIZATION_ID/pricing-rules/{pricingRuleId}" \
-H "Authorization: Bearer $SKUFLOW_API_KEY"Response
200: the answer's fields
| Field | Type | Description |
|---|---|---|
deleted | true | |
repriced | integer |
Preview a price
GET /organizations/{organizationId}/pricing-rules/preview
What a rule (or the keystone fallback when none is named) makes of a unit cost: the tier, the markup, whether the minimum margin lifted it, the rounded price and the margin. Read-only.
| Permission | pricing.manage (Owner, Admin) |
| Risk | read, OAuth scope skuflow.read. Read: reads only. |
| MCP tool | pricingRules_preview (toolset catalog) |
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
costCents | query | integer | Yes | 0–100000000. |
pricingRuleId | query | string | No |
Example
curl "https://app.skuflow.ai/api/organizations/$ORGANIZATION_ID/pricing-rules/preview?costCents=12500" \
-H "Authorization: Bearer $SKUFLOW_API_KEY"Response
200: the answer's fields
| Field | Type | Description |
|---|---|---|
pricingRuleId | string or null | |
costCents | integer | |
markedUpCents | integer | |
marginFloorApplied | boolean | |
priceCents | integer | |
marginCents | integer | |
marginPercent | number or null |