Skip to content

/v1/catalog-imports/drafts/{draftId}/dry-run

POST
/v1/catalog-imports/drafts/{draftId}/dry-run
curl --request POST \
--url https://api.emely.io/v1/catalog-imports/drafts/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/dry-run \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "matches": { "additionalProperty": "example" } }'

Plan the assembled draft against the live catalog via the planCatalogImport Action: validate, match, mint ids, store the plan and its unit ledger, return a bounded summary (the full report is paged through GET /v1/catalog-imports/plans/{planId}). Requires an api_operator token.

draftId
required
string format: uuid
Media typeapplication/json
object
matches
object
key
additional properties
string
Examplegenerated
{
"matches": {
"additionalProperty": "example"
}
}

The dry-run summary (status planned / invalid / busy)

Media typeapplication/json
object
status
required
string
planId
string | null
schemaSha256
string | null
totals
bound
integer | null
ambiguous
Array<object> | null
object
key
required
string
candidates
required
Array<object>
object
id
required
string
label
required
string
identifiers
required
Array<string>
skipped
Array<object> | null
object
key
required
string
reason
required
string
warnings
Array<string> | null
unmappedCount
integer | null
reportPages
integer | null
errors
Array<object> | null
object
section
required
string | null
path
required
string
message
required
string
sourceRow
Examplegenerated
{
"status": "example",
"planId": "example",
"schemaSha256": "example",
"totals": "example",
"bound": 1,
"ambiguous": [
{
"key": "example",
"candidates": [
{
"id": "example",
"label": "example",
"identifiers": [
"example"
]
}
]
}
],
"skipped": [
{
"key": "example",
"reason": "example"
}
],
"warnings": [
"example"
],
"unmappedCount": 1,
"reportPages": 1,
"errors": [
{
"section": "example",
"path": "example",
"message": "example",
"sourceRow": "example"
}
]
}

Validation refused by the Action

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
string
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example"
}

Missing or invalid bearer token

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
string
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example"
}

Token role refused for this route

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
string
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example"
}

Import draft not found

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
string
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example"
}

Upstream error

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
string
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example"
}