Skip to Content
Welcome to Zendera Knowledge Hub
For DevelopersTransformation Rules

Transformation Rules API

v1

Manage the rules that rewrite orders when they are imported or their products change: list, create, update, delete, validate and test.

Transformation rules rewrite orders automatically. Each rule is a GoRules  document, sent as raw JSON in document, with one or more triggers that say when it runs:

TriggerRuns when
TRIGGER_ORDER_IMPORT_CREATEDAn order is created by an import.
TRIGGER_ORDER_IMPORT_UPDATEDAn order is updated by an import.
TRIGGER_ORDER_IMPORT_MERGEDA newly imported order is merged into an existing one.
TRIGGER_ORDER_PRODUCT_IMPORT_CHANGEDAn order’s products are changed by the Product Upsert API.

A rule’s label must be unique and decides the order rules run in. Its key is assigned when the rule is created and cannot be changed. When you update a rule, send back the version you read; it is an ETag.

Before saving a rule you can check the document with validate-rule, and run it against input of your own with test-rule. Neither stores anything.

Endpoints Overview

EndpointRequired access
GET/v1/gorules/rulesReturns metadata for all rules defined in the authenticated client's organizationIntegrations · View
POST/v1/gorules/rulesCreates a new ruleIntegrations · Edit
GET/v1/gorules/rules/{key}Returns metadata for the specific rule identified by key, along with the raw GoRules rule documentIntegrations · View
PUT/v1/gorules/rules/{key}Updates an existing rule identified by keyIntegrations · Edit
DELETE/v1/gorules/rules/{key}Deletes an existing rule identified by keyIntegrations · Full
POST/v1/gorules/test-ruleTests an arbitrary GoRules rule with arbitrary input dataIntegrations · Edit
POST/v1/gorules/validate-ruleValidates a GoRules rule documentIntegrations · Edit

The badge is the access group and level an API client needs for the call. See access groups and levels.

Interactive API Explorer

Loading API Documentation...

Last updated on