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

Get the store's current journey state

GET/stores/{store_id}/journey
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
store_idstringrequired

A store the caller's merchant owns. Authorized server-side against the principal; not a free-form tenant selector.

Responses
200

Journey state and next action.

statejourney_state
Allowed:connectedsyncedreadylive
historyobject[]

Every state this store has occupied, in the order entered. Append-only.

Show properties
Array of object
statejourney_state
Allowed:connectedsyncedreadylive
entered_atstring<date-time>
next_actionobject | null
Show properties
task_idstring
titlestring
open_task_countsobject
Show properties
merchantinteger
sarvexinteger
externalinteger
entered_state_atstring<date-time>
stageengagement_stage

The 5 concierge engagement stages (internal/planes/control/engagement).

Allowed:prospectkickoffremediationvalidationgo_live
entered_stage_atstring<date-time>
stage_namestring

Human-readable name of the current engagement stage.

stage_descriptionstring
operator_actionsstring[]

Actions an operator typically performs during this stage.

typical_days_in_stageinteger

Typical duration of this stage, for staleness comparison.

stage_elapsed_daysinteger

Days elapsed since entering the current stage.

required_tasks_statusobject[]

Per-owner rollup of whether that owner's tasks are clear for this stage to exit. Empty for stages with no owner-tracked exit requirement.

Show properties
Array of object
ownertask_owner
Allowed:merchantsarvexexternal
resolvedboolean
404

Resource not found within the caller's tenant.

errorobjectrequired
Show properties
codestringrequired
messagestringrequired
detailsobject | null
Try it
Server
Authorization
Parameters
Request
curl -X GET "https://api.sarvex.example.com/v1/stores/string/journey" \
  -H "Authorization: Bearer YOUR_TOKEN"
Response
{
  "state": "connected",
  "history": [
    {
      "state": "connected",
      "entered_at": "2019-08-24T14:15:22Z"
    }
  ],
  "next_action": {
    "task_id": "string",
    "title": "string"
  },
  "open_task_counts": {
    "merchant": 0,
    "sarvex": 0,
    "external": 0
  },
  "entered_state_at": "2019-08-24T14:15:22Z",
  "stage": "prospect",
  "entered_stage_at": "2019-08-24T14:15:22Z",
  "stage_name": "string",
  "stage_description": "string",
  "operator_actions": [
    "string"
  ],
  "typical_days_in_stage": 0,
  "stage_elapsed_days": 0,
  "required_tasks_status": [
    {
      "owner": "merchant",
      "resolved": true
    }
  ]
}