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

# Save entities

> Starting the process for saving entities.

*Note: The bulk endpoint can take up to 50 entities in a single request.*

*Note: The total size of the request body must not exceed 200 MB.*




## OpenAPI

````yaml /enterspeed/enterspeedv1Api.yaml post /ingest/v2
openapi: 3.0.0
info:
  version: 0.4.0
  title: API documentation
  description: >-
    The Enterspeed API are based on REST principles.


    Before you start you will need to [create an
    Enterspeed-account](https://app.enterspeed.com) and set up a tenant (a
    property for your website). Here you can create

    - A data source (provides you with an API key for the **Ingest API**).

    - An environment client (provides you with an API key for the **Delivery
    API** and **Query API**).

    - A domain (ensure the correct data gets fetched).


    🎉 Have fun using our API. Make sure to [contact
    us](https://www.enterspeed.com/contact) if you need any help. We're happy
    assist!
  x-logo:
    url: https://docs.enterspeed.com/img/logo.svg
    altText: Enterspeed Logo
  license:
    name: See Enterspeed Terms of service
    url: https://www.enterspeed.com/terms-of-service
servers:
  - url: https://api.enterspeed.com
    description: General API
security: []
tags:
  - name: Delivery
    description: >-
      The Delivery API is what you use to `GET` your data from Enterspeed to
      your frontend project. Before you can fetch your content from Enterspeed,
      you first need to create an **Environment client** which generates an API
      key. This is done under *Settings --> Environment settings*.


      You can find an example of how to fetch data [Umbraco & Next.js
      tutorial](https://docs.enterspeed.com/tutorials/umbraco-nextjs/fetching-data-in-nextjs).
  - name: Ingest
    description: >-
      The Ingest API is used to `POST` your current data sources into
      Enterspeed. Before you can start ingesting data, you'll need to create a
      **Data source** inside Enterspeed, which generates an API key. This is
      done under *Settings --> Data sources*.


      The Ingest API can also be used to `DELETE` already ingested data from
      Enterspeed.
  - name: Routes
    description: >-
      The Routes API is what you use to `GET` all available URL routes for a
      specific environment, which can be helpful for SSG (Static Site
      Generation) or creating a sitemap.


      Before you can fetch your routes from Enterspeed, you first need to create
      an **Environment client** which generates an API key. This is done under
      *Settings --> Environment settings*.


      **ℹ NOTE:** The `first` or `last` parameter is required and must be set
      between 100 - 500 (e.g. `first=250`). Both are not allowed at the same
      time.
  - name: Query
    description: >-
      The Query API is what you use to query items from your indexes.


      Before you can query your indexes from Enterspeed, you first need to
      create an **Environment client** which generates an API key. This is done
      under *Settings --> Environment settings*.
paths:
  /ingest/v2:
    post:
      tags:
        - Ingest
      summary: Save entities
      description: >
        Starting the process for saving entities.


        *Note: The bulk endpoint can take up to 50 entities in a single
        request.*


        *Note: The total size of the request body must not exceed 200 MB.*
      operationId: saveEntityBulk
      parameters:
        - name: X-Api-Key
          required: true
          in: header
          description: Api key to validate your source.
          schema:
            type: string
            example: source-90880177-e9a1-47b3-9a40-7b728a6bafd8
        - name: Content-Length
          required: true
          in: header
          description: >
            The length of the message body, in bytes (this header is
            automatically added by most clients). 


            Note: The endpoint does not support `Transfer-Encoding: chunked`.
            `JsonContent` and `PostAsJsonAsync` in .NET will by default set the
            `Transfer-Encoding: chunked` header. Use types like e.g.
            `StringContent` or `ByteArrayContent` instead.
          schema:
            type: number
      requestBody:
        description: Array of entities to process
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkSimplified'
      responses:
        '200':
          description: >
            Valid request. Processing of posted entities has begun. 


            A successful response is returned if one or more entities were
            valid. Only if all entities are invalid a 422 response is returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkIngestResult'
        '401':
          description: Unauthorized. Missing X-Api-Key header or the X-Api-Key is invalid.
        '422':
          description: >-
            Unprocessable request. The request was well-formed but was unable to
            be followed due to semantic errors.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkIngestResult'
components:
  schemas:
    BulkSimplified:
      type: array
      items:
        type: object
        required:
          - originId
          - type
        properties:
          originId:
            type: string
            description: >
              Id of the entity. Must be same format for all entities within the
              same source. Eg. integers, guids, etc.
          type:
            type: string
            description: >
              The type or alias of the type of entity being send to process. Eg.
              blogList, blogPage, frontPage, etc. Only used for raw body
          url:
            type: string
            description: |
              If the entity is routable send the URL. Otherwise leave as
              null.  

              Allowed as null if entity is not routable.

              Note: The URL needs to begin with a leading slash.
          originParentId:
            type: string
            example: '123'
            description: Allowed as null if no hierarchy exists.
          redirects:
            type: array
            description: >
              URLs that redirects to the current page. Eg.
              https://enterspeed.com/product-enterspeed-tshirt-old/ redirecting
              to https://enterspeed.com/product-enterspeed-tshirt/.
            items:
              type: string
              example: https://enterspeed.com/product-enterspeed-tshirt-old/
          properties:
            description: |
              Property names:
                - cannot start with a digit
                - cannot consist only of underscores
                - can contain A-Z, a-z letters, digits and underscores
      example:
        - type: product
          originId: p-5427
          properties:
            name: Official Enterspeed T-shirt
            price: 199.99
            inStock: true
            features:
              - name: color
                value: blue
              - name: size
                value: M
            information:
              short: Nice t-shirt
              long: Nice t-shirt in cotton
        - type: product
          originId: p-6724
          properties:
            name: Official Enterspeed Hoddie
            price: 249.95
            inStock: true
            features:
              - name: color
                value: blue
              - name: size
                value: M
            information:
              short: Nice hoddie
              long: Nice hoddie in cotton
    BulkIngestResult:
      type: object
      description: >
        Response for bulk ingest operations, containing lists of changed,
        unchanged, and errored entities.


        **Note:** This schema applies to bulk operations only. For single entity
        ingest responses, see the `/ingest/v2/{originId}` endpoint
        documentation.
      properties:
        status:
          type: number
          description: >-
            HTTP status code (200 for partial/full success, 422 for all entities
            failed)
          example: 200
        changedSourceEntities:
          type: array
          items:
            type: string
          description: List of originIds for entities that were changed
          example:
            - p-5427
        unchangedSourceEntities:
          type: array
          items:
            type: string
          description: List of originIds for entities that were unchanged
          example:
            - p-6724
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          description: Dictionary of originId to list of error messages
          example:
            '1234':
              - Validation failed
        ingestMetadata:
          $ref: '#/components/schemas/IngestMetadata'
    IngestMetadata:
      type: object
      description: Metadata about the ingest operation
      properties:
        ingestVersion:
          type: string
          description: The version of the ingest process
          example: '1.0'
        ingestFormat:
          type: string
          description: The format of the ingested data (Raw or Simplified)
          example: Raw
        systemInfo:
          type: string
          nullable: true
          description: Additional system information about the ingest operation
          example: null
        forceTypeOverwrite:
          type: boolean
          description: >-
            Indicates whether the X-Enterspeed-Force-Type header was present to
            bypass type immutability checks
          example: false

````