Get setup status
Where the signed-in person's setup stands, in one read, and which step comes next.
GET /setup/status
Scope read · Access Read only · Operation id setup.get_status
Try it
productmetrics runs after productmetrics login; curl needs PM_TOKEN (see Authentication).
productmetrics setup get-status --jsonResponse
API response (200), shortened:
{
"data": {
"company_id": "2a7d9b3c-1e4f-4a5b-8c6d-7e8f9a0b1c2d",
"property_id": "8c1f4d2e-7a3b-4c5d-9e6f-0a1b2c3d4e5f",
"journey_stage": "onboarding",
"user": {
"onboarding_step": "unknown",
"account_type": "agency",
"role": "admin",
"can_manage": true
// … 3 more fields
}
// … 4 more fields
},
"request_id": "req_01J3EM06J9R9J4CSKX10698TXW"
}CLI output: productmetrics setup get-status --json prints { "ok": true, "data": …, "request_id": "…" } with the same data.
Before you call
Without company_id only the person’s own fields resolve; property_id needs company_id. A value unknown means that part could not be read, not that it is missing. Fields to act on: journey_stage (onboarding, needs_workspace, needs_property, setup_complete, product_data_ready, feed_live, activated); user.google_grant (user_oauth or central_read_only: Google is reachable; none, missing_scope or revoked: the person must grant Google access); hub.company.next_action and hub.property.next_action, the first open setup step (null when none is left). Next steps: no workspace (needs_workspace) → companies.create. No Google grant → google.get_connect_link. No Google Ads property (needs_property) → google_ads.list_accounts, then google_ads.create_property_connection. Merchant Center (property.merchant_center missing, or the feed step) → merchant_center.create_connection, then merchant_center.inspect_auto_setup and merchant_center.apply_auto_setup. Store platform (select_store step) → stores.select_platform. Store (store step) → stores.connect. Tracking (tracking step) → tracking.get_last_purchase to check purchases arrive; when the website has a cookie banner, tracking.update_installation_features sets its consent manager (CMP) so tracking follows the visitor’s choice; tracking.update_margin_policy sets the store’s profit cost fallback, which profit reporting needs. Conversion actions → google_ads.create_conversion_actions, only once a store is connected and active (company.store.status active). Subscription (billing step, company.billing.labelizer) → billing.create_checkout_link. Conversion actions and customer lists are not in this read: google_ads.get_conversion_actions and google_ads.get_customer_lists report them.
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
company_id | string | No | Your workspace id, from productmetrics whoami or properties.list. |
property_id | string | No | The property id, from productmetrics whoami or properties.list. |
Errors
A failure answers with its HTTP status and { error: { code, message, details? }, request_id }. Branch on code (stable, lower_snake); show message to the person. The CLI prints the same error with "ok": false.
{
"error": {
"code": "insufficient_scope",
"message": "This operation needs the read scope; connect again and allow it.",
"details": {
"required_scope": "read"
}
},
"request_id": "req_01JT69M43PK0TQ57NAX4FHS3XV"
}| Status | Code | When |
|---|---|---|
| 400 | invalid_request | A path, query or body value does not match this page. details.issues lists each location, path and message. |
| 401 | invalid_token | The token is missing, expired or revoked: sign in again (productmetrics login). The WWW-Authenticate header says why. |
| 403 | insufficient_scope | The token lacks the read scope (details.required_scope): sign in again and allow it. |
| 429 | rate_limited | More than 600 requests a minute for this person: wait the Retry-After seconds (60) and retry. |