Edara API v3

Edara API v3: Classifications

Read the guide first: authentication, paging, errors, rate limits and the shared PagedResult, BatchResult and *Reference shapes.

Endpoints

GET /v3/classifications/stock-items: Lists stock-item classifications.

Operation GetStockItemClassifications · permission read:classification

Query string: GetStockItemClassificationsQuery

field type default validation description
offset int? 0 no validator: negative silently becomes 0 Number of items to skip before returning results. Defaults to 0.
limit int? 100 no validator: out of 1..1000 silently becomes 100 Maximum number of items to return. Defaults to 100, maximum 1000.

Responses: OK PagedResult<StockItemClassificationResponse>: Paged list of stock-item classifications.

Notes


GET /v3/classifications/stock-items/tree/{userId}: Gets the stock-item classification tree for a user.

Operation GetStockItemClassificationTree · permission read:classification

Parameters

name in type default description
userId route int The user id.

Responses: OK IReadOnlyCollection<StockItemClassificationTreeResponse>: Stock-item classification tree.

Notes


POST /v3/classifications/stock-items: Creates a stock-item classification.

Operation CreateStockItemClassification · permission create:classification

Body: StockItemClassificationUpsertRequest

field type default validation description
code string NotEmpty() .MaximumLength(50) .Must(code => code == null || !code.Contains("-")) Classification code. Required; must not contain dashes.
description string NotEmpty() .MaximumLength(70) Classification description. Required.
parentId int? NotNull() .GreaterThan(0) Parent classification identifier. Required; must be a non-leaf node.

Responses: Created StockItemClassificationResponse: Classification created.

Business errors (HTTP 409, match on errorCode):

Notes


GET /v3/classifications/common: Lists common classifications.

Operation GetCommonClassifications · permission read:classification

Query string: GetCommonClassificationsQuery

field type default validation description
offset int? 0 no validator: negative silently becomes 0 Number of items to skip before returning results. Defaults to 0.
limit int? 100 no validator: out of 1..1000 silently becomes 100 Maximum number of items to return. Defaults to 100, maximum 1000.
description string Must(value => !string.IsNullOrWhiteSpace(value)) .MaximumLength(50) ; }) Optional description filter; exact match when supplied.

Responses: OK PagedResult<CommonClassificationResponse>: Paged list of common classifications.

Notes


GET /v3/classifications/common/{id}: Gets a common classification by id.

Operation GetCommonClassificationById · permission read:classification

Parameters

name in type default description
id route int The classification id.

Responses: OK CommonClassificationResponse: The common classification.

Notes

Types

CommonClassificationResponse

Response describing a common classification.

field type description
id int The classification identifier.
code string The classification code.
description string The classification description.
type string The classification type.
parentId int? The optional parent classification identifier.

StockItemClassificationResponse

Response describing a stock-item classification node.

field type description
id int Classification identifier.
code string Classification code.
description string Classification description.
parentId int? Parent classification identifier; null for roots.
treeLevel int Depth within the tree; roots are level 0.

StockItemClassificationTreeResponse

Response describing a stock-item classification tree row.

field type description
id int Tree row identifier.
stockItemId int Stock-item identifier when this row is a leaf.
stockItem string Stock-item description when this row is a leaf.
nodeId int Classification node identifier.
parentId int Parent classification identifier.
treeLevel int Depth within the tree.