Ingest Status

Returns the processing status of a file uploaded with a URL from Create Ingest URL, and a log of what happened while it was ingested.

Overview

The Ingest Status endpoint tells you whether a file you uploaded with a URL from Create Ingest URL has been processed, and gives you a log of what happened while it was ingested.

The request takes two query parameters and the same Kevel API key as your other requests:

  • folder: the folder you sent when you created the ingest URL.
  • file: the file name with the timestamp Kevel added to the front, not the name you sent. For example, products.ndjson becomes 2024-04-12T20:02:18.425674978-products.ndjson.
curl -X GET \
     -H "X-Kevel-ApiKey:$KEVEL_API_KEY" \
     'https://api.kevel.co/v1/itemdb/ingest-status?folder=products&file=2024-04-12T20%3A02%3A18.425674978-products.ndjson'

You don't have to build this request. The status link returned by Create Ingest URL is this same URL with both parameters already filled in, so you can request it as it is. The timestamped name is also the last part of the upload URL's path, before the ?.

Statuses

The status field is one of the following:

StatusMeaning
not foundFile was not successfully uploaded to Kevel storage.
incomingFile was successfully uploaded to Kevel storage, but has not yet been processed.
processingFile was successfully uploaded to Kevel storage and is currently being processed.
failedFile was successfully uploaded to Kevel storage, but processing failed due to an error.
completedFile was successfully uploaded to Kevel storage and successfully processed. Any changes to the catalog are now "live" in the system.

The ingestion log

Once a file has been picked up, the response also includes metadata.Entries, a log of the ingestion with the newest entry first. It holds up to 500 entries. Each entry has:

FieldDescription
Levelinformation or error.
MessageWhat happened.
DetailsExtra information. Only some entries have it.

The messages you can see are:

MessageLevelWhat it means
Ingest process started.informationKevel started processing the file.
Ingest process completed successfully.informationThe file was processed and its changes are live.
Ingest process failed with error(s).errorThe file failed. Look for an earlier, more specific entry.
Ingest preprocessing failed.errorThe file could not be prepared for loading. The log gives no further reason.
Duplicate keys found in input file.errorAn item ID appears more than once in the file. Details lists the IDs.

For a duplicate ID failure, Details has two fields:

  • TableId: the internal ID of the table the duplicates were found in.
  • DuplicateIds: the repeated IDs, separated by commas. The list is cut off after 1,000 characters, and ends in ... when that happens.

The duplicate check runs before anything is loaded, so no changes from the file are applied. Fix the duplicates, request a fresh ingest URL and upload the file again.

For any other failure the log does not give a reason. Contact your Kevel account team to help identify the cause.

Example: completed

{
  "status": "completed",
  "metadata": {
    "Entries": [
      {
        "Level": "information",
        "Message": "Ingest process completed successfully."
      },
      {
        "Level": "information",
        "Message": "Ingest process started."
      }
    ]
  }
}

Example: failed because of duplicate IDs

{
  "status": "failed",
  "metadata": {
    "Entries": [
      {
        "Level": "error",
        "Message": "Ingest process failed with error(s)."
      },
      {
        "Level": "error",
        "Message": "Duplicate keys found in input file.",
        "Details": {
          "TableId": 123,
          "DuplicateIds": "SKU-104,SKU-221"
        }
      },
      {
        "Level": "information",
        "Message": "Ingest process started."
      }
    ]
  }
}
Query Params
string
required

The folder you sent when you created the ingest URL, as it appears in the status link.

string
required

The name of the uploaded file with the timestamp Kevel added to the front, for example 2024-04-12T20:02:18.425674978-products.ndjson, not the name you sent. Copy it from the status link returned by Create Ingest URL.

Responses

Language
Credentials
Header
LoadingLoading…
Response
Choose an example:
application/json