dataKiosk_getQuery

Poll Data Kiosk query status.

readAmazon Seller (SP-API)sp.dataKiosk_2023-11-15

Auto-downloads document when processingStatus == DONE. Amazon SP-API · getQuery · GET /dataKiosk/2023-11-15/queries/{queryId} Amazon SP-API · getDocument · GET /dataKiosk/2023-11-15/documents/{documentId} When the query is DONE, the response includes documentContent with the full result. If not yet done, call again in a few seconds. On FATAL, read the named errorDocumentId with dataKiosk_getDocument before resubmitting.

Call it

In an AI client (MCP)

tools/call
{
  "name": "dataKiosk_getQuery",
  "arguments": {
    "store": "myStore-US",
    "queryId": "<queryId>"
  }
}

From code (Tool API)

curl -X POST https://api.sellersheetai.com/api/v1/tools/dataKiosk_getQuery \
  -H "Authorization: Bearer $SELLERSHEET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"store":"myStore-US","queryId":"<queryId>"}'
Early access — the Tool API is open on request, contact us.

Arguments

NameTypeDescription
storerequiredstringthe store ref `<store>-<CC>` (name-country, e.g. 'myStore-US') — one of get_user_context's store_refs, verbatim.
queryIdrequiredstringQuery ID from dataKiosk_createQuery response.

Result

Every tool answers {notification, data, human_action}; data carries:

  • data.queryId — the polled query id.
  • data.processingStatus — CANCELLED | DONE | FATAL | IN_PROGRESS | IN_QUEUE
  • data.result.dataDocumentId — result document id (present only when DONE and the query produced data). NOTE: the field is dataDocumentId, NOT dataDocument.
  • data.result.errorDocumentId — error document id (present only when the query failed with FATAL and produced an error document). Pass it to dataKiosk_getDocument to read WHY the query failed before resubmitting — human_action names it for you on a FATAL.
  • data.result.documentContent — auto-downloaded getDocument payload — present only when DONE and a dataDocumentId existed. It is the getDocument response: {documentId, documentUrl, document}, where `document` is the raw document bytes (the actual result rows).
  • data.result.pagination.nextToken — present when the result spans multiple pages; submit a new dataKiosk_createQuery with the SAME query string plus that token (as paginationToken) to fetch the next page.

On this page

Actions

View as Markdown

Ask an assistant

Ask ChatGPTAsk Claude