Skip to main content
POST
/
ingest
/
v2
Save entities
curl --request POST \
  --url https://api.enterspeed.com/ingest/v2 \
  --header 'Content-Length: <content-length>' \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <x-api-key>' \
  --data '
[
  {
    "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"
      }
    }
  }
]
'
{
  "status": 200,
  "changedSourceEntities": [
    "p-5427"
  ],
  "unchangedSourceEntities": [
    "p-6724"
  ],
  "errors": {
    "1234": [
      "Validation failed"
    ]
  },
  "ingestMetadata": {
    "ingestVersion": "1.0",
    "ingestFormat": "Raw",
    "systemInfo": null,
    "forceTypeOverwrite": false
  }
}

Headers

X-Api-Key
string
required

Api key to validate your source.

Example:

"source-90880177-e9a1-47b3-9a40-7b728a6bafd8"

Content-Length
number
required

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.

Body

application/json

Array of entities to process

originId
string
required

Id of the entity. Must be same format for all entities within the same source. Eg. integers, guids, etc.

type
string
required

The type or alias of the type of entity being send to process. Eg. blogList, blogPage, frontPage, etc. Only used for raw body

url
string

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
string

Allowed as null if no hierarchy exists.

Example:

"123"

redirects
string[]
properties
any

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"
}
}
}
]

Response

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.

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.

status
number

HTTP status code (200 for partial/full success, 422 for all entities failed)

Example:

200

changedSourceEntities
string[]

List of originIds for entities that were changed

Example:
["p-5427"]
unchangedSourceEntities
string[]

List of originIds for entities that were unchanged

Example:
["p-6724"]
errors
object

Dictionary of originId to list of error messages

Example:
{ "1234": ["Validation failed"] }
ingestMetadata
object

Metadata about the ingest operation