Skip to content

Problem routes: notify, rank, suggest, vote

The Problem Verbs notify, rank, suggest, vote as api.sb routes, with inputs, result, refusals and an example.

Reference for Problem, one group of Problem routes.

Problem.notify

Notify tells every Contact who voted on a Problem that a Version addressing it shipped, with a link to the change. Verb page.

Text
POST /{namespace}/problems/{problem}/notify

Path: problem. Body, as JSON: the other inputs. Emits Problem.notified.

Inputs

InputTypeRequiredDescription
problemProblemrequiredThe Problem the Version addresses.
versionVersionThe Version that shipped.

Returns

OutputTypeRequiredDescription
problemProblemrequiredThe Problem, marked addressed.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.

Example

Terminal
curl -X POST https://api.sb/leaseline.app/problems/problem_UzvXXfKsJB/notify \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"
JSON
{
  "api": "https://api.sb/leaseline.app",
  "problem": {
    "$id": "https://api.sb/leaseline.app/problems/problem_UzvXXfKsJB",
    "$type": "Problem",
    "statement": "Tracks lease renewals for small property managers."
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Problem.notify",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}

Problem.rank

Rank orders Problems by revenue at stake, Evidence grade and effort, so the next Project addresses the top one. Verb page.

Text
POST /{namespace}/problems/rank

Body, as JSON: the inputs. Emits Problem.ranked.

Inputs

InputTypeRequiredDescription
icpICPThe ICP whose Problems to rank; omitted, every ICP.

Returns

OutputTypeRequiredDescription
problemslist of ProblemrequiredProblems, highest first, each with its score.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.

Example

Terminal
curl -X POST https://api.sb/leaseline.app/problems/rank \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"icp":"icp_EwhsJU4AOW"}'
JSON
{
  "api": "https://api.sb/leaseline.app",
  "problems": [
    {
      "$id": "https://api.sb/leaseline.app/problems/problem_UzvXXfKsJB",
      "$type": "Problem",
      "statement": "Tracks lease renewals for small property managers."
    }
  ],
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Problem.rank",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}

Problem.suggest

Suggest records a Customer’s ask for something the Product lacks as Evidence on a Problem, with the asker attached. Verb page.

Text
POST /{namespace}/problems/suggest

Body, as JSON: the inputs. Emits Problem.suggested.

Inputs

InputTypeRequiredDescription
texttextrequiredThe ask, in the asker’s words.
problemProblemThe Problem it bears on; an Agent maps it when the asker names none.
viastringWhere it was asked: an App, the Portal, or an Agent’s answer.

Returns

OutputTypeRequiredDescription
evidenceEvidencerequiredThe Evidence, Opinion grade, with askedBy set.
problemProblemrequiredThe Problem with the new Evidence attached.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.

Example

Terminal
curl -X POST https://api.sb/leaseline.app/problems/suggest \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"Example text"}'
JSON
{
  "api": "https://api.sb/leaseline.app",
  "evidence": {
    "$id": "https://api.sb/leaseline.app/evidence/evidence_6xsa6iYImd",
    "$type": "Evidence",
    "grade": "Behavior"
  },
  "problem": {
    "$id": "https://api.sb/leaseline.app/problems/problem_UzvXXfKsJB",
    "$type": "Problem",
    "statement": "Tracks lease renewals for small property managers."
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Problem.suggest",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}

Problem.vote

Vote records a Contact saying a Problem on the public board is theirs too, with their words kept as Evidence. Verb page.

Text
POST /{namespace}/problems/{problem}/vote

Path: problem. Body, as JSON: the other inputs. Emits Problem.voted.

Inputs

InputTypeRequiredDescription
problemProblemrequiredThe Problem.
contactContactrequiredWho votes.
wordstextWhat they said, in their own words.

Returns

OutputTypeRequiredDescription
problemProblemrequiredThe Problem, with the vote counted.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.

Example

Terminal
curl -X POST https://api.sb/leaseline.app/problems/problem_UzvXXfKsJB/vote \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"contact":"contact_WsrosCQi6J"}'
JSON
{
  "api": "https://api.sb/leaseline.app",
  "problem": {
    "$id": "https://api.sb/leaseline.app/problems/problem_UzvXXfKsJB",
    "$type": "Problem",
    "statement": "Tracks lease renewals for small property managers."
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Problem.vote",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}