listings_parse_payload
Turn Amazon attribute JSON you already hold (from listings_getListingsItem or catalogItems_getCatalogItem) into Publish Queue cells keyed by Amazon's flat-file keys — the inverse o
readAmazon Seller (SP-API)sp.definitionsProductTypes_2020-09-01
f listings_build_payload. To fetch and flatten in one call use listings_fetch_attributes_by_skus or listings_fetch_attributes_by_asins. Amazon SP-API · getDefinitionsProductType · GET /definitions/2020-09-01/productTypes/{productType} Arrays become `#n` entries, object fields `.field`, the bracket selectors (marketplace_id, language_tag, audience) move into the key's brackets, and a one-field attribute with several entries folds into one `#*` cell.
Call it
In an AI client (MCP)
{
"name": "listings_parse_payload",
"arguments": {
"store": "myStore-US",
"productType": "<productType>",
"amazon_attributes": {}
}
}From code (Tool API)
curl -X POST https://api.sellersheetai.com/api/v1/tools/listings_parse_payload \
-H "Authorization: Bearer $SELLERSHEET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"store":"myStore-US","productType":"<productType>","amazon_attributes":{}}'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. |
productTyperequired | string | Amazon productType whose schema drives the inverse shaping, e.g. "HEADPHONES". Use productTypeDefinitions_searchDefinitionsProductTypes if unsure. |
amazon_attributesrequired | object | Amazon-shaped attribute dict exactly as returned by listings_getListingsItem / catalogItems_getCatalogItem — {attr_name: [ {value:…, marketplace_id:…, …}, … ], …}. |
locale | string | Schema locale for localized enumNames passed to getDefinitionsProductType. Defaults to the marketplace's default locale. Allowed: DEFAULT | ar | ar_AE | de | de_DE | en | en_AE | en_AU | en_CA | en_GB | en_IN | en_SG | en_US | es | es_ES | es_MX | es_US | fr | fr_CA | fr_FR | it | it_IT | ja | ja_JP | nl | nl_NL | pl | pl_PL | pt | pt_BR | pt_PT | sv | sv_SE | tr | tr_TR | zh | zh_CN | zh_TW.DEFAULTarar_AEdede_DEenen_AEen_AUen_CAen_GBen_INen_SGen_USeses_ESes_MXes_USfrfr_CAfr_FRitit_ITjaja_JPnlnl_NLplpl_PLptpt_BRpt_PTsvsv_SEtrtr_TRzhzh_CNzh_TW |
language_tag | string | the one language kept (e.g. en_AE, fr_FR); defaults to the marketplace's primary listing locale. An entry in another language is dropped (see data.dropped_entries) — one language per sheet. |
Result
Every tool answers {notification, data, human_action}; data carries:
data.attributes— {key: cell_string} — the flat-file key grammar. A key this productType's CURRENT schema does not carry (Amazon keeps changing schemas) is just more keys here — nothing is skipped or hidden.data.names— {key: display_name} — a NEW key's display name (for seeding row 6 when you write a key the sheet doesn't have yet).data.dropped_entries— {attr: sentence} — one plain-English sentence per attribute naming how many entries were skipped for a foreign marketplace or language, e.g. "2 entries in another language (es_US) ignored — one marketplace and one language per sheet".data.notes— [] normally; one sentence when the product-type schema could not be served and the cells were typed from the JSON alone (notification.type is then "warning"). Submit and validate still need the schema.
Workflow
- 1. catalogItems_getCatalogItem (or listings_getListingsItem) → amazon_attributes 2. listings_parse_payload → flat values 3. write_sheet → populate a review sheet for humans
Params (Amazon schema)
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 | PARENT