# Solya Docs > Client documentation for the Solya fashion retail inventory management platform. ## Docs - [Create a new approval policy for the authenticated organization](https://docs.solya.app/api-reference/approval-policies/create-a-new-approval-policy-for-the-authenticated-organization.md): Creates an approval policy in the caller's organization. Returns 400 when a policy with the same name already exists for the same organization and action family. Requires `intelligenceLayer.configure` permission. - [Delete an approval policy](https://docs.solya.app/api-reference/approval-policies/delete-an-approval-policy.md): Deletes an approval policy from the caller's organization. Returns 404 when the policy does not exist or belongs to another organization. Requires `intelligenceLayer.configure` permission. - [List all approval policies for the authenticated organization](https://docs.solya.app/api-reference/approval-policies/list-all-approval-policies-for-the-authenticated-organization.md): Returns all approval policies (active and inactive) for the caller's organization, ordered by creation date descending. Requires `intelligenceLayer.view` permission. - [Update an approval policy](https://docs.solya.app/api-reference/approval-policies/update-an-approval-policy.md): Updates an existing approval policy in the caller's organization. All fields are optional — only the provided fields are updated. The `isActive` flag is not editable through this endpoint. Returns 404 when the policy does not exist or belongs to another organization. Requires `intelligenceLayer.conf… - [Get the current caller's identity](https://docs.solya.app/api-reference/auth/get-the-current-callers-identity.md): Returns identity and effective permissions for the authenticated caller. Accepts both cookie-based user sessions (authKind: user-session) and API token Bearer sessions (authKind: api-token). No additional permission is required beyond authentication. - [Get brand by ID](https://docs.solya.app/api-reference/brands/get-brand-by-id.md): Returns a single brand by its ID - [List brands](https://docs.solya.app/api-reference/brands/list-brands.md): Returns a paginated list of brands for the organization with optional text search - [Create a new budget envelope](https://docs.solya.app/api-reference/budget-envelopes/create-a-new-budget-envelope.md): Creates a budget envelope in the caller's organization for the given period and scope. The `(periodId, scope, scopeValue)` tuple must be unique — attempting to create a duplicate returns a 409-class error with code `ENVELOPE_DUPLICATE`. When `scope = TOTAL`, `scopeValue` must be null; for other scop… - [Delete a budget envelope](https://docs.solya.app/api-reference/budget-envelopes/delete-a-budget-envelope.md): Deletes a budget envelope from the caller's organization. Returns 404 when the envelope does not exist or belongs to another organization. Requires `intelligenceLayer.configure` permission. - [List budget envelopes for a planning period](https://docs.solya.app/api-reference/budget-envelopes/list-budget-envelopes-for-a-planning-period.md): Returns all budget envelopes for the caller's organization filtered by the required `periodId`. Optionally filter by `scope` (TOTAL, BRAND, DEPARTMENT, or COLLECTION). Results are ordered by scope then scopeValue. Requires `intelligenceLayer.view` permission. - [Update a budget envelope](https://docs.solya.app/api-reference/budget-envelopes/update-a-budget-envelope.md): Updates an existing budget envelope in the caller's organization. Only `amount` and `currency` may be changed — to change the scope, delete and recreate the envelope. All fields are optional; only the provided fields are updated. Returns 404 when the envelope does not exist or belongs to another org… - [Activate or deactivate a business-logic rule](https://docs.solya.app/api-reference/business-logic-rules/activate-or-deactivate-a-business-logic-rule.md): Toggles the `isActive` flag on a business-logic rule. Returns 404 when the rule does not exist or belongs to another organization. Requires `intelligenceLayer.configure` permission. - [Create a new business-logic rule for the authenticated organization](https://docs.solya.app/api-reference/business-logic-rules/create-a-new-business-logic-rule-for-the-authenticated-organization.md): Creates a business-logic rule in the caller's organization. Validates all scope entity IDs against the organization before persisting. When no `ruleGroupIds` are provided, the rule is automatically attached to the organization's default ruleset. Requires `intelligenceLayer.configure` permission. - [Create a new ruleset for the authenticated organization](https://docs.solya.app/api-reference/business-logic-rules/create-a-new-ruleset-for-the-authenticated-organization.md): Creates a ruleset in the caller's organization. If this is the first ruleset for the organization, it is automatically marked as the default. Requires `intelligenceLayer.configure` permission. - [Delete a business-logic rule](https://docs.solya.app/api-reference/business-logic-rules/delete-a-business-logic-rule.md): Deletes a business-logic rule from the caller's organization. Returns 404 when the rule does not exist or belongs to another organization. Requires `intelligenceLayer.configure` permission. - [Delete a ruleset](https://docs.solya.app/api-reference/business-logic-rules/delete-a-ruleset.md): Deletes a ruleset from the caller's organization. Rules attached to the deleted ruleset are reassigned to the organization's default ruleset. Returns 404 when the ruleset does not exist or belongs to another organization. Returns 400 when attempting to delete the default ruleset. Requires `intellige… - [List active business-logic rules for the authenticated organization](https://docs.solya.app/api-reference/business-logic-rules/list-active-business-logic-rules-for-the-authenticated-organization.md): Returns active business-logic rules for the caller's organization with optional filters on phase, actionFamily, and scope dimensions (shop, brand, variant, supplier). Filter predicates and pagination (`limit`, `offset`) are pushed into the SQL query. `limit` defaults to 100 (max 1000); `offset` defa… - [Set a ruleset as the organization default](https://docs.solya.app/api-reference/business-logic-rules/set-a-ruleset-as-the-organization-default.md): Marks the specified ruleset as the default for the caller's organization, unsetting the previous default. Returns 404 when the ruleset does not exist or belongs to another organization. Requires `intelligenceLayer.configure` permission. - [Update a business-logic rule](https://docs.solya.app/api-reference/business-logic-rules/update-a-business-logic-rule.md): Updates an existing business-logic rule in the caller's organization. All fields are optional — only the provided fields are updated. When `scope` is included, validates all entity IDs against the organization. Returns 404 when the rule does not exist or belongs to another organization. Requires `in… - [Get collection by ID](https://docs.solya.app/api-reference/collections/get-collection-by-id.md): Returns a single collection by its ID - [List collections](https://docs.solya.app/api-reference/collections/list-collections.md): Returns a paginated list of collections with optional text search - [Upload a file for data ingestion](https://docs.solya.app/api-reference/data-export/upload-a-file-for-data-ingestion.md): Accepts a multipart/form-data upload of a CSV, XLSX or similar POS export file and stores it for the data ingestion pipeline. Supports production mode (lands in the date-partitioned landing zone) and sandbox mode (triggers an immediate Databricks sandbox_ingest run). Maximum file size is 500 MB. - [Issue Azure file-share credentials for a data exporter client](https://docs.solya.app/api-reference/data-exporter/issue-azure-file-share-credentials-for-a-data-exporter-client.md): Public endpoint. Validates the organization's license key and issues Azure storage credentials. The response includes the storage account key, file share name, UNC path, and blob prefix for the SMB-mount flow. The license key and account key are never logged. - [Append log entries to an alert evaluation run](https://docs.solya.app/api-reference/data-platform--alert-evaluation/append-log-entries-to-an-alert-evaluation-run.md): Appends one or more structured log entries to an existing alert evaluation run. Used by the Databricks notebook to stream observability data during and after execution. Unlike PATCH, appending logs is allowed on terminal runs (SUCCESS/FAILED) — the notebook may flush a final batch after marking a ru… - [Create an alert evaluation run](https://docs.solya.app/api-reference/data-platform--alert-evaluation/create-an-alert-evaluation-run.md): Creates a new alert evaluation run record in PENDING status. Used by the Databricks scheduler or external callers before starting evaluation. Requires Bearer token authentication. - [Update an alert evaluation run](https://docs.solya.app/api-reference/data-platform--alert-evaluation/update-an-alert-evaluation-run.md): Updates an alert evaluation run with status, completion stats, or error information. Used by the Databricks notebook to report execution results. Requires Bearer token authentication and organizationId for tenant isolation. - [Create a new alert configuration](https://docs.solya.app/api-reference/data-platform--alerts/create-a-new-alert-configuration.md): Creates a new alert with rules, scope, and destination configuration. Requires Bearer token authentication. - [Delete an alert configuration](https://docs.solya.app/api-reference/data-platform--alerts/delete-an-alert-configuration.md): Permanently deletes an alert configuration. Requires Bearer token authentication. - [Get alert by ID](https://docs.solya.app/api-reference/data-platform--alerts/get-alert-by-id.md): Returns a single alert configuration with full details including metric information. Requires Bearer token authentication. - [List alerts for an organization](https://docs.solya.app/api-reference/data-platform--alerts/list-alerts-for-an-organization.md): Returns paginated alert configurations with optional filtering by category and active status. Requires Bearer token authentication. - [Update an alert configuration](https://docs.solya.app/api-reference/data-platform--alerts/update-an-alert-configuration.md): Fully replaces an alert's configuration including rules, scope, and destination. Requires Bearer token authentication. - [Get active business-logic rules for an organization](https://docs.solya.app/api-reference/data-platform--business-logic-rules/get-active-business-logic-rules-for-an-organization.md): Returns active rules for the organization with optional filters on phase, actionFamily, and scope dimensions (shop, brand, variant, supplier). Filter predicates and pagination (`limit`, `offset`) are pushed into the SQL query so orgs with thousands of rules don't pay the cost of an in-memory filter.… - [Batch create file ingestion records](https://docs.solya.app/api-reference/data-platform--file-ingestions/batch-create-file-ingestion-records.md): Creates up to 100 file ingestion records in a single atomic INSERT. Requires Bearer token authentication. - [Batch update file ingestion records](https://docs.solya.app/api-reference/data-platform--file-ingestions/batch-update-file-ingestion-records.md): Updates up to 100 file ingestion records. Each item is processed independently — partial success is supported. Requires Bearer token authentication. - [Create a file ingestion record](https://docs.solya.app/api-reference/data-platform--file-ingestions/create-a-file-ingestion-record.md): Creates a new file ingestion record for a file detected in the landing zone. Requires Bearer token authentication. - [List file ingestions for data platform](https://docs.solya.app/api-reference/data-platform--file-ingestions/list-file-ingestions-for-data-platform.md): Returns paginated file ingestion records with filtering. Requires Bearer token authentication. - [Soft-delete a file ingestion record](https://docs.solya.app/api-reference/data-platform--file-ingestions/soft-delete-a-file-ingestion-record.md): Sets the file ingestion status to DELETED. Does not remove the blob from storage. Requires Bearer token authentication. - [Update file ingestion status or path](https://docs.solya.app/api-reference/data-platform--file-ingestions/update-file-ingestion-status-or-path.md): Updates the status (INGESTED/ERROR) and/or blobPath of a file ingestion record. Validates status transitions. Requires Bearer token authentication. - [Append log entries to an ingestion run](https://docs.solya.app/api-reference/data-platform--ingestion/append-log-entries-to-an-ingestion-run.md): Appends one or more structured log entries to an existing ingestion run. Used by the Databricks notebook to stream observability data during and after execution. Unlike PATCH, appending logs is allowed on terminal runs (SUCCESS/FAILED) — the notebook may flush a final batch after marking a run termi… - [Update an ingestion run](https://docs.solya.app/api-reference/data-platform--ingestion/update-an-ingestion-run.md): Updates an ingestion run status. Accepts RUNNING (notebook started) or FAILED (fatal error). Status transitions to SUCCESS are handled server-side via on-read reconciliation against the ops schema. Requires Bearer token authentication and organizationId for tenant isolation. - [Get a single plan with all items for outcome attribution](https://docs.solya.app/api-reference/data-platform--plans/get-a-single-plan-with-all-items-for-outcome-attribution.md): Returns the full detail of a single inventory plan (header fields + all items) for the data platform's outcome attribution pipeline. The decisionContextSnapshot field contains the immutable forecast and rule-outcome data captured at decision time. Returns 404 when no plan matches the given organizat… - [List plans of a given type for outcome attribution](https://docs.solya.app/api-reference/data-platform--plans/list-plans-of-a-given-type-for-outcome-attribution.md): Returns a paginated list of plans of the given type for the specified organization. Supports filtering by status and decidedAt range. Per-status badge counts are included in the response for the data platform's attribution dashboard. Requires Bearer token authentication. - [Validate a plan and capture its decision context snapshot](https://docs.solya.app/api-reference/data-platform--plans/validate-a-plan-and-capture-its-decision-context-snapshot.md): Validates an inventory plan and atomically captures the decision context snapshot (forecast values, applied business-rule outcomes, stock-out risk scores) for downstream outcome attribution. Idempotent: returns 409 PLAN_ALREADY_VALIDATED if the snapshot is already set. Requires Bearer token authenti… - [Append log entries to a sandbox ingest run](https://docs.solya.app/api-reference/data-platform--sandbox-ingest/append-log-entries-to-a-sandbox-ingest-run.md): Appends one or more structured log entries to an existing sandbox ingest run. Used by the Databricks notebook to stream observability data during execution. Allowed on terminal runs (SUCCESS/FAILED) — the notebook may flush a final batch after marking a run terminal. Total log count is capped at 500… - [Create a sandbox ingest run](https://docs.solya.app/api-reference/data-platform--sandbox-ingest/create-a-sandbox-ingest-run.md): Creates a sandbox ingest run record in PENDING status. Used by the data platform for scheduled / API-triggered invocations — the normal UI flow provisions the run inline with the file upload via /api/upload/file-ingestion. Requires Bearer token authentication. - [Update a sandbox ingest run](https://docs.solya.app/api-reference/data-platform--sandbox-ingest/update-a-sandbox-ingest-run.md): Updates a sandbox ingest run with status, completion stats, or error info. Called by the Databricks notebook to report execution results (including the top-50 findings). Rejects updates to terminal runs. Requires Bearer token authentication and organizationId for tenant isolation. - [Append log entries to a sandbox promote run](https://docs.solya.app/api-reference/data-platform--sandbox-promote/append-log-entries-to-a-sandbox-promote-run.md): Appends structured log entries to an existing sandbox promote run. Same contract as the ingest /logs endpoint: allowed on terminal runs, capped at 5000 per run. Requires Bearer token authentication and organizationId for tenant isolation. - [Create a sandbox promote run](https://docs.solya.app/api-reference/data-platform--sandbox-promote/create-a-sandbox-promote-run.md): Creates a sandbox promote run record in PENDING status. The normal UI flow uses a server action; this endpoint supports external data-platform callers. Requires Bearer token authentication. - [Update a sandbox promote run](https://docs.solya.app/api-reference/data-platform--sandbox-promote/update-a-sandbox-promote-run.md): Updates a sandbox promote run with status, completion stats, or error info. Note that a refused promotion (findings had errors and allowWithErrors=false) is reported as SUCCESS with stats.aborted=true, not as FAILED. FAILED is reserved for actual exceptions during copy / re-run of the production pip… - [Get resolved data platform settings for an organization](https://docs.solya.app/api-reference/data-platform--settings/get-resolved-data-platform-settings-for-an-organization.md): Returns the fully denormalized configuration including active settings, enabled data sources, and resolved ingestion specs. Requires Bearer token authentication. - [Update a spec recommendation run](https://docs.solya.app/api-reference/data-platform--spec-recommendation/update-a-spec-recommendation-run.md): Updates an ingestion spec recommendation run with status, the recommended spec, or error info. Called by the Databricks notebook to report execution results. Rejects updates to terminal runs. Requires Bearer token authentication and organizationId for tenant isolation. - [Append log entries to a tag evaluation run](https://docs.solya.app/api-reference/data-platform--tag-evaluation/append-log-entries-to-a-tag-evaluation-run.md): Appends one or more structured log entries to an existing tag evaluation run. Used by the Databricks notebook to stream observability data during and after execution. Unlike PATCH, appending logs is allowed on terminal runs (SUCCESS/FAILED) — the notebook may flush a final batch after marking a run… - [Create a tag evaluation run](https://docs.solya.app/api-reference/data-platform--tag-evaluation/create-a-tag-evaluation-run.md): Creates a new tag evaluation run record in PENDING status. Used by the Databricks scheduler or external callers before starting evaluation. Requires Bearer token authentication. - [Update a tag evaluation run](https://docs.solya.app/api-reference/data-platform--tag-evaluation/update-a-tag-evaluation-run.md): Updates a tag evaluation run with status, completion stats, or error information. Used by the Databricks notebook to report execution results. Requires Bearer token authentication and organizationId for tenant isolation. - [Create a new tag](https://docs.solya.app/api-reference/data-platform--tags/create-a-new-tag.md): Creates a new tag for an organization. Requires Bearer token authentication. - [Create a new tagging rule](https://docs.solya.app/api-reference/data-platform--tags/create-a-new-tagging-rule.md): Creates a new auto-tagging rule with conditions and scope. Requires Bearer token authentication. - [Delete a tag](https://docs.solya.app/api-reference/data-platform--tags/delete-a-tag.md): Permanently deletes a tag and its associated tagging rules. Requires Bearer token authentication. - [Delete a tagging rule](https://docs.solya.app/api-reference/data-platform--tags/delete-a-tagging-rule.md): Permanently deletes an auto-tagging rule. Requires Bearer token authentication. - [List tagging rules for an organization](https://docs.solya.app/api-reference/data-platform--tags/list-tagging-rules-for-an-organization.md): Returns paginated tagging rules with optional tag filtering. Requires Bearer token authentication. - [List tags for an organization](https://docs.solya.app/api-reference/data-platform--tags/list-tags-for-an-organization.md): Returns paginated tags with optional name filtering. Requires Bearer token authentication. - [Add inventory items to a plan](https://docs.solya.app/api-reference/data-platform--workflow-actions/add-inventory-items-to-a-plan.md): Adds items to a restock, rebalance, markdown, supplier-return or supplier-exchange plan. On rerun, existing items matching (plan, variant, size, shop) are refreshed in place via ITEM_UPDATED audit; items with a prior manual user edit are skipped. Used by the Databricks workflow executor. Requires Be… - [Create or retrieve a plan for workflow execution](https://docs.solya.app/api-reference/data-platform--workflow-actions/create-or-retrieve-a-plan-for-workflow-execution.md): Creates a new plan (restock/rebalance/markdown/supplier-return/supplier-exchange) or returns an existing open one. Used by the Databricks workflow executor. Requires Bearer token authentication. - [Create a workflow run](https://docs.solya.app/api-reference/data-platform--workflows/create-a-workflow-run.md): Creates a new workflow run record in PENDING status. The Databricks executor creates this before starting workflow execution. Requires Bearer token authentication. - [List active workflows with flow definitions and resolved credentials](https://docs.solya.app/api-reference/data-platform--workflows/list-active-workflows-with-flow-definitions-and-resolved-credentials.md): Returns all active workflows that have a flow definition configured, along with a map of decrypted credentials referenced by any CALL_WEBHOOK action in those workflows. Used by the Databricks workflow executor. Requires Bearer token authentication. Response shape: { workflows: ActiveWorkflow[], cred… - [Record the start of a workflow node execution](https://docs.solya.app/api-reference/data-platform--workflows/record-the-start-of-a-workflow-node-execution.md): Creates a workflow_run_steps row when the data platform starts executing a node. Idempotent via the composite key (workflow_run_id, node_id): retries upsert the existing row. Requires Bearer token authentication. - [Update a workflow run step with execution results](https://docs.solya.app/api-reference/data-platform--workflows/update-a-workflow-run-step-with-execution-results.md): Records the completion or status transition of a workflow node execution. When status is terminal and completedAt is provided, duration_ms is auto-computed. Requires Bearer token authentication. - [Update a workflow run's run-level state](https://docs.solya.app/api-reference/data-platform--workflows/update-a-workflow-runs-run-level-state.md): Updates a workflow run with status, trigger context, and error information. Step-level data is recorded via the granular endpoints (POST /workflow-runs/[id]/steps and PATCH /workflow-run-steps/[stepId]). Requires Bearer token authentication. - [Get Databricks job status](https://docs.solya.app/api-reference/databricks/get-databricks-job-status.md): Returns the current status of a Databricks job run. Requires authentication and verifies that the run belongs to a scenario owned by the caller's organization. - [List sales forecasts](https://docs.solya.app/api-reference/forecasts/list-sales-forecasts.md): Returns a paginated list of sales forecasts for the next N days (default 30). Forecasts show predicted demand per variant, size, shop, and date. - [List decision vectors](https://docs.solya.app/api-reference/intelligence/list-decision-vectors.md): Returns a paginated list of the latest decision vectors from gold.decision_vector. Always reads at the latest snapshot date for the organization. Filter by domain (restock/rebalance/markdown), variantId, or shopId. - [List outcome attributions](https://docs.solya.app/api-reference/intelligence/list-outcome-attributions.md): Returns a paginated list of ITEM_ADDED audit events that carry attribution metadata. The attribution field identifies whether each item was added manually, via a decision vector algorithm, or by a workflow fallback. Filter by planType, planId, time window, variantId, or shopId. - [List sales forecasts](https://docs.solya.app/api-reference/intelligence/list-sales-forecasts.md): Returns a paginated list of sales forecasts from gold.sales_forecasts. Filter by variantId, sizeTaxonomyId, shopId, granularity, and date range. - [List stock snapshots](https://docs.solya.app/api-reference/intelligence/list-stock-snapshots.md): Returns a paginated list of current stock snapshots from gold.stock_snapshot. Filter by shopId or a comma-separated list of variantIds. - [Finalize zombie runs across all run tables](https://docs.solya.app/api-reference/internal-ops/finalize-zombie-runs-across-all-run-tables.md): Sweeps workflow_runs, tag_evaluation_runs, alert_evaluation_runs, sandbox_ingest_runs, and sandbox_promote_runs for rows stuck in PENDING/RUNNING beyond their configured timeout. Flips them to FAILED and, for workflow runs, cascades CANCELLED to child steps. Requires Bearer token authentication via… - [Get inventory item by ID](https://docs.solya.app/api-reference/inventory-items/get-inventory-item-by-id.md): Returns a single inventory item by its ID - [List inventory items](https://docs.solya.app/api-reference/inventory-items/list-inventory-items.md): Returns a paginated list of inventory items with optional filters by variant, shop, and text search - [Enrich a single product](https://docs.solya.app/api-reference/inventory/enrich-a-single-product.md): Queues an AI enrichment job for a single product. The job is processed asynchronously via SQS and populates product attributes such as description, category tags and imagery. - [Enrich multiple products](https://docs.solya.app/api-reference/inventory/enrich-multiple-products.md): Queues AI enrichment jobs for multiple products. Provide either a list of productIds or a count of unenriched products to pick automatically. Processing is asynchronous via SQS. - [Get product variant stock by shop and size](https://docs.solya.app/api-reference/inventory/get-product-variant-stock-by-shop-and-size.md): Returns the current stock levels for all variants, sizes and shops of a given product. Useful for selecting the right variant/size/shop combination when adding items to plans. - [List inventory stock-out risks](https://docs.solya.app/api-reference/inventory/list-inventory-stock-out-risks.md): Returns a paginated ranking of product variants by stock-out urgency. Variants with the lowest days-of-supply are ranked first. Use this endpoint to identify which variants need restocking, rebalancing, or markdown. - [List stock positions per variant x shop](https://docs.solya.app/api-reference/inventory/list-stock-positions-per-variant-x-shop.md): Returns a paginated list of current stock positions aggregated per variant and shop, with optional filters by variant IDs, shop, and brand - [Get the markdown calendar status for the authenticated organization](https://docs.solya.app/api-reference/markdown-plans/get-the-markdown-calendar-status-for-the-authenticated-organization.md): Returns whether the organization has configured a MARKDOWN calendar and whether today falls inside an active markdown window. When `configured` is false the organization has no active MARKDOWN periods and markdown recommendations are suppressed. Requires `intelligenceLayer.view` permission. - [Create a custom org-scoped metric](https://docs.solya.app/api-reference/metrics/create-a-custom-org-scoped-metric.md): Creates a new ORG-scoped metric for the caller's organization. The `body` field must be a valid discriminated-union metric definition (kind: precomputed_column, aggregation, time_windowed_aggregation, composite, or unsupported). The `metricVersion` is set automatically to the current spec version. R… - [Delete an org-scoped metric](https://docs.solya.app/api-reference/metrics/delete-an-org-scoped-metric.md): Soft-deletes an ORG-scoped metric from the caller's organization and removes all associated org-level configuration overrides. Returns 404 when the metric does not exist, is GLOBAL, or belongs to another organization. Returns 400 when the metric is still referenced by active alerts or tagging rules… - [List metrics with org configuration for the authenticated organization](https://docs.solya.app/api-reference/metrics/list-metrics-with-org-configuration-for-the-authenticated-organization.md): Returns all active metrics visible to the caller's organization, merged with the org-level configuration (enabled flag and numeric parameter overrides). Includes both GLOBAL platform metrics and ORG-scoped custom metrics created by the organization. Requires `intelligenceLayer.view` permission. - [Update an org-scoped metric definition](https://docs.solya.app/api-reference/metrics/update-an-org-scoped-metric-definition.md): Patches an existing ORG-scoped metric definition in the caller's organization. All body fields are optional — only the provided fields are updated. The `body` field, when supplied, must be a complete valid discriminated-union metric body (not a partial diff). Returns 404 when the metric does not exi… - [Get movement line by ID](https://docs.solya.app/api-reference/movement-lines/get-movement-line-by-id.md): Returns a single inventory movement line by its ID - [List movement lines](https://docs.solya.app/api-reference/movement-lines/list-movement-lines.md): Returns a paginated list of inventory movement lines with optional filters by shop, product, brand, movement type, and date range - [Get order line by ID](https://docs.solya.app/api-reference/order-lines/get-order-line-by-id.md): Returns a single order line by its ID - [List order lines](https://docs.solya.app/api-reference/order-lines/list-order-lines.md): Returns a paginated list of order lines with optional filters by product, brand, and date range - [Create a new org-list entry](https://docs.solya.app/api-reference/org-lists/create-a-new-org-list-entry.md): Creates a new entry in the specified org-list for the authenticated organization. RETURN_REASON_CODE values are automatically normalized to upper-case. Returns 409 (via DATABASE_ERROR / ORG_LIST_ENTRY_DUPLICATE) when an entry with the same value already exists in the list. The audit row is attribute… - [Delete an org-list entry](https://docs.solya.app/api-reference/org-lists/delete-an-org-list-entry.md): Permanently removes the specified entry from the org-list. Returns 404 when the entry does not exist or belongs to another organization. An audit row (ENTRY_DELETED) with a full value snapshot is written before deletion. Requires `intelligenceLayer.configure` permission. - [List org-list entries for a given list type](https://docs.solya.app/api-reference/org-lists/list-org-list-entries-for-a-given-list-type.md): Returns all entries in the specified org-list for the authenticated organization, ordered by value ascending. The listType path parameter must be one of SUPPLIER_BLACKLIST, BRAND_RESTRICTION, or RETURN_REASON_CODE. Requires `intelligenceLayer.view` permission. - [Update the note on an org-list entry](https://docs.solya.app/api-reference/org-lists/update-the-note-on-an-org-list-entry.md): Updates only the `note` field of the entry's metadata. The entry `value` is immutable (delete + recreate is the documented rename path). Passing `note: null` or an empty string removes the note. Returns 404 when the entry does not exist, belongs to another organization, or does not match the listTyp… - [Add item to markdown plan](https://docs.solya.app/api-reference/plans--markdown/add-item-to-markdown-plan.md): Adds a product variant/size to a markdown plan. Business rules are evaluated; a BLOCK returns a 422, WARNs are surfaced in the response. - [Create markdown plan](https://docs.solya.app/api-reference/plans--markdown/create-markdown-plan.md): Creates a new markdown plan in DRAFT status. - [Get markdown plan](https://docs.solya.app/api-reference/plans--markdown/get-markdown-plan.md): Returns a specific markdown plan by ID including dates, status and notes. - [List markdown plan items](https://docs.solya.app/api-reference/plans--markdown/list-markdown-plan-items.md): Returns a paginated list of items in a markdown plan with optional text and multi-dimensional filtering. - [List markdown plans](https://docs.solya.app/api-reference/plans--markdown/list-markdown-plans.md): Returns all markdown plans for the organization, optionally filtered by season. - [Add item to rebalance plan](https://docs.solya.app/api-reference/plans--rebalance/add-item-to-rebalance-plan.md): Adds a product variant/size to a rebalance plan. Business rules are evaluated; a BLOCK returns a 422, WARNs are surfaced in the response. - [Create rebalance plan](https://docs.solya.app/api-reference/plans--rebalance/create-rebalance-plan.md): Creates a new rebalance plan in DRAFT status. The from and to shops must be different. - [Get rebalance plan](https://docs.solya.app/api-reference/plans--rebalance/get-rebalance-plan.md): Returns a specific rebalance plan by ID including shop assignments, status and aggregate metrics. - [List rebalance plan items](https://docs.solya.app/api-reference/plans--rebalance/list-rebalance-plan-items.md): Returns paginated items for a rebalance plan with filtering - [List rebalance plans](https://docs.solya.app/api-reference/plans--rebalance/list-rebalance-plans.md): Returns a paginated list of rebalance plans for the organization, optionally filtered by status or outgoing shop. - [Add item to restock plan](https://docs.solya.app/api-reference/plans--restock/add-item-to-restock-plan.md): Adds a product variant/size/shop combination to a restock plan. - [Create restock plan](https://docs.solya.app/api-reference/plans--restock/create-restock-plan.md): Creates a new restock plan in DRAFT status for the given brand and collection. - [Get restock order plan totals](https://docs.solya.app/api-reference/plans--restock/get-restock-order-plan-totals.md): Computes aggregate totals (quantity and value) for a restock order plan. Accepts the plan ID as a query parameter. - [Get restock order plan totals (deprecated)](https://docs.solya.app/api-reference/plans--restock/get-restock-order-plan-totals-deprecated.md): Computes aggregate totals (quantity and value) for a restock order plan. Accepts the plan ID in the request body. Prefer the GET endpoint with the `sessionId` query parameter. - [List restock order plan items](https://docs.solya.app/api-reference/plans--restock/list-restock-order-plan-items.md): Returns all items belonging to a restock order plan along with aggregate totals. - [List restock plan items](https://docs.solya.app/api-reference/plans--restock/list-restock-plan-items.md): Returns a paginated list of items in a restock plan with optional text and multi-dimensional filtering. - [List restock plans](https://docs.solya.app/api-reference/plans--restock/list-restock-plans.md): Returns all restock order plans for the organization, optionally filtered by brand. - [Update restock plan item](https://docs.solya.app/api-reference/plans--restock/update-restock-plan-item.md): Updates the quantity for an existing item in a restock plan, identified by variant, size and shop. - [Get product by ID](https://docs.solya.app/api-reference/products/get-product-by-id.md): Returns a single product by its ID with brand information - [List products](https://docs.solya.app/api-reference/products/list-products.md): Returns a paginated list of products with optional text search and brand filter - [Delete a return policy by supplier ID](https://docs.solya.app/api-reference/return-policies/delete-a-return-policy-by-supplier-id.md): Deletes the return policy for the given supplier (`{id}` = supplierId) in the caller's organization. Returns 404 when no policy exists for that supplier or when it belongs to another organization. Requires `intelligenceLayer.configure` permission. - [List return policies for the organization](https://docs.solya.app/api-reference/return-policies/list-return-policies-for-the-organization.md): Returns all return policies for the caller's organization. Each supplier has at most one policy. Results are ordered by supplierId ascending. Requires `intelligenceLayer.view` permission. - [Upsert a return policy for a supplier](https://docs.solya.app/api-reference/return-policies/upsert-a-return-policy-for-a-supplier.md): Creates or updates the return policy for the given supplier (`{id}` = supplierId) in the caller's organization. The operation is idempotent — calling it twice with the same body produces the same result. At most one policy exists per (organization, supplier) pair; this endpoint always upserts on tha… - [Get sales line by ID](https://docs.solya.app/api-reference/sales-lines/get-sales-line-by-id.md): Returns a single sales line by its ID - [List sales lines](https://docs.solya.app/api-reference/sales-lines/list-sales-lines.md): Returns a paginated list of sales lines with optional filters by shop, brand, product, and date range - [Search brands](https://docs.solya.app/api-reference/search/search-brands.md): Autocomplete search for product brands. Accepts a partial text query or a comma-separated list of IDs to resolve by exact match. - [Search collections](https://docs.solya.app/api-reference/search/search-collections.md): Autocomplete search for product collections. Accepts a partial text query or a comma-separated list of IDs to resolve by exact match. - [Search product categories](https://docs.solya.app/api-reference/search/search-product-categories.md): Autocomplete search for product categories. Accepts a partial text query or a comma-separated list of IDs to resolve by exact match. - [Search product collections](https://docs.solya.app/api-reference/search/search-product-collections.md): Autocomplete search for product-level collections. Accepts a partial text query or a comma-separated list of IDs to resolve by exact match. - [Search product colors](https://docs.solya.app/api-reference/search/search-product-colors.md): Autocomplete search for product colors. Accepts a partial text query or a comma-separated list of IDs to resolve by exact match. - [Search product designs](https://docs.solya.app/api-reference/search/search-product-designs.md): Autocomplete search for product designs. Accepts a partial text query or a comma-separated list of IDs to resolve by exact match. - [Search product families](https://docs.solya.app/api-reference/search/search-product-families.md): Autocomplete search for product families. Accepts a partial text query or a comma-separated list of IDs to resolve by exact match. - [Search product genders](https://docs.solya.app/api-reference/search/search-product-genders.md): Autocomplete search for product gender segments (e.g. Men, Women, Unisex). Accepts a partial text query or a comma-separated list of IDs. - [Search product shapes](https://docs.solya.app/api-reference/search/search-product-shapes.md): Autocomplete search for product shapes. Accepts a partial text query or a comma-separated list of IDs to resolve by exact match. - [Search product sizes](https://docs.solya.app/api-reference/search/search-product-sizes.md): Autocomplete search for product sizes (e.g. S, M, L, 38, 42). Accepts a partial text query or a comma-separated list of IDs to resolve by exact match. - [Search product sports](https://docs.solya.app/api-reference/search/search-product-sports.md): Autocomplete search for product sports (e.g. Running, Tennis, Basketball). Accepts a partial text query or a comma-separated list of IDs. - [Search product styles](https://docs.solya.app/api-reference/search/search-product-styles.md): Autocomplete search for product styles. Accepts a partial text query or a comma-separated list of IDs to resolve by exact match. - [Search product tags](https://docs.solya.app/api-reference/search/search-product-tags.md): Autocomplete search for product tags. Accepts a partial text query or a comma-separated list of IDs to resolve by exact match. - [Search products](https://docs.solya.app/api-reference/search/search-products.md): Autocomplete search for products by name. Accepts a partial text query or a comma-separated list of IDs to resolve by exact match. - [Search shop cities](https://docs.solya.app/api-reference/search/search-shop-cities.md): Autocomplete search for cities where shops are located. Accepts a partial text query or a comma-separated list of IDs to resolve by exact match. - [Search shop countries](https://docs.solya.app/api-reference/search/search-shop-countries.md): Autocomplete search for countries where shops are located. Accepts a partial text query or a comma-separated list of IDs to resolve by exact match. - [Search stores](https://docs.solya.app/api-reference/search/search-stores.md): Autocomplete search for stores (physical retail locations). Accepts a partial text query or a comma-separated list of IDs to resolve by exact match. - [Search users](https://docs.solya.app/api-reference/search/search-users.md): Autocomplete search for organization users. Returns items with name rendered as 'FirstName LastName (email)'. Accepts a partial text query or a comma-separated list of IDs. - [Get shop by ID](https://docs.solya.app/api-reference/shops/get-shop-by-id.md): Returns a single shop by its ID - [List shops](https://docs.solya.app/api-reference/shops/list-shops.md): Returns a paginated list of shops for the organization with optional text search - [Create or replace a size curve target](https://docs.solya.app/api-reference/size-curve-targets/create-or-replace-a-size-curve-target.md): Creates or atomically replaces all rows for a (scope, scopeValue) size curve in the caller's organization. The operation is idempotent — calling it twice with the same body produces the same result. Requires `intelligenceLayer.configure` permission. - [Delete a size curve target by scopeValue](https://docs.solya.app/api-reference/size-curve-targets/delete-a-size-curve-target-by-scopevalue.md): Deletes all rows for the given scopeValue (`{id}`) and scope (query parameter, defaults to BRAND) in the caller's organization. Returns 404 when no curve exists for that (scope, scopeValue) pair or when it belongs to another organization. Requires `intelligenceLayer.configure` permission. - [List size curve targets for the organization](https://docs.solya.app/api-reference/size-curve-targets/list-size-curve-targets-for-the-organization.md): Returns all size curve targets for the caller's organization, grouped by (scope, scopeValue). Results are ordered by (scope, scopeValue, sizeId) for stable layout. Requires `intelligenceLayer.view` permission. - [Upsert a size curve target by scopeValue](https://docs.solya.app/api-reference/size-curve-targets/upsert-a-size-curve-target-by-scopevalue.md): Creates or atomically replaces all rows for the given scopeValue (`{id}`) in the caller's organization. The operation is idempotent — calling it twice with the same body produces the same result. `scope` defaults to BRAND when omitted from the body. A foreign scopeValue creates a curve scoped to the… - [List stock ledger entries](https://docs.solya.app/api-reference/stock-ledger/list-stock-ledger-entries.md): Returns a paginated list of stock ledger entries with optional filters by shop, variant, movement category, movement type, and date range. No get-by-ID endpoint as the table has no single primary key. - [Create a new supplier-variant constraint](https://docs.solya.app/api-reference/supplier-variant-constraints/create-a-new-supplier-variant-constraint.md): Creates a supplier-variant constraint in the caller's organization. The `(supplierId, variantId)` tuple must be unique — attempting to create a duplicate returns a 409-class error with code `SUPPLIER_VARIANT_CONSTRAINT_DUPLICATE`. At least one of `moq` or `packMultiple` must be provided (not null).… - [Delete a supplier-variant constraint](https://docs.solya.app/api-reference/supplier-variant-constraints/delete-a-supplier-variant-constraint.md): Deletes a supplier-variant constraint from the caller's organization. Returns 404 when the constraint does not exist or belongs to another organization. Requires `intelligenceLayer.configure` permission. - [List supplier-variant constraints](https://docs.solya.app/api-reference/supplier-variant-constraints/list-supplier-variant-constraints.md): Returns all supplier-variant constraints for the caller's organization. Optionally filter by `supplierId` and/or `variantId` (AND semantics). Results are ordered by (supplierId, variantId) for a stable table layout. Requires `intelligenceLayer.view` permission. - [Update a supplier-variant constraint](https://docs.solya.app/api-reference/supplier-variant-constraints/update-a-supplier-variant-constraint.md): Updates an existing supplier-variant constraint in the caller's organization. Only `moq` and `packMultiple` may be changed — to change the supplier or variant, delete and recreate the constraint. Both fields are optional independently; `null` clears the constraint value. Returns 404 when the constra… - [Get supplier by ID](https://docs.solya.app/api-reference/suppliers/get-supplier-by-id.md): Returns a single supplier by its ID - [List suppliers](https://docs.solya.app/api-reference/suppliers/list-suppliers.md): Returns a paginated list of suppliers for the organization with optional text search on name or code - [List variant constraints for a supplier](https://docs.solya.app/api-reference/suppliers/list-variant-constraints-for-a-supplier.md): Returns a paginated list of variant constraints (MOQ and/or pack multiple) for the given supplier. Optionally filtered by variant ID. - [Health check](https://docs.solya.app/api-reference/system/health-check.md): Returns the health status of the application - [Get variant by ID](https://docs.solya.app/api-reference/variants/get-variant-by-id.md): Returns a single variant by its ID with product and brand information - [List product variants](https://docs.solya.app/api-reference/variants/list-product-variants.md): Returns a paginated list of variants for a specific product - [List variants](https://docs.solya.app/api-reference/variants/list-variants.md): Returns a paginated list of product variants with optional filters by brand, supplier, product, and collection. Includes pricing data (retail price, cost, gross margin percentage) sourced from gold.dim_variant_summary when available. - [Data sources](https://docs.solya.app/en/data-layer/data-source.md): Connect the systems Solya imports your data from — POS systems, APIs, and file uploads. - [Ingestion runs](https://docs.solya.app/en/data-layer/ingestion-runs.md): Track every import: status, timing, who triggered it, and full structured logs. - [Ingestion specs](https://docs.solya.app/en/data-layer/ingestion-spec.md): Define how Solya detects, parses, and transforms each incoming file into its standard data model. - [Data layer overview](https://docs.solya.app/en/data-layer/overview.md): How Solya brings your retail data in: data sources, ingestion specs, and ingestion runs. - [Authentication](https://docs.solya.app/en/developers/authentication.md): The three authentication schemes and how to create, use, and revoke a service-account token. - [Error codes & responses](https://docs.solya.app/en/developers/error-codes.md): The response envelope, stable error codes, and how they map to HTTP status codes. - [Making requests](https://docs.solya.app/en/developers/making-requests.md): Base URL, pagination schemes, filtering, and token introspection. - [Developer overview](https://docs.solya.app/en/developers/overview.md): Integrate with the Solya REST API — authentication, conventions, and where to find the full reference. - [Core concepts](https://docs.solya.app/en/getting-started/concepts.md): How Solya is organized — the three layers, plans, and the moving parts you'll work with every day. - [Glossary](https://docs.solya.app/en/getting-started/glossary.md): Definitions of the terms used across Solya. - [Navigation & roles](https://docs.solya.app/en/getting-started/navigation-and-roles.md): How the sidebar is organized, how it can be tailored per organization, and what each role can access. - [Welcome to Solya](https://docs.solya.app/en/index.md): Documentation for the Solya fashion retail inventory management platform — data layer, intelligence layer, and API. - [Business Center](https://docs.solya.app/en/intelligence-layer/business-center.md): Configure the business rules that guard your plans — block or warn when a policy is breached. - [Plan lifecycle & approvals](https://docs.solya.app/en/inventory-plans/lifecycle.md): The status lifecycle, business-rule gating, approval workflow, and audit trail shared by every plan type. - [Markdown plans](https://docs.solya.app/en/inventory-plans/markdown.md): Plan price-reduction campaigns on slow-moving inventory. - [Inventory plans overview](https://docs.solya.app/en/inventory-plans/overview.md): The six plan types Solya supports and what each one is for. - [Pre-season plans](https://docs.solya.app/en/inventory-plans/pre-season.md): Collection-level ordering before the season launches, with what-if scenarios. - [Rebalance plans](https://docs.solya.app/en/inventory-plans/rebalance.md): Transfer inventory between your own shops to optimize stock distribution. - [Restock plans](https://docs.solya.app/en/inventory-plans/restock.md): Plan replenishment orders to suppliers for low-stock items. - [Supplier exchange plans](https://docs.solya.app/en/inventory-plans/supplier-exchange.md): Bilateral exchanges with a supplier — return some items and receive others in one operation. - [Supplier return plans](https://docs.solya.app/en/inventory-plans/supplier-return.md): Return-to-vendor (RTV) shipments with credit tracking. ## OpenAPI Specs - [openapi](https://docs.solya.app/openapi.json)