GoSmarter Logo
GoSmarter API Gateway

InventoryTagRules


List all inventory tag rules

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

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

List all inventory tag rules › path Parameters

companyId
​string · uuid · required

The unique identifier of the company

List all inventory 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 inventory tag rules › Responses

List of inventory 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 of the rule's purpose

ruleJson
​string

JSON representation of the rule logic

isActive
​boolean

Whether the rule is active and should be evaluated


Create new inventory tag rule

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

Creates a new inventory tag rule for the specified company. The rule will be automatically evaluated against existing inventory.

Create new inventory tag rule › path Parameters

companyId
​string · uuid · required

The unique identifier of the company

Create new inventory 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 inventory 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 of the rule's purpose

ruleJson
​string

JSON representation of the rule logic

isActive
​boolean

Whether the rule is active and should be evaluated

Create new inventory 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 of the rule's purpose

ruleJson
​string

JSON representation of the rule logic

isActive
​boolean

Whether the rule is active and should be evaluated


Get inventory tag rule

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

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

Get inventory 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 inventory 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 inventory tag rule › Responses

The inventory 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 of the rule's purpose

ruleJson
​string

JSON representation of the rule logic

isActive
​boolean

Whether the rule is active and should be evaluated


Update inventory tag rule

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

Updates an existing inventory tag rule. The rule will be re-evaluated against all inventory items.

Update inventory 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 inventory 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 inventory 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 of the rule's purpose

ruleJson
​string

JSON representation of the rule logic

isActive
​boolean

Whether the rule is active and should be evaluated

Update inventory 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 of the rule's purpose

ruleJson
​string

JSON representation of the rule logic

isActive
​boolean

Whether the rule is active and should be evaluated


Soft-delete inventory tag rule

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

Soft-deletes an inventory tag rule and all its active rule-created assignments. The rule can be restored via the restore endpoint.

Soft-delete inventory 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 inventory 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 inventory tag rule › Responses

Rule soft-deleted successfully

No data returned

Get inventory tag rule change history

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

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

Get inventory 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 inventory 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 inventory 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 inventory tag rules

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

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

List deleted inventory tag rules › path Parameters

companyId
​string · uuid · required

The unique identifier of the company

List deleted inventory 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 inventory tag rules › Responses

List of soft-deleted inventory 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 of the rule's purpose

ruleJson
​string

JSON representation of the rule logic

isActive
​boolean

Whether the rule is active and should be evaluated


Restore soft-deleted inventory tag rule

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

Restores a soft-deleted rule and re-activates its rule-created assignments for inventory items that are still active. Triggers re-evaluation of inventory tagging.

Restore soft-deleted inventory 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 inventory 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 inventory 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 of the rule's purpose

ruleJson
​string

JSON representation of the rule logic

isActive
​boolean

Whether the rule is active and should be evaluated