Start an import job
const url = 'http://127.0.0.1:8080/api/v1/recipes/import-previews/example/jobs';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"item_ids":["example"],"on_duplicate":"reject","resolutions":[{"action":"separate","item_id":"example","target_entry_id":"example"}],"retain_source_item_ids":["example"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://127.0.0.1:8080/api/v1/recipes/import-previews/example/jobs \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "item_ids": [ "example" ], "on_duplicate": "reject", "resolutions": [ { "action": "separate", "item_id": "example", "target_entry_id": "example" } ], "retain_source_item_ids": [ "example" ] }'Takes the selected recipes out of the review session and imports them as durable work. The response is a job to watch rather than a result to wait for: closing the page, losing the connection, or restarting Savorum does not abandon the import. Recipes are committed in batches, so partial success is preserved and inspectable recipe by recipe.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Header Parameters
Section titled “Header Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
object
Uploaded preview item IDs whose original files should be retained
Responses
Section titled “Responses”Accepted
object
object
The source formats this import came from, in the reader’s words
The title of this job’s first recipe, for naming the import by what it brought
object
The one-based batch being processed, zero before work starts
object
Unfinished recipes Savorum still holds enough of to run again
object
What was chosen: a filename, several, or the format when there was no file
object
object
object
object
object
Retrieves this recipe’s leading photograph on demand; answers 404 with a problem type saying whether it is pending or unavailable
object
object
object
object
object
object
object
The uploaded original can be retained explicitly when this preview item is committed
Text extracted from a document upload, editable before commit
object
object
object
object
object
object
object
object
Example
{ "job": { "on_duplicate": "reject", "progress": { "diagnostics": [ { "class": "blocking" } ] }, "state": "pending" }, "remaining": { "items": [ { "analysis": { "matches": [ { "evidence": "source-identity" } ], "status": "new" }, "diagnostics": [ { "class": "blocking", "severity": "info" } ] } ], "resolution_groups": [ { "kind": "unit_alias" } ] }}Headers
Section titled “Headers”No valid session or API token (authentication-required), or the credential sent is invalid (invalid-credentials).
object
Examplegenerated
{ "code": "example", "detail": "example", "status": 1, "title": "example", "type": "example"}Not Found
object
Stable application error code; clients may also use the problem type suffix.
A human-readable explanation specific to this occurrence of the problem.
Optional list of individual error details
object
Where the error occurred, e.g. ‘body.items[3].tags’ or ‘path.thing-id’
Error message text
The value at the given location
A URI reference that identifies the specific occurrence of the problem.
Structured context for the stable error code.
object
HTTP status code
A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
A URI reference to human-readable documentation for the error.
object
object
Example
{ "detail": "Property foo is required but is missing.", "instance": "https://example.com/error-log/abc123", "status": 400, "title": "Bad Request", "type": "about:blank"}Conflict
object
Stable application error code; clients may also use the problem type suffix.
A human-readable explanation specific to this occurrence of the problem.
Optional list of individual error details
object
Where the error occurred, e.g. ‘body.items[3].tags’ or ‘path.thing-id’
Error message text
The value at the given location
A URI reference that identifies the specific occurrence of the problem.
Structured context for the stable error code.
object
HTTP status code
A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
A URI reference to human-readable documentation for the error.
object
object
Example
{ "detail": "Property foo is required but is missing.", "instance": "https://example.com/error-log/abc123", "status": 400, "title": "Bad Request", "type": "about:blank"}Request Entity Too Large
object
Stable application error code; clients may also use the problem type suffix.
A human-readable explanation specific to this occurrence of the problem.
Optional list of individual error details
object
Where the error occurred, e.g. ‘body.items[3].tags’ or ‘path.thing-id’
Error message text
The value at the given location
A URI reference that identifies the specific occurrence of the problem.
Structured context for the stable error code.
object
HTTP status code
A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
A URI reference to human-readable documentation for the error.
object
object
Example
{ "detail": "Property foo is required but is missing.", "instance": "https://example.com/error-log/abc123", "status": 400, "title": "Bad Request", "type": "about:blank"}Unprocessable Entity
object
Stable application error code; clients may also use the problem type suffix.
A human-readable explanation specific to this occurrence of the problem.
Optional list of individual error details
object
Where the error occurred, e.g. ‘body.items[3].tags’ or ‘path.thing-id’
Error message text
The value at the given location
A URI reference that identifies the specific occurrence of the problem.
Structured context for the stable error code.
object
HTTP status code
A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
A URI reference to human-readable documentation for the error.
object
object
Example
{ "detail": "Property foo is required but is missing.", "instance": "https://example.com/error-log/abc123", "status": 400, "title": "Bad Request", "type": "about:blank"}Internal Server Error
object
Stable application error code; clients may also use the problem type suffix.
A human-readable explanation specific to this occurrence of the problem.
Optional list of individual error details
object
Where the error occurred, e.g. ‘body.items[3].tags’ or ‘path.thing-id’
Error message text
The value at the given location
A URI reference that identifies the specific occurrence of the problem.
Structured context for the stable error code.
object
HTTP status code
A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
A URI reference to human-readable documentation for the error.
object
object
Example
{ "detail": "Property foo is required but is missing.", "instance": "https://example.com/error-log/abc123", "status": 400, "title": "Bad Request", "type": "about:blank"}Service Unavailable
object
Stable application error code; clients may also use the problem type suffix.
A human-readable explanation specific to this occurrence of the problem.
Optional list of individual error details
object
Where the error occurred, e.g. ‘body.items[3].tags’ or ‘path.thing-id’
Error message text
The value at the given location
A URI reference that identifies the specific occurrence of the problem.
Structured context for the stable error code.
object
HTTP status code
A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
A URI reference to human-readable documentation for the error.
object
object
Example
{ "detail": "Property foo is required but is missing.", "instance": "https://example.com/error-log/abc123", "status": 400, "title": "Bad Request", "type": "about:blank"}