productEnrichmentJob
Requires at least one of the permissions products:product:create or products:product:update.
Poll an enrichment job started by startProductEnrichment. Returns the suggestion once status is COMPLETED, or the reason once FAILED. Scoped to the caller’s organization. Needs the products create or update permission.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
query ProductEnrichmentJob($jobId: ID!) {
productEnrichmentJob(jobId: $jobId) {
status
error
jobId
suggestion {
balanceDisplay
balanceDollars
costDisplay
creditsUsed
description
notes
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query ProductEnrichmentJob($jobId: ID!) {\n productEnrichmentJob(jobId: $jobId) {\n status\n error\n jobId\n suggestion {\n balanceDisplay\n balanceDollars\n costDisplay\n creditsUsed\n description\n notes\n }\n }\n}",
"variables": {
"jobId": "id"
}
}
EOF
Variables:
{
"jobId": "id"
}
Response:
{
"data": {
"productEnrichmentJob": {
"status": "COMPLETED",
"error": "string",
"jobId": "id",
"suggestion": {
"balanceDisplay": "string",
"balanceDollars": "string",
"costDisplay": "string",
"creditsUsed": 0,
"description": "string",
"notes": "string"
}
}
}
}
productEnrichmentJob(
jobId: ID!
): EnrichmentJob!
Arguments
productEnrichmentJob.jobId ● ID! non-null scalar
The ID of the enrichment job.
Type
EnrichmentJob object
An async product-enrichment job. Returned immediately by startProductEnrichment; poll productEnrichmentJob(jobId) until status is COMPLETED (read suggestion) or FAILED (read error). Replaces the request-blocking enrichProduct path, which exceeded the client HTTP timeout.