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

# Batch Items

> Retrieves the list of items processed for a batch. You can then use the `retrieve_id` to get the content with the Retrieve Endpoint

<Tip>
  **Metadata:** If you attached `metadata` to individual items when [creating the batch](/api-reference/batches/create), it will be returned with each item in the response.
</Tip>


## OpenAPI

````yaml openapi/batches.json GET /v1/batches/{batch_id}/items
openapi: 3.0.3
info:
  title: Batches API
  version: 1.0.0
servers:
  - url: https://api.olostep.com
security: []
paths:
  /v1/batches/{batch_id}/items:
    get:
      summary: >-
        Retrieve completed or failed items list optionally with content for a
        specific batch
      description: >-
        Fetches the list of items and content that  as per the requested status
        for a specific batch ID.
      parameters:
        - name: batch_id
          in: path
          required: true
          schema:
            type: string
          description: The ID of the batch to retrieve items for.
        - name: status
          in: query
          required: false
          schema:
            type: string
            enum:
              - completed
              - failed
          description: Status of the URLs to retrieve (completed or failed).
        - name: cursor
          in: query
          required: false
          schema:
            type: integer
          description: >-
            Pagination cursor. Omit this parameter on the first request. For
            subsequent requests, use the `cursor` value from the previous
            response. See [Pagination](/api-reference/common/pagination) for
            details.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
          description: Number of results to return (recommended 10-50).
      responses:
        '200':
          description: Successful response with batch items.
          content:
            application/json:
              schema:
                type: object
                properties:
                  batch_id:
                    type: string
                  object:
                    type: string
                  status:
                    type: string
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        custom_id:
                          type: string
                        retrieve_id:
                          type: string
                        url:
                          type: string
                        metadata:
                          allOf:
                            - $ref: '#/components/schemas/Metadata'
                          description: >-
                            Item-level metadata if provided during batch
                            creation.
                        links_on_page:
                          type: array
                          items:
                            type: string
                  items_count:
                    type: integer
                  cursor:
                    type: integer
                    description: >-
                      Pagination cursor. Present when there are more results
                      available. Use this value in the next request's `cursor`
                      parameter. See
                      [Pagination](/api-reference/common/pagination) for
                      details.
              example:
                batch_id: batch_abc123def456
                object: list
                status: completed
                items:
                  - custom_id: product-123
                    retrieve_id: ret_xyz789
                    url: https://example.com/product/123
                    metadata:
                      source: catalog_sync
                      priority: high
                  - custom_id: product-456
                    retrieve_id: ret_abc456
                    url: https://example.com/product/456
                items_count: 2
        '400':
          description: >-
            Bad request due to incorrect parameters. See [Bad
            Request](/api-reference/errors/bad_request) for details.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                id: error_abc123
                object: error
                code: validation_error
                type: https://docs.olostep.com/api-reference/errors/bad_request
                status: 400
                title: Bad Request
                detail: Status must be either 'completed' or 'failed'
                created: 1704067200
                metadata: {}
        '401':
          description: >-
            Authentication credentials are missing or invalid. See
            [Unauthorized](/api-reference/errors/unauthorized) for details.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                id: error_abc123
                object: error
                code: invalid_api_key
                type: https://docs.olostep.com/api-reference/errors/unauthorized
                status: 401
                title: Unauthorized
                detail: Your API key is invalid
                created: 1704067200
                metadata: {}
        '404':
          description: >-
            Batch not found for the provided ID. See [Not
            Found](/api-reference/errors/not_found) for details.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                id: error_abc123
                object: error
                code: batch_not_found
                type: https://docs.olostep.com/api-reference/errors/not_found
                status: 404
                title: Not Found
                detail: Batch not found
                created: 1704067200
                metadata: {}
        '500':
          description: >-
            Internal server error. See [Internal
            Error](/api-reference/errors/internal_error) for details.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                id: error_abc123
                object: error
                code: internal_server_error
                type: https://docs.olostep.com/api-reference/errors/internal_error
                status: 500
                title: Internal Server Error
                detail: An unexpected error occurred
                created: 1704067200
                metadata: {}
      security:
        - Authorization: []
components:
  schemas:
    Metadata:
      type: object
      description: >-
        Set of key-value pairs for storing additional information about an
        object. Follows Stripe's approach with validation rules: max 50 keys,
        key max 40 characters (no square brackets), value max 500 characters,
        all values stored as strings.
      additionalProperties:
        type: string
        maxLength: 500
        description: >-
          Metadata value (max 500 characters). Numbers and booleans are
          automatically converted to strings.
      maxProperties: 50
      example:
        order_id: '12345'
        customer_name: John Doe
        priority: high
        processed: 'true'
      x-validation-rules:
        max_keys: 50
        key_max_length: 40
        key_forbidden_chars:
          - '['
          - ']'
        value_max_length: 500
        value_types:
          - string
          - number (coerced)
          - boolean (coerced)
    Error:
      type: object
      description: RFC 7807 Problem Details error response
      properties:
        id:
          type: string
          description: Unique error identifier
        object:
          type: string
          enum:
            - error
          description: Always 'error'
        code:
          type: string
          description: Machine-readable error code
        type:
          type: string
          format: uri
          description: URI reference identifying the problem type
        status:
          type: integer
          description: HTTP status code
        title:
          type: string
          description: Short, human-readable summary
        detail:
          type: string
          description: Human-readable explanation
        created:
          type: integer
          description: Unix timestamp
        metadata:
          $ref: '#/components/schemas/Metadata'
        errors:
          type: array
          description: Optional array of additional error details
          items: {}
      required:
        - id
        - object
        - code
        - type
        - status
        - title
        - detail
        - created
  securitySchemes:
    Authorization:
      type: http
      scheme: bearer
      description: >-
        Bearer authentication header of the form Bearer <token>, where <token>
        is your auth token.

````