GoSmarter Logo
GoSmarter API Gateway

List all order tag rules

GET
https://api.gosmarter.ai
/api/company/{companyId}/order-tag-rules

Retrieves all order tag rules for the specified company, including linked tag information.

List all order tag rules › path Parameters

companyId
​string · uuid · required

The unique identifier of the company

List all order tag rules › Headers

GoSmarter-Api-Key
​string · required

The GoSmarter-Api-Key header is used to authenticate with the API using your API key. Value is of the format YOUR_KEY_HERE.

List all order tag rules › Responses

List of order tag rules

createdAt
​string · date-time

Timestamp when the rule was created (UTC)

updatedAt
​string · date-time

Timestamp when the rule was last updated (UTC)

tagName
​string

Name of the linked tag

tagColor
​string

Color of the linked tag

ruleId
​string · uuid

Unique identifier for the rule

companyId
​string · uuid

Identifier of the owning company

tagId
​string · uuid

Tag to assign when rule matches

name
​string

Rule name (must be unique within company)

description
​string

Optional description

ruleJson
​string

JSON representation of the rule logic

isActive
​boolean

Whether the rule is active and should be evaluated

active
​boolean

Whether the rule exists (false = soft-deleted)

lastModifiedBy
​string · uuid

ID of the user who last modified this rule

isSystemRule
​boolean

True for rules provisioned by a subscribed Rule Pack — read-only (cannot be edited), but can be deleted


Create new order tag rule

POST
https://api.gosmarter.ai
/api/company/{companyId}/order-tag-rules

Creates a new order tag rule for the specified company. The rule will be automatically evaluated against existing orders. Returns 409 Conflict if a soft-deleted rule with the same name already exists.

Create new order tag rule › path Parameters

companyId
​string · uuid · required

The unique identifier of the company

Create new order tag rule › Headers

GoSmarter-Api-Key
​string · required

The GoSmarter-Api-Key header is used to authenticate with the API using your API key. Value is of the format YOUR_KEY_HERE.

Create new order tag rule › Request Body

tagId
​string · uuid

Tag to assign when rule matches

name
​string

Rule name (must be unique within company)

description
​string

Optional description

ruleJson
​string

JSON representation of the rule logic

isActive
​boolean

Whether the rule is active and should be evaluated

Create new order tag rule › Responses

Rule created successfully

ruleId
​string · uuid

Unique identifier for the rule

companyId
​string · uuid

Identifier of the owning company

tagId
​string · uuid

Tag to assign when rule matches

name
​string

Rule name (must be unique within company)

description
​string

Optional description

ruleJson
​string

JSON representation of the rule logic

isActive
​boolean

Whether the rule is active and should be evaluated

active
​boolean

Whether the rule exists (false = soft-deleted)

lastModifiedBy
​string · uuid

ID of the user who last modified this rule

isSystemRule
​boolean

True for rules provisioned by a subscribed Rule Pack — read-only (cannot be edited), but can be deleted


Get order tag rule

GET
https://api.gosmarter.ai
/api/company/{companyId}/order-tag-rules/{ruleId}

Retrieves a specific order tag rule by ID with linked tag information.

Get order tag rule › path Parameters

companyId
​string · uuid · required

The unique identifier of the company

ruleId
​string · uuid · required

The unique identifier of the rule

Get order tag rule › Headers

GoSmarter-Api-Key
​string · required

The GoSmarter-Api-Key header is used to authenticate with the API using your API key. Value is of the format YOUR_KEY_HERE.

Get order tag rule › Responses

The order tag rule

createdAt
​string · date-time

Timestamp when the rule was created (UTC)

updatedAt
​string · date-time

Timestamp when the rule was last updated (UTC)

tagName
​string

Name of the linked tag

tagColor
​string

Color of the linked tag

ruleId
​string · uuid

Unique identifier for the rule

companyId
​string · uuid

Identifier of the owning company

tagId
​string · uuid

Tag to assign when rule matches

name
​string

Rule name (must be unique within company)

description
​string

Optional description

ruleJson
​string

JSON representation of the rule logic

isActive
​boolean

Whether the rule is active and should be evaluated

active
​boolean

Whether the rule exists (false = soft-deleted)

lastModifiedBy
​string · uuid

ID of the user who last modified this rule

isSystemRule
​boolean

True for rules provisioned by a subscribed Rule Pack — read-only (cannot be edited), but can be deleted


Update order tag rule

PUT
https://api.gosmarter.ai
/api/company/{companyId}/order-tag-rules/{ruleId}

Updates an existing order tag rule. The rule will be re-evaluated against all orders.

Update order tag rule › path Parameters

companyId
​string · uuid · required

The unique identifier of the company

ruleId
​string · uuid · required

The unique identifier of the rule

Update order tag rule › Headers

GoSmarter-Api-Key
​string · required

The GoSmarter-Api-Key header is used to authenticate with the API using your API key. Value is of the format YOUR_KEY_HERE.

Update order tag rule › Request Body

tagId
​string · uuid

Tag to assign when rule matches

name
​string

Rule name (must be unique within company)

description
​string

Optional description

ruleJson
​string

JSON representation of the rule logic

isActive
​boolean

Whether the rule is active and should be evaluated

Update order tag rule › Responses

Rule updated successfully

ruleId
​string · uuid

Unique identifier for the rule

companyId
​string · uuid

Identifier of the owning company

tagId
​string · uuid

Tag to assign when rule matches

name
​string

Rule name (must be unique within company)

description
​string

Optional description

ruleJson
​string

JSON representation of the rule logic

isActive
​boolean

Whether the rule is active and should be evaluated

active
​boolean

Whether the rule exists (false = soft-deleted)

lastModifiedBy
​string · uuid

ID of the user who last modified this rule

isSystemRule
​boolean

True for rules provisioned by a subscribed Rule Pack — read-only (cannot be edited), but can be deleted


Soft-delete order tag rule

DELETE
https://api.gosmarter.ai
/api/company/{companyId}/order-tag-rules/{ruleId}

Soft-deletes an order tag rule. The rule is marked inactive and hidden from the rules list.

Soft-delete order tag rule › path Parameters

companyId
​string · uuid · required

The unique identifier of the company

ruleId
​string · uuid · required

The unique identifier of the rule

Soft-delete order tag rule › Headers

GoSmarter-Api-Key
​string · required

The GoSmarter-Api-Key header is used to authenticate with the API using your API key. Value is of the format YOUR_KEY_HERE.

Soft-delete order tag rule › Responses

Rule soft-deleted successfully

No data returned

Get order tag rule change history

GET
https://api.gosmarter.ai
/api/company/{companyId}/order-tag-rules/{ruleId}/history

Returns the full temporal audit history for an order tag rule, most recent changes first.

Get order tag rule change history › path Parameters

companyId
​string · uuid · required

The unique identifier of the company

ruleId
​string · uuid · required

The unique identifier of the rule

Get order tag rule change history › Headers

GoSmarter-Api-Key
​string · required

The GoSmarter-Api-Key header is used to authenticate with the API using your API key. Value is of the format YOUR_KEY_HERE.

Get order tag rule change history › Responses

Audit history returned successfully

changedAt
​string · date-time
changedById
​string · uuid
changedByName
​string
changeType
​string
entityType
​string
entityLabel
​string

List deleted order tag rules

GET
https://api.gosmarter.ai
/api/company/{companyId}/order-tag-rules/deleted

Retrieves all soft-deleted order tag rules for the specified company.

List deleted order tag rules › path Parameters

companyId
​string · uuid · required

The unique identifier of the company

List deleted order tag rules › Headers

GoSmarter-Api-Key
​string · required

The GoSmarter-Api-Key header is used to authenticate with the API using your API key. Value is of the format YOUR_KEY_HERE.

List deleted order tag rules › Responses

List of soft-deleted order tag rules

createdAt
​string · date-time

Timestamp when the rule was created (UTC)

updatedAt
​string · date-time

Timestamp when the rule was last updated (UTC)

tagName
​string

Name of the linked tag

tagColor
​string

Color of the linked tag

ruleId
​string · uuid

Unique identifier for the rule

companyId
​string · uuid

Identifier of the owning company

tagId
​string · uuid

Tag to assign when rule matches

name
​string

Rule name (must be unique within company)

description
​string

Optional description

ruleJson
​string

JSON representation of the rule logic

isActive
​boolean

Whether the rule is active and should be evaluated

active
​boolean

Whether the rule exists (false = soft-deleted)

lastModifiedBy
​string · uuid

ID of the user who last modified this rule

isSystemRule
​boolean

True for rules provisioned by a subscribed Rule Pack — read-only (cannot be edited), but can be deleted


Restore soft-deleted order tag rule

POST
https://api.gosmarter.ai
/api/company/{companyId}/order-tag-rules/{ruleId}/restore

Restores a soft-deleted order tag rule and triggers re-evaluation of order tagging so that matching orders regain the rule-assigned tag.

Restore soft-deleted order tag rule › path Parameters

companyId
​string · uuid · required

The unique identifier of the company

ruleId
​string · uuid · required

The unique identifier of the rule to restore

Restore soft-deleted order tag rule › Headers

GoSmarter-Api-Key
​string · required

The GoSmarter-Api-Key header is used to authenticate with the API using your API key. Value is of the format YOUR_KEY_HERE.

Restore soft-deleted order tag rule › Responses

Rule restored successfully

ruleId
​string · uuid

Unique identifier for the rule

companyId
​string · uuid

Identifier of the owning company

tagId
​string · uuid

Tag to assign when rule matches

name
​string

Rule name (must be unique within company)

description
​string

Optional description

ruleJson
​string

JSON representation of the rule logic

isActive
​boolean

Whether the rule is active and should be evaluated

active
​boolean

Whether the rule exists (false = soft-deleted)

lastModifiedBy
​string · uuid

ID of the user who last modified this rule

isSystemRule
​boolean

True for rules provisioned by a subscribed Rule Pack — read-only (cannot be edited), but can be deleted