listings_validate_rows
Validate rows of the LEGACY Create Listing sheet (combined headers, config in rows 1–2) with Amazon's VALIDATION_PREVIEW.
writeAmazon Seller (SP-API)sp.definitionsProductTypes_2020-09-01
Publish Queue rows are validated with listings_submit_items (its default mode is VALIDATION_PREVIEW) — this tool rejects them as SplitLayoutRow. Amazon SP-API · getDefinitionsProductType · GET /definitions/2020-09-01/productTypes/{productType} Amazon SP-API · putListingsItem · PUT /listings/2021-08-01/items/{sellerId}/{sku} Gate: approve — interactive: show the change (Amazon's preview first where one exists), wait for an explicit approve; autopilot: only when the seller's own words asked for this change; otherwise ask. Accepts flat rows in {header: value} format — same as the sheet rows. The server encodes attributes using the config dict (from rows 1-2).
Call it
In an AI client (MCP)
{
"name": "listings_validate_rows",
"arguments": {
"store": "myStore-US",
"rows": []
}
}From code (Tool API)
curl -X POST https://api.sellersheetai.com/api/v1/tools/listings_validate_rows \
-H "Authorization: Bearer $SELLERSHEET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"store":"myStore-US","rows":[]}'Arguments
| Name | Type | Description |
|---|---|---|
storerequired | string | the store ref `<store>-<CC>` (name-country, e.g. 'myStore-US') — one of get_user_context's store_refs, verbatim. |
rowsrequired | object[] | 2D array [[headers], [row1], ...] or list of {header: value} dicts. Each row needs: sku, operationType, productType. |
config | object | Dict from sheet rows 1-2 with keys: barcode_type, unit_of_length, unit_of_weight, unit_of_capacity, unit_of_unit_count, language_local. Omitted, the tool sends asin / centimeters / kilograms / liters / count / en_US — pass the sheet's own rows 1–2 on any non-US store; marketplace_id comes from the store. |
Result
Every tool answers {notification, data, human_action}; data carries:
data.results— one entry per input row — {sku, status, issues, row_index}, plus malformed=true when the row was rejected before reaching Amazon (missing sku or productType) and partial_update=true for partial rows. Malformed rows are reported, never dropped.data.valid / data.invalid / data.malformed— counts.data.notes— warnings about the batch as a whole (e.g. partial rows).data.submissionLog— the Submission Log cells for this call — Action, Result ("✓/⚠/✕ n of m valid"), SKUs, Issues ("SKU · message"), Raw Response — append them with write_sheet when the user keeps that tab.
Params (Amazon schema; getDefinitionsProductType)
productType*: string
sellerId: string
marketplaceIds*: [string]
productTypeVersion: string
requirements: LISTING | LISTING_PRODUCT_ONLY | LISTING_OFFER_ONLY
requirementsEnforced: ENFORCED | NOT_ENFORCED
locale: DEFAULT | ar | ar_AE | de | … | zh_TW (38 values)
parentageLevel: NONE | CHILD | PARENTParams (Amazon schema; putListingsItem)
sellerId*: string
sku*: string
marketplaceIds*: [string] (max 1)
includedData: identifiers | issues (list)
mode: VALIDATION_PREVIEW
issueLocale: stringBody (Amazon schema; putListingsItem)
productType*: string
requirements: LISTING | LISTING_PRODUCT_ONLY | LISTING_OFFER_ONLY
attributes*: objectGotchas
- VALIDATE FULL PAYLOADS: VALIDATION_PREVIEW has no partial mode, so a PARTIAL_UPDATE / PATCH / PATCH-delete row reports every required attribute it omits as missing — expected, not a defect (data.notes says so). notification.type is 'error' when every row was malformed (nothing reached Amazon), 'warning' when some rows have issues, else 'success'.
Workflow
- 1. read_sheet the Create Listing tab — row 0 = headers, rows 1+ = data. 2. Call this tool with the rows + config from A1:G2. 3. Fix INVALID rows in the sheet, re-read, re-validate. 4. When all are ACCEPTED, submit with listings_submit_feed_legacy.