A valid request URL is required to generate request examples{
"id": "rule-exchange-ratio",
"name": "Ratio de recommande",
"description": "Sur un échange, recommander au moins 110 % de ce qui est renvoyé.",
"category": "COMPLIANCE",
"condition": {
"contextType": "EXCHANGE_RECEIVE_RATIO",
"contextParams": {},
"operator": "LOWER_THAN",
"thresholdValue": 110
},
"enforcementMode": "BLOCK",
"checkLevel": "PLAN",
"evaluationPoints": [
"PRE_PLAN_VALIDATE"
],
"actionFamily": "SUPPLIER_EXCHANGE_PLAN",
"scopes": [
{
"position": 0,
"criteria": [
{
"kind": "ENTITY",
"entityType": "SUPPLIER",
"entityId": "supplier-sportswear"
}
],
"thresholdValue": 130
}
],
"active": true,
"priority": 0,
"templateId": "exchange_reorder_ratio",
"phase": null,
"paradigm": "VALIDATION",
"payload": null,
"version": 1
}{
"error": {
"code": "VALIDATION_FAILED",
"message": "<string>",
"statusCode": 123,
"fieldErrors": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "VALIDATION_FAILED",
"message": "<string>",
"statusCode": 123
}
}{
"error": {
"code": "VALIDATION_FAILED",
"message": "<string>",
"statusCode": 123
}
}{
"error": {
"code": "VALIDATION_FAILED",
"message": "<string>",
"statusCode": 123
}
}{
"error": {
"code": "VALIDATION_FAILED",
"message": "<string>",
"statusCode": 123
}
}Create a rule from a catalogue template
Creates a rule FROM A TEMPLATE: the catalogue decides what is measured and how, you decide the threshold, the mode, the perimeter and the switch. templateId must exist and must guard the actionFamily you name — a 400 says which. Omit thresholdValue to take the template’s default; a rule is never created without a visible number. You supply the id, so a retry after a lost response collides (409) instead of creating a second rule.
A valid request URL is required to generate request examples{
"id": "rule-exchange-ratio",
"name": "Ratio de recommande",
"description": "Sur un échange, recommander au moins 110 % de ce qui est renvoyé.",
"category": "COMPLIANCE",
"condition": {
"contextType": "EXCHANGE_RECEIVE_RATIO",
"contextParams": {},
"operator": "LOWER_THAN",
"thresholdValue": 110
},
"enforcementMode": "BLOCK",
"checkLevel": "PLAN",
"evaluationPoints": [
"PRE_PLAN_VALIDATE"
],
"actionFamily": "SUPPLIER_EXCHANGE_PLAN",
"scopes": [
{
"position": 0,
"criteria": [
{
"kind": "ENTITY",
"entityType": "SUPPLIER",
"entityId": "supplier-sportswear"
}
],
"thresholdValue": 130
}
],
"active": true,
"priority": 0,
"templateId": "exchange_reorder_ratio",
"phase": null,
"paradigm": "VALIDATION",
"payload": null,
"version": 1
}{
"error": {
"code": "VALIDATION_FAILED",
"message": "<string>",
"statusCode": 123,
"fieldErrors": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "VALIDATION_FAILED",
"message": "<string>",
"statusCode": 123
}
}{
"error": {
"code": "VALIDATION_FAILED",
"message": "<string>",
"statusCode": 123
}
}{
"error": {
"code": "VALIDATION_FAILED",
"message": "<string>",
"statusCode": 123
}
}{
"error": {
"code": "VALIDATION_FAILED",
"message": "<string>",
"statusCode": 123
}
}Authorizations
Authorization: Bearer <token>. Accepts EITHER a Keycloak access token (scopes-in-token) OR an opaque POS session token; both resolve to the same pos.* scope vocabulary the route guards enforce.
Body
111 - 255RESTOCK_PLAN, REBALANCE_PLAN, MARKDOWN_PLAN, PRE_SEASON_PLAN, SUPPLIER_RETURN_PLAN, SUPPLIER_EXCHANGE_PLAN, RECOMMENDATION, WORKFLOW 2000BLOCK, WARN, LOG Show child attributes
Show child attributes
-9007199254740991 <= x <= 9007199254740991Response
The created rule, assembled from its template.
The created rule, assembled from its template.
11 - 2552000CAPACITY, ASSORTMENT, ORDERING, TRANSFER, PRICING, DISTRIBUTION, COMPLIANCE Show child attributes
Show child attributes
BLOCK, WARN, LOG SHOP, BRAND, PRODUCT, VARIANT, INVENTORY_ITEM, PLAN, PLAN_ITEM PRE_PLAN_ITEM_ADD, PRE_PLAN_VALIDATE, RECOMMENDATION_GENERATION, WORKFLOW_EXECUTION, MANUAL_CHECK RESTOCK_PLAN, REBALANCE_PLAN, MARKDOWN_PLAN, PRE_SEASON_PLAN, SUPPLIER_RETURN_PLAN, SUPPLIER_EXCHANGE_PLAN, RECOMMENDATION, WORKFLOW Show child attributes
Show child attributes
-9007199254740991 <= x <= 90071992547409911SCORING, SIZING, SOURCING, APPROVAL VALIDATION, DECISION_SHAPING centrale, os 0 < x <= 9007199254740991
