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

# Open a batch

> Open a staged ingest batch to push canonical records into.

<Note>
  This endpoint writes to your workspace, so the interactive playground is turned off for it. Copy
  the request and run it against your own workspace with a connector-scope key.
</Note>


## OpenAPI

````yaml POST /api/v1/ingest/batches
openapi: 3.1.0
info:
  title: Elastly API
  version: 1.0.0
  description: >-
    Elastly public API v1: price serving, canonical ingest, write-back claims
    and webhooks. Authenticate every request with an API key: Authorization:
    Bearer elastly_live_...
  contact:
    name: Elastly
    url: https://elastly.io
    email: support@elastly.io
  license:
    name: MIT
    identifier: MIT
servers:
  - url: https://app.elastly.io
security:
  - apiKey: []
tags:
  - name: prices
    description: 'Price serving: batch, idempotent, explainable.'
  - name: ingest
    description: Staged canonical ingest drained by the sync engine.
  - name: writebacks
    description: Claim and acknowledge approved price write-backs.
paths:
  /api/v1/ingest/batches:
    post:
      tags:
        - ingest
      summary: Open a staged ingest batch
      description: Requires a connector-scope key and a connected push connector.
      operationId: createIngestBatch
      responses:
        '201':
          description: The opened batch.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchCreatedResponse'
        '401':
          description: Error envelope with a stable machine-readable code.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '402':
          description: Error envelope with a stable machine-readable code.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '403':
          description: Error envelope with a stable machine-readable code.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '429':
          description: Error envelope with a stable machine-readable code.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '500':
          description: Error envelope with a stable machine-readable code.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
components:
  schemas:
    BatchCreatedResponse:
      $schema: https://json-schema.org/draft/2020-12/schema
      readOnly: true
      type: object
      properties:
        batchId:
          type: string
        connectorId:
          type: string
      required:
        - batchId
        - connectorId
    ApiError:
      $schema: https://json-schema.org/draft/2020-12/schema
      readOnly: true
      type: object
      properties:
        error:
          readOnly: true
          type: object
          properties:
            code:
              type: string
              enum:
                - unauthorized
                - forbidden
                - feature_not_enabled
                - subscription_inactive
                - rate_limited
                - monthly_volume_exceeded
                - invalid_request
                - invalid_json
                - unknown_product
                - unknown_customer
                - no_cost_basis
                - fx_rate_unavailable
                - fx_rate_stale
                - idempotency_key_reused
                - idempotency_key_in_flight
                - batch_not_found
                - batch_already_committed
                - batch_entity_order_violation
                - entity_not_supported
                - writeback_lease_expired
                - internal_error
            message:
              type: string
            param:
              type: string
            requestId:
              type: string
          required:
            - code
            - message
            - requestId
      required:
        - error
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: >-
        Elastly API key. Scopes: erp (price serving), connector (ingest +
        write-backs), storefront.

````