Solid Commerce Docs
POST/v1/inventory/alert-rules

POST /v1/inventory/alert-rules

Scopes: inventory:alert_rules:write

Requires scope: inventory:alert_rules:write.

Request body

FieldTypeRequiredDescription
namestringno
is_advancedbooleanno
is_globalbooleanno
is_non_processablebooleanno
warning_thresholdinteger<int32>no
critical_thresholdinteger<int32>no
parametersAlertRuleParametersno
sales_periodUpsertAlertRuleFactor[]no
supply_periodUpsertAlertRuleFactor[]no

Response (200)

FieldTypeRequiredDescription
idinteger<int32>no
namestringno
is_advancedbooleanno
is_globalbooleanno
is_non_processablebooleanno
warning_thresholdinteger<int32>no
critical_thresholdinteger<int32>no
parametersAlertRuleParametersno
sales_periodAlertRuleSeasonalFactor[]no
supply_periodAlertRuleSeasonalFactor[]no

Examples

import { SolidCommerceClient } from '@solidcommerce/sdk';

const client = new SolidCommerceClient({
  apiKey: process.env.SOLIDCOMMERCE_API_KEY!,
});

const { data, error } = await client.raw.POST('/v1/inventory/alert-rules', {
  // params: { path: { id: '...' }, query: { limit: 25 } },
  // body: { /* request body */ },
});

if (error) throw error;
console.log(data);