Skip to content
SarvexDocs
Esc
↑↓navigate↵open⌘Jpreview

Resolve a task

Applies a one-click fix, marks a guided task done, or records external completion — per the task’s resolution type.

POST/tasks/{task_id}/resolve
Authorization
AuthorizationBearer token (JWT) · headerrequired

JWT issued by the external IdP via the OAuth 2.0 authorization-code flow (Kinde in production; a simulator in test). The client obtains it and sends it as a Bearer token on every authenticated call. Sarvex's services verify it — issuer, audience, signature (IdP JWKS), expiry — and read identity and tenant from its claims. Sarvex does not issue or revoke these tokens. merchant_id/store_id are read from the verified claims (and the merchant→store mapping), never from the URL. The operator scope is required for /operator/*. Operators acting on a specific merchant pass the X-Operate-As header, which is recorded in the audit log.

Path parameters
task_idstringrequired
Header parameters
Idempotency-Keystring

Client-generated key; replays return the original result.

Request body
application/json
notestring
Responses
200

Resolved task.

task_idstring
store_idstring

The store this task belongs to.

titlestring

Plain-language, merchant vocabulary.

why_it_mattersstring
ownertask_owner
Allowed:merchantsarvexexternal
resolutiontask_resolution
Allowed:one_clickguidedautomaticexternal_wait
statetask_state
Allowed:openin_progressblockeddone
blocks_checkoutboolean
sourcestring

Emitting domain; the task spine unifies all of these.

Allowed:readinesschecklistvalidationconsistencymonitoringcatalog_import
source_refstring | null

Id of the underlying issue/item/finding for drill-in.

remediationsremediation[]

Typed drill-in payload for source=readiness tasks: the rule-based fixes available for the task's product (source_ref = sku). Absent or empty for other sources, or when no unapplied fix exists.

Show properties
Array of remediation
remediation_idstring
skustring
fieldstring
from_valuestring
to_valuestring
typestring
Allowed:rulemanual
truststring
Allowed:highlow
findingobject | null

Typed drill-in payload for source=monitoring tasks: the consistency finding that raised this task, snapshotted at raise time (not re-evaluated live). Absent for other sources.

Show properties
finding_idstring
skustring
fieldstring
sourcesobject
severityseverity
Allowed:infowarningcritical
detected_atstring<date-time>
issuesproduct_issue[]

Typed drill-in payload for source=readiness tasks: the product's open issues that have no rule-based fix (remediable=manual), so a merchant must edit the value directly. Absent or empty for other sources, or when every blocking issue on the product has an automatic remediation covered by remediations.

Show properties
Array of product_issue
issue_idstring
fieldstring
problemstring
Allowed:missingfree_textnon_standard_enuminconsistent
blocks_checkoutboolean
revenue_impact_monthlymoney
Show properties
amount_minorintegerrequired

Amount in minor units (cents).

currencystringrequired
remediablestring
Allowed:rulemanual
created_atstring<date-time>
updated_atstring<date-time>
409

Task is not in a resolvable state (e.g. owner=external, blocked-external).

errorobjectrequired
Show properties
codestringrequired
messagestringrequired
detailsobject | null
Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST "https://api.sarvex.example.com/v1/tasks/string/resolve" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "note": "string"
}'
Response
{
  "task_id": "string",
  "store_id": "string",
  "title": "string",
  "why_it_matters": "string",
  "owner": "merchant",
  "resolution": "one_click",
  "state": "open",
  "blocks_checkout": true,
  "source": "readiness",
  "source_ref": "string",
  "remediations": [
    {
      "remediation_id": "string",
      "sku": "string",
      "field": "string",
      "from_value": "string",
      "to_value": "string",
      "type": "rule",
      "trust": "high"
    }
  ],
  "finding": {
    "finding_id": "string",
    "sku": "string",
    "field": "price",
    "sources": {
      "storefront": "29.99",
      "feed": "34.99",
      "served": "29.99"
    },
    "severity": "info",
    "detected_at": "2019-08-24T14:15:22Z"
  },
  "issues": [
    {
      "issue_id": "string",
      "field": "string",
      "problem": "missing",
      "blocks_checkout": true,
      "revenue_impact_monthly": {
        "amount_minor": 0,
        "currency": "AUD"
      },
      "remediable": "rule"
    }
  ],
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z"
}