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.ndjsonbecomes2024-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:
| Status | Meaning |
|---|---|
not found | File was not successfully uploaded to Kevel storage. |
incoming | File was successfully uploaded to Kevel storage, but has not yet been processed. |
processing | File was successfully uploaded to Kevel storage and is currently being processed. |
failed | File was successfully uploaded to Kevel storage, but processing failed due to an error. |
completed | File 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:
| Field | Description |
|---|---|
Level | information or error. |
Message | What happened. |
Details | Extra information. Only some entries have it. |
The messages you can see are:
| Message | Level | What it means |
|---|---|---|
Ingest process started. | information | Kevel started processing the file. |
Ingest process completed successfully. | information | The file was processed and its changes are live. |
Ingest process failed with error(s). | error | The file failed. Look for an earlier, more specific entry. |
Ingest preprocessing failed. | error | The file could not be prepared for loading. The log gives no further reason. |
Duplicate keys found in input file. | error | An 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."
}
]
}
}