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

# Commit a batch

> Commit a staged batch so the sync engine drains it into canonical data.

<Warning>
  Committing hands the batch to the sync engine, which writes it into your canonical data. The
  interactive playground is turned off here so a docs page can never trigger a real ingest. Copy the
  request and run it against your own workspace.
</Warning>


## OpenAPI

````yaml POST /api/v1/ingest/batches/{batchId}/commit
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/{batchId}/commit:
    post:
      tags:
        - ingest
      summary: Commit a batch; the sync engine drains it
      operationId: commitIngestBatch
      parameters:
        - name: batchId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '202':
          description: The enqueued sync job.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommitBatchResponse'
        '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'
        '404':
          description: Error envelope with a stable machine-readable code.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '409':
          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:
    CommitBatchResponse:
      $schema: https://json-schema.org/draft/2020-12/schema
      readOnly: true
      type: object
      properties:
        jobId:
          type: string
      required:
        - jobId
    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.

````