> ## Documentation Index
> Fetch the complete documentation index at: https://docs.omnicommerce.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Review queue

> Inspect AI-generated catalog proposals, approve changes, and publish to marketplace stores with the API, SDKs, or CLI.

The Review queue contains AI-generated product copy, image, and marketplace taxonomy proposals. It also shows bulk import and bulk update jobs while they prepare proposals. Use the batch ID from the queue to inspect product proposals. For a row with `importJob`, use the [import workflow](https://docs.omnicommerce.ai/guides/import-and-enrich.md) until a product review batch exists.

| Action | Endpoint | Bearer scope |
| - | - | - |
| List and filter jobs | `GET /api/v1/review-queue` | `catalog:read` |
| Inspect a job or saved proposal | `GET /api/v1/review-queue/{batchId}` | `catalog:read` |
| Page complete proposals and issues | `GET /api/v1/review-queue/{batchId}/items` | `catalog:read` |
| Diagnose product and store failures | `POST /api/v1/review-queue/{batchId}/diagnose` | `catalog:read` |
| Correct and apply pending proposals | `POST /api/v1/review-queue/{batchId}/apply` | `catalog:write` |
| Restart failed review processing | `POST /api/v1/review-queue/{batchId}/retry` | `catalog:write` |
| Enable all review automation scopes | `POST /api/v1/review-queue/automation` | `catalog:write` + `catalog:sync` |
| Rename a review job | `PATCH /api/v1/review-queue/{batchId}` | `catalog:write` |
| Approve selected review items | `POST /api/v1/review-queue/{batchId}/approve` | `catalog:write` |
| Queue marketplace publishing | `POST /api/v1/review-queue/{batchId}/publish` | `catalog:sync` |
| Read or update auto-apply thresholds | `GET` or `PATCH /api/v1/review-queue/settings` | `catalog:review-settings` |

Send a bearer token from an API key, OAuth client, or CLI login. The credential determines the organization. Session callers include `organizationId` in the query for reads or the JSON body for writes. Delegated users need organization-wide permissions for catalog review operations and company settings permission for threshold changes. For an existing API key, grant `catalog:review-settings` before using the settings endpoints. CLI users can sign in again to obtain an updated credential.

TypeScript SDK 0.35.0, Python SDK 0.29.0, and CLI 0.26.0 include the diagnosis and automation methods below. Use them with an OmniCommerce server that has the Review queue endpoints deployed.

## Inspect, approve, and publish

1. List jobs with `status=pending_review` to find review work. The detail response lists product IDs and review item IDs across the job and its linked scopes. Request `?itemId=<review-item-id>` to inspect one saved proposal and its issues.
2. Approve up to 100 selected review item IDs per call. Approval applies the saved catalog changes through the same checks as the app. Retries of already applied items are safe. Inspect `data.results` for stale data, insufficient images, and other per-item failures.
3. Publish using product IDs after all their review scopes are applied. Set `visibility` to `live` or `draft`. Omit `marketplaces` to use outstanding releases at assigned stores, or pass a marketplace subset. Inspect every product and listing result. A `202` means at least one listing was queued. Pass all returned `data.correlations` to `POST /api/v1/commerce/jobs/await` to see marketplace outcomes.

Approving applies catalog changes. If the review already has auto-publish enabled, publication continues after approval commits and every scope for that product is applied. Otherwise call publish explicitly. An approval or queue receipt does not confirm marketplace publication.

```bash theme={null}
omni review-queue list --status pending_review
omni review-queue get --batch-id "$BATCH_ID" --item-id "$ITEM_ID"
omni review-queue approve --batch-id "$BATCH_ID" --json "{\"itemIds\":[\"$ITEM_ID\"]}"
omni review-queue publish --batch-id "$BATCH_ID" --json "{\"productIds\":[\"$PRODUCT_ID\"],\"visibility\":\"live\"}"
```

```typescript theme={null}
const approval = await client.reviewQueue.approve({ batchId, itemIds });
if (approval.data.success) {
  const publication = await client.reviewQueue.publish({
    batchId,
    productIds,
    visibility: "live",
  });
  // Check publication.data.results and follow publication.data.correlations.
}
```

```python theme={null}
approval = client.review_queue.approve(batch_id=batch_id, item_ids=item_ids)
if approval["data"]["success"]:
    publication = client.review_queue.publish(
        batch_id=batch_id, product_ids=product_ids, visibility="live"
    )
```

## Update Review options

Use `PATCH /api/v1/review-queue/settings` to set `autoApplyHighConfidence` and either confidence threshold from 0.50 to 1.00. The values are organization defaults for new jobs. Patch just the fields you want to change.

```bash theme={null}
omni review-queue update-settings --json '{"enrichmentAutoApplyThreshold":0.75,"taxonomyAutoApplyThreshold":0.85}'
```

Rename a job with `omni review-queue update --batch-id "$BATCH_ID" --json '{"title":"Catalog refresh"}'`. An empty title restores the default display title.

## Build an autonomous review operator

Use the supported APIs to inspect and correct data. They expose organization-scoped product facts and marketplace rules with validation and an audit trail. Direct database access is unnecessary.

1. Page `reviewQueue.listItems` / `review_queue.list_items` with `limit: 50`. Follow `nextOffset` while `hasMore` is true. Each item includes `proposal`, `issues`, `baselineSnapshot`, `currentSnapshot`, `appliedSnapshot`, status and approval timestamps. `publishing` contains saved auto-publish requests and their store receipts. Job list/detail `publishProgress` counts requested products as published, partial, publishing, failed or waiting. A published product has confirmed successful full releases to all its requested stores; partial means some stores succeeded. Manual publish calls also return durable correlations; retain them.
2. Diagnose up to 25 products per request. Read each exact store's `latestPublish.error` (message, code, request ID and HTTP status), category, current attribute values, required/missing fields, permitted choices and canonical publish requirements. Follow `nextStoreOffset`, `nextVariantOffset` and each field's `nextOptionOffset` when their continuation flags are set. For complete research evidence, compose this with `products.get`, which exposes ACO sources and claims.
3. Correct pending proposals with `apply`, using the existing workflow proposal shape. Enrichment edits belong under `proposal.product`; taxonomy includes category and attributes; image proposals select saved candidates. Approval still checks stale catalog data, taxonomy and gallery requirements. Do not use `allowProductChangedOverride` by default. For catalog corrections, choose the fields from the diagnosis and product evidence, then use the normal `products.update` API. Use normal variant APIs for variant-specific values.
4. Publish only the repaired/failed exact `storeTargets`. Preserve successful store receipts. Await **every** correlation with `commerce.awaitJobs` / `commerce.await_jobs`; then use `commerce.verifyState` / `commerce.verify_state` to check actual listing state. Handle per-target failures and pending results explicitly. API acceptance is not marketplace success.
5. Enable future processing on existing root jobs using `enableAutomation` / `enable_automation` in chunks of at most 100 batch IDs. This enables enrichment, taxonomy and image auto approval plus saved auto-publish requests through the app's durable worker. Read `items.automation.scopes` to see individual switches and thresholds. `fullyAutomatic` describes configuration; blocked facts and marketplace errors still require the operator to diagnose and resolve them. For new import/enrichment jobs, submit their existing auto-approve and `publish` options at creation.

Store, variant and option pagination limits bound response size. Process all pages before claiming a product or job has been completely checked. Save continuations, decisions and receipts so a bot can resume across thousands of products. For a metadata/connection failure, record that store as unresolved; do not infer it succeeded. Explicit `retry(scope="failed")` restarts failed enrichment work through the existing durable job. It does not fix a bad attribute value.

### Read product errors

Use `products.list({ status: "errors", detail: "full" })` to page through products with saved open errors, or `products.get({ productId })` for one product. Both return `openReviewFlags` from the same presentation as the app. A `publish_failed` flag includes `publishError` with the marketplace, store ID, publish job ID, message, provider code and request ID when recorded. Older failures may have null identifiers. Variant conflicts include affected options, an explanation and repair steps in `details`.

These are saved diagnostics, not a live marketplace readback. Follow list pagination and use review diagnosis for current catalog requirements and permitted attribute values. A bot must decide whether its evidence supports a correction; no error flag grants permission to invent product facts. For a Shopee duplicate-product error such as `product.error_busi`, inspect the existing listing in the exact store and reconcile its identity before publishing again. Choose the appropriate existing product or listing operation for the diagnosed problem.

### Lazada Plug Type

A failure such as `CHK_CATPROP_CPV_REQUIRED: "Plug Type" can't be empty` should lead the operator to the field definition, current value, allowed choices and product evidence. Choose a supported value using the actual supplied plug/power specification. Do not insert `Universal`, `UK` or another default just to pass validation. The repair API accepts the returned attribute key or its known ID alias and preserves other stores and marketplace listing IDs.

```typescript theme={null}
const diagnosis = await client.reviewQueue.diagnose({ batchId, productIds });
const target = diagnosis.data.results.find((r) => r.productId === productId);
if (!target?.success || !target.product)
  throw new Error("Diagnosis incomplete");
const store = target.stores.find(
  (s) => s.marketplace === "lazada" && s.storeId === storeId,
);
const field = store?.attributes.find((a) => a.label === "Plug Type");
if (!field) throw new Error("Read the required category field first");
// chosenOptionValue comes from product evidence and live options.
if (!field.options.some((o) => o.value === chosenOptionValue))
  throw new Error("Read remaining options");
const repaired = await client.products.update({
  productId,
  marketplaces: {
    schemaVersion: 2,
    lazada: {
      stores: { [storeId]: { attributes: { [field.key]: chosenOptionValue } } },
    },
  },
});
if (!repaired.success) throw new Error("Inspect update result");
const publication = await client.reviewQueue.publish({
  batchId,
  productIds: [productId],
  visibility: "live",
  storeTargets: [{ marketplace: "lazada", storeId }],
});
const outcome = await client.commerce.awaitJobs({
  correlations: publication.data.correlations,
});
// Inspect every outcome and verify listing state before reporting it published.
```

Python uses the same JSON field names inside nested updates:

```python theme={null}
diagnosis = client.review_queue.diagnose(batch_id=batch_id, product_ids=product_ids)
updated = client.products.update(product_id=product_id, marketplaces=marketplace_changes)
publication = client.review_queue.publish(
    batch_id=batch_id, product_ids=approved_product_ids, visibility="live",
    store_targets=failed_store_targets,
)
outcomes = client.commerce.await_jobs(correlations=publication["data"]["correlations"])
```

```bash theme={null}
omni review-queue list-items --batch-id "$BATCH_ID" --limit 50 --offset 0
omni review-queue diagnose --batch-id "$BATCH_ID" --json @diagnose.json
omni review-queue apply --batch-id "$BATCH_ID" --json @proposal-corrections.json
omni products update --product-id "$PRODUCT_ID" --json @product-changes.json
omni review-queue publish --batch-id "$BATCH_ID" --json @publish-failed-stores.json
omni review-queue enable-automation --json @review-jobs.json
```

A repair only changes supplied fields after all product review scopes are applied. Weight is in grams and dimensions are the complete package length, width and height in centimeters. Fixed-choice attributes must match marketplace options. Category attributes shared by variants are repaired on the parent; variant-specific values use the existing variant API. Each product repair is atomic, records the actor and submitted evidence URLs, and returns its new version. Other products can succeed when one correction fails; inspect ordered `results` and aggregate counts.

For invalid apply or repair requests, HTTP 400 includes `data.issues` with field paths, `data.requestSchema` with the accepted nested JSON contract, and `data.openApiUrl`. SDK exceptions retain that response in their body. Correct the rejected request before submitting it again; a validation failure does not apply a catalog change.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.