> ## 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.

# Read Script Run Results

> Refresh 1–100 script run IDs in first-requested order, trimming and deduplicating IDs. Requires scripts:read.

This is a status snapshot and may return pending jobs; it never submits customer code again. success is true only when all requested runs succeeded. Results retain explicit per-target not_found/unavailable failures.

Use script run IDs with this endpoint; the generic developer jobs API does not resolve them.



## OpenAPI

````yaml /openapi.json post /api/v1/scripts/jobs/await
openapi: 3.1.0
info:
  title: OmniCommerce API
  version: 1.0.0
  license:
    name: Proprietary
    url: https://omnicommerce.sg/terms
  description: >-
    OmniCommerce API surface for agents and developer integrations. Includes
    public endpoints (merchant discovery, product search, compare, catalog, ACO
    retrieval) and authenticated endpoints (product management via API key
    Bearer tokens).
servers:
  - url: https://omnicommerce.sg
    description: Production
  - url: http://localhost:3000
    description: Local development
security: []
tags:
  - name: agentic-checkout
    description: Merchant-fulfilled agentic checkout
    x-group: Agentic Checkout
  - name: agents
    description: agents
    x-group: Agents
  - name: analytics
    description: Sales performance across marketplaces
    x-group: Analytics
  - name: aops
    description: Agent operating procedures
    x-group: AOPs
  - name: branding
    description: branding
    x-group: Branding
  - name: campaigns
    description: Campaign briefs, offer windows, and marketplace runs
    x-group: Campaigns
  - name: commerce
    description: commerce
    x-group: Commerce
  - name: developer-platform
    description: Authenticated developer platform APIs
    x-group: Developer Platform
  - name: documents
    description: Knowledge base document uploads
    x-group: Knowledge Base
  - name: inventory
    description: Inventory quantities, planning signals, and marketplace listing absence
    x-group: Inventory
  - name: looks
    description: AI-styled product looks
    x-group: Looks
  - name: oauth
    description: OAuth token endpoints
    x-group: OAuth
  - name: orders
    description: Workspace and agentic orders
    x-group: Orders
  - name: organizations
    description: Organization management
    x-group: Organizations
  - name: price-books
    description: Marketplace list-price markup rules
    x-group: Price Books
  - name: products
    description: Product CRUD, bulk import, enrichment, publish, and delist
    x-group: Products
  - name: promotions
    description: Central promotions and marketplace sync
    x-group: Promotions
  - name: public-agent
    description: Public agent discovery and catalog APIs
    x-group: Public Agent
  - name: returns
    description: returns
    x-group: Returns
  - name: reviews
    description: Marketplace product reviews and seller replies
    x-group: Reviews
  - name: scripts
    description: scripts
    x-group: Scripts
  - name: settlements
    description: settlements
    x-group: Settlements
  - name: ucp
    description: Universal Commerce Protocol
    x-group: UCP
paths:
  /api/v1/scripts/jobs/await:
    post:
      tags:
        - scripts
      summary: Read Script Run Results
      description: >-
        Refresh 1–100 script run IDs in first-requested order, trimming and
        deduplicating IDs. Requires scripts:read.


        This is a status snapshot and may return pending jobs; it never submits
        customer code again. success is true only when all requested runs
        succeeded. Results retain explicit per-target not_found/unavailable
        failures.


        Use script run IDs with this endpoint; the generic developer jobs API
        does not resolve them.
      operationId: post_v1_scripts_jobs_await
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                organizationId:
                  type: string
                  minLength: 1
                jobIds:
                  minItems: 1
                  maxItems: 100
                  type: array
                  items:
                    type: string
                    minLength: 1
              required:
                - jobIds
              additionalProperties: false
      responses:
        '200':
          description: Script result.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  jobIds:
                    type: array
                    items:
                      type: string
                  succeededCount:
                    type: number
                  failedCount:
                    type: number
                  pendingCount:
                    type: number
                  results:
                    type: array
                    items:
                      anyOf:
                        - $ref: '#/components/schemas/OrganizationScriptRun'
                        - type: object
                          properties:
                            id:
                              type: string
                            status:
                              type: string
                              enum:
                                - not_found
                                - unavailable
                            errorRef:
                              type: object
                              properties:
                                message:
                                  type: string
                              required:
                                - message
                          required:
                            - id
                            - status
                            - errorRef
                required:
                  - success
                  - jobIds
                  - succeededCount
                  - failedCount
                  - pendingCount
                  - results
        '400':
          description: Invalid request, arguments, or deployment.
        '401':
          description: Missing or invalid credentials.
        '403':
          description: Missing script scope, organization capability, or Scripts feature.
        '404':
          description: Script not found in this organization.
        '429':
          description: Rate limit exceeded.
      security:
        - bearerAuth: []
components:
  schemas:
    OrganizationScriptRun:
      type: object
      properties:
        id:
          type: string
        organizationId:
          type: string
        scriptId:
          type: string
        scriptVersionId:
          type: string
        actorUserId:
          anyOf:
            - type: string
            - type: 'null'
        agentId:
          anyOf:
            - type: string
            - type: 'null'
        aopId:
          anyOf:
            - type: string
            - type: 'null'
        assistantRunId:
          anyOf:
            - type: string
            - type: 'null'
        idempotencyKey:
          type: string
        windmillJobId:
          anyOf:
            - type: string
            - type: 'null'
        status:
          type: string
          enum:
            - submitting
            - queued
            - running
            - succeeded
            - failed
            - timed_out
            - cancel_requested
            - cancelled
            - review_required
        argsRedacted:
          type: object
          propertyNames:
            type: string
          additionalProperties: {}
        resultRef:
          anyOf:
            - type: object
              propertyNames:
                type: string
              additionalProperties: {}
            - type: 'null'
        errorRef:
          anyOf:
            - type: object
              propertyNames:
                type: string
              additionalProperties: {}
            - type: 'null'
        artifactRef:
          anyOf:
            - type: object
              propertyNames:
                type: string
              additionalProperties: {}
            - type: 'null'
        createdAt:
          type: string
        updatedAt:
          type: string
      required:
        - id
        - organizationId
        - scriptId
        - scriptVersionId
        - actorUserId
        - agentId
        - aopId
        - assistantRunId
        - idempotencyKey
        - windmillJobId
        - status
        - argsRedacted
        - resultRef
        - errorRef
        - artifactRef
        - createdAt
        - updatedAt
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        Bearer API key for server-to-server access. Session auth is also
        supported in first-party UI flows.

````

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