Skip to content

Apply a measurement plan

POST
/api/v1/recipes/import-previews/{preview_id}/measurement-resolution-plans/{plan_id}/apply
curl --request POST \
--url http://127.0.0.1:8080/api/v1/recipes/import-previews/example/measurement-resolution-plans/example/apply \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "expected_preview_revision": 1 }'
preview_id
required
string
plan_id
required
string
Media typeapplication/json
object
expected_preview_revision
required
integer format: int64
>= 1
Examplegenerated
{
"expected_preview_revision": 1
}

The applied plan and revised import preview.

Media typeapplication/json
object
affected_ingredients
required
integer format: int64
affected_occurrences
required
integer format: int64
affected_recipes
required
integer format: int64
current_actionable_occurrences
required
integer format: int64
examples
required
Array<object> | null
object
after
string
before
required
string
recipe_title
required
string
source_text
required
string
key
additional properties
any
impact_digest
required
string
occurrences
required
Array<object> | null
object
authored_form
required
string
candidate_unit_ids
required
Array<string> | null
fingerprint
required
string
group_id
required
string
id
required
string
ingredient_id
required
string
item_id
required
string
recipe_id
required
string
recipe_title
required
string
resolution_key
required
string
source_text
required
string
key
additional properties
any
pending_occurrences
required
Array<object> | null
object
authored_form
required
string
candidate_unit_ids
required
Array<string> | null
fingerprint
required
string
group_id
required
string
id
required
string
ingredient_id
required
string
item_id
required
string
recipe_id
required
string
recipe_title
required
string
resolution_key
required
string
source_text
required
string
key
additional properties
any
plan_id
required
string
preview
object
expires_at
required
string format: date-time
id
required
string
items
required
Array<object> | null
object
already_here
required
boolean
analysis
required
object
matches
required
Array<object> | null
object
authors
required
Array<string> | null
entry_id
required
string
evidence
required
string
Allowed values: source-identity canonical-url portable-id similarity
ingredient_count
required
integer format: int64
recipe_id
required
string
revision
required
integer format: int64
>= 1
score
required
number format: double
<= 1
title
required
string
yield
string
key
additional properties
any
status
required
string
Allowed values: new definite-match likely-duplicate ambiguous
key
additional properties
any
assets
required
object
available
required
integer format: int64
deferred
required
integer format: int64
discovered
required
integer format: int64
failed
required
integer format: int64
preview_url

Retrieves this recipe’s leading photograph on demand; answers 404 with a problem type saying whether it is pending or unavailable

string
unavailable
required
integer format: int64
key
additional properties
any
can_commit
required
boolean
diagnostics
required
Array<object> | null
object
area
required
string
class
required
string
Allowed values: blocking actionable informational
code
required
string
count
required
integer format: int64
>= 1
message
required
string
severity
required
string
Allowed values: info warning error
targets
Array<object> | null
object
action
string
evidence
string
field
string
object_id
string
preserved
string
resolution
object
authored_form
required
string
candidate_unit_ids
required
Array<string> | null
id
required
string
kind
required
string
resolution_key
required
string
source_end
required
integer format: int64
source_start
required
integer format: int64
key
additional properties
any
key
additional properties
any
key
additional properties
any
id
required
string
recipe
required
object
description
string
ingredient_count
required
integer format: int64
ingredients
Array<object> | null
object
items
required
Array<string> | null
title
string
key
additional properties
any
instructions
Array<object> | null
object
items
required
Array<string> | null
title
string
key
additional properties
any
step_count
required
integer format: int64
title
required
string
yield
string
key
additional properties
any
source
required
object
attribution
string
can_retain
required

The uploaded original can be retained explicitly when this preview item is committed

boolean
extracted_text

Text extracted from a document upload, editable before commit

string
filename
string
format_id
required
string
format_name
required
string
url
string
key
additional properties
any
key
additional properties
any
preview_revision
required
integer format: int64
>= 1
resolution_decisions
required
Array<object> | null
object
authored_forms
required
Array<string> | null
candidate_unit_ids
required
Array<string> | null
choices
required
Array<object> | null
object
convention
required
string
convention_label
string
label
required
string
magnitude
string
unit_id
required
string
key
additional properties
any
examples
required
Array<object> | null
object
after
string
before
required
string
recipe_title
required
string
source_text
required
string
key
additional properties
any
group_ids
required
Array<string> | null
id
required
string
ingredients
required
integer format: int64
measure_label
required
string
occurrences
required
integer format: int64
>= 1
recipes
required
integer format: int64
>= 1
source_label
string
key
additional properties
any
resolution_groups
required
Array<object> | null
object
authored_form
required
string
candidate_unit_ids
required
Array<string> | null
choices
required
Array<object> | null
object
convention
required
string
convention_label
string
label
required
string
magnitude
string
unit_id
required
string
key
additional properties
any
examples
required
Array<object> | null
object
after
string
before
required
string
recipe_title
required
string
source_text
required
string
key
additional properties
any
id
required
string
ingredients
required
integer format: int64
kind
required
string
Allowed values: unit_alias
occurrences
required
integer format: int64
>= 1
recipes
required
integer format: int64
>= 1
source_label
string
subgroups
required
Array<object> | null
object
occurrences
required
integer format: int64
>= 1
recipes
required
integer format: int64
>= 1
source_text
required
string
key
additional properties
any
key
additional properties
any
resolution_profiles
required
Array<object> | null
object
id
required
string
label
required
string
selects
required
Array<string> | null
unanswered
required
Array<string> | null
unit_registry_version
required
string
key
additional properties
any
key
additional properties
any
preview_revision
required
integer format: int64
>= 1
remaining_actionable_occurrences
required
integer format: int64
resulting_actionable_occurrences
required
integer format: int64
unchanged_occurrences
required
integer format: int64
unresolvable_occurrences
required
Array<object> | null
object
authored_form
required
string
candidate_unit_ids
required
Array<string> | null
fingerprint
required
string
group_id
required
string
id
required
string
ingredient_id
required
string
item_id
required
string
recipe_id
required
string
recipe_title
required
string
resolution_key
required
string
source_text
required
string
key
additional properties
any
validation_failures
required
Array<string> | null
key
additional properties
any
Example
{
"preview": {
"items": [
{
"analysis": {
"matches": [
{
"evidence": "source-identity"
}
],
"status": "new"
},
"diagnostics": [
{
"class": "blocking",
"severity": "info"
}
]
}
],
"resolution_groups": [
{
"kind": "unit_alias"
}
]
}
}

Bad Request

Media typeapplication/problem+json
object
code

Stable application error code; clients may also use the problem type suffix.

string
detail

A human-readable explanation specific to this occurrence of the problem.

string
errors

Optional list of individual error details

Array<object> | null
object
location

Where the error occurred, e.g. ‘body.items[3].tags’ or ‘path.thing-id’

string
message

Error message text

string
value

The value at the given location

key
additional properties
any
instance

A URI reference that identifies the specific occurrence of the problem.

string format: uri
params

Structured context for the stable error code.

object
key
additional properties
any
status

HTTP status code

integer format: int64
title

A short, human-readable summary of the problem type. This value should not change between occurrences of the error.

string
type

A URI reference to human-readable documentation for the error.

string format: uri
default: about:blank
violations
Array<object>
object
code
required
string
location
required
string
params
object
key
additional properties
any
key
additional properties
any
Example
{
"detail": "Property foo is required but is missing.",
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "about:blank"
}

No valid session or API token (authentication-required), or the credential sent is invalid (invalid-credentials).

Media typeapplication/problem+json
object
code
required
string
detail
required
string
status
required
integer format: int64
title
required
string
type
required
string
key
additional properties
any
Examplegenerated
{
"code": "example",
"detail": "example",
"status": 1,
"title": "example",
"type": "example"
}

Forbidden

Media typeapplication/problem+json
object
code

Stable application error code; clients may also use the problem type suffix.

string
detail

A human-readable explanation specific to this occurrence of the problem.

string
errors

Optional list of individual error details

Array<object> | null
object
location

Where the error occurred, e.g. ‘body.items[3].tags’ or ‘path.thing-id’

string
message

Error message text

string
value

The value at the given location

key
additional properties
any
instance

A URI reference that identifies the specific occurrence of the problem.

string format: uri
params

Structured context for the stable error code.

object
key
additional properties
any
status

HTTP status code

integer format: int64
title

A short, human-readable summary of the problem type. This value should not change between occurrences of the error.

string
type

A URI reference to human-readable documentation for the error.

string format: uri
default: about:blank
violations
Array<object>
object
code
required
string
location
required
string
params
object
key
additional properties
any
key
additional properties
any
Example
{
"detail": "Property foo is required but is missing.",
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "about:blank"
}

Not Found

Media typeapplication/problem+json
object
code

Stable application error code; clients may also use the problem type suffix.

string
detail

A human-readable explanation specific to this occurrence of the problem.

string
errors

Optional list of individual error details

Array<object> | null
object
location

Where the error occurred, e.g. ‘body.items[3].tags’ or ‘path.thing-id’

string
message

Error message text

string
value

The value at the given location

key
additional properties
any
instance

A URI reference that identifies the specific occurrence of the problem.

string format: uri
params

Structured context for the stable error code.

object
key
additional properties
any
status

HTTP status code

integer format: int64
title

A short, human-readable summary of the problem type. This value should not change between occurrences of the error.

string
type

A URI reference to human-readable documentation for the error.

string format: uri
default: about:blank
violations
Array<object>
object
code
required
string
location
required
string
params
object
key
additional properties
any
key
additional properties
any
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

Media typeapplication/problem+json
object
code

Stable application error code; clients may also use the problem type suffix.

string
detail

A human-readable explanation specific to this occurrence of the problem.

string
errors

Optional list of individual error details

Array<object> | null
object
location

Where the error occurred, e.g. ‘body.items[3].tags’ or ‘path.thing-id’

string
message

Error message text

string
value

The value at the given location

key
additional properties
any
instance

A URI reference that identifies the specific occurrence of the problem.

string format: uri
params

Structured context for the stable error code.

object
key
additional properties
any
status

HTTP status code

integer format: int64
title

A short, human-readable summary of the problem type. This value should not change between occurrences of the error.

string
type

A URI reference to human-readable documentation for the error.

string format: uri
default: about:blank
violations
Array<object>
object
code
required
string
location
required
string
params
object
key
additional properties
any
key
additional properties
any
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

Media typeapplication/problem+json
object
code

Stable application error code; clients may also use the problem type suffix.

string
detail

A human-readable explanation specific to this occurrence of the problem.

string
errors

Optional list of individual error details

Array<object> | null
object
location

Where the error occurred, e.g. ‘body.items[3].tags’ or ‘path.thing-id’

string
message

Error message text

string
value

The value at the given location

key
additional properties
any
instance

A URI reference that identifies the specific occurrence of the problem.

string format: uri
params

Structured context for the stable error code.

object
key
additional properties
any
status

HTTP status code

integer format: int64
title

A short, human-readable summary of the problem type. This value should not change between occurrences of the error.

string
type

A URI reference to human-readable documentation for the error.

string format: uri
default: about:blank
violations
Array<object>
object
code
required
string
location
required
string
params
object
key
additional properties
any
key
additional properties
any
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

Media typeapplication/problem+json
object
code

Stable application error code; clients may also use the problem type suffix.

string
detail

A human-readable explanation specific to this occurrence of the problem.

string
errors

Optional list of individual error details

Array<object> | null
object
location

Where the error occurred, e.g. ‘body.items[3].tags’ or ‘path.thing-id’

string
message

Error message text

string
value

The value at the given location

key
additional properties
any
instance

A URI reference that identifies the specific occurrence of the problem.

string format: uri
params

Structured context for the stable error code.

object
key
additional properties
any
status

HTTP status code

integer format: int64
title

A short, human-readable summary of the problem type. This value should not change between occurrences of the error.

string
type

A URI reference to human-readable documentation for the error.

string format: uri
default: about:blank
violations
Array<object>
object
code
required
string
location
required
string
params
object
key
additional properties
any
key
additional properties
any
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

Media typeapplication/problem+json
object
code

Stable application error code; clients may also use the problem type suffix.

string
detail

A human-readable explanation specific to this occurrence of the problem.

string
errors

Optional list of individual error details

Array<object> | null
object
location

Where the error occurred, e.g. ‘body.items[3].tags’ or ‘path.thing-id’

string
message

Error message text

string
value

The value at the given location

key
additional properties
any
instance

A URI reference that identifies the specific occurrence of the problem.

string format: uri
params

Structured context for the stable error code.

object
key
additional properties
any
status

HTTP status code

integer format: int64
title

A short, human-readable summary of the problem type. This value should not change between occurrences of the error.

string
type

A URI reference to human-readable documentation for the error.

string format: uri
default: about:blank
violations
Array<object>
object
code
required
string
location
required
string
params
object
key
additional properties
any
key
additional properties
any
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

Media typeapplication/problem+json
object
code

Stable application error code; clients may also use the problem type suffix.

string
detail

A human-readable explanation specific to this occurrence of the problem.

string
errors

Optional list of individual error details

Array<object> | null
object
location

Where the error occurred, e.g. ‘body.items[3].tags’ or ‘path.thing-id’

string
message

Error message text

string
value

The value at the given location

key
additional properties
any
instance

A URI reference that identifies the specific occurrence of the problem.

string format: uri
params

Structured context for the stable error code.

object
key
additional properties
any
status

HTTP status code

integer format: int64
title

A short, human-readable summary of the problem type. This value should not change between occurrences of the error.

string
type

A URI reference to human-readable documentation for the error.

string format: uri
default: about:blank
violations
Array<object>
object
code
required
string
location
required
string
params
object
key
additional properties
any
key
additional properties
any
Example
{
"detail": "Property foo is required but is missing.",
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "about:blank"
}