Growth

Update opportunity status

PATCH
/api/v1/opportunities/{opportunity_id}/status

Update opportunity status.

Authorization

HTTPBearer
AuthorizationBearer <token>

JWT access token

In: header

Path Parameters

opportunity_id*string
Formatuuid

Query Parameters

merchant_id?|

Optional merchant to act on. Must be one you are a member of.

Formatuuid

Header Parameters

X-Merchant-ID?string|null

Request Body

application/json

note?string
Lengthlength <= 500
Default""
status*string

Value in

  • "DETECTED"
  • "INVESTIGATING"
  • "RECOMMENDED"
  • "APPROVAL_REQUIRED"
  • "RUNNING"
  • "MEASURING"
  • "SCALED"
  • "STOPPED"
  • "DISMISSED"

Response Body

application/json

application/json

curl -X PATCH "https://example.com/api/v1/opportunities/497f6eca-6276-4993-bfeb-53cbbbba6f08/status" \  -H "Content-Type: application/json" \  -d '{    "status": "DETECTED"  }'
{  "data": {    "agent_run_id": "c3317f32-e28b-4af1-a584-86ac8c788dd8",    "campaign_id": "78614b6c-fe7c-41e2-8e25-c9b3a3c91904",    "confidence": 0,    "created_at": "2019-08-24T14:15:22Z",    "detected_at": "2019-08-24T14:15:22Z",    "effort": "HIGH",    "estimated_value_monthly": 0,    "evidence": [      {        "change": "string",        "confidence": 0,        "detail": "string",        "metric": "string",        "reference": "string",        "source": "analytics",        "value": "string"      }    ],    "experiment_id": "916afd89-cac5-4339-9c59-dd068abdfa69",    "graph_path": [      "string"    ],    "hypothesis": "",    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "impact": "HIGH",    "key": "string",    "kind": "string",    "period_end": "2019-08-24",    "period_start": "2019-08-24",    "priority_score": 0,    "reasoning": "",    "recommended_action": "",    "requires_approval": true,    "risk": "string",    "status": "DETECTED",    "summary": "string",    "tags": [      "string"    ],    "target_segment": {},    "title": "string",    "updated_at": "2019-08-24T14:15:22Z"  },  "meta": {},  "success": true}