AlmondTill/G3N API

suggestion

query · in the family Suggestion

What it does

Look up one record — a suggestion — something the desk noticed and drafted a plan for, yours to take or decline.

One Suggestion by id. The record must belong to your organization group; an id from another group reads as not found.

Before you call

A bearer session from an API key (see Authentication and key hygiene) or a signed-in user.

Capability area: Reading your records — Looking up and listing the records of your organization.

Roles that may call it:

What happens

Reads only — changes nothing.

Arguments

NameTypeRequiredNotes
idID ID!yesThe id of the record.

Returns

Suggestion — A Suggestion: a declared skill's detector minted this offer from bounded live reads: the WHY in merchant words, the evidence refs (exactly what it looked at), a drafted plan in wire vocabulary, and an expiry. System-minted end to end (authorless — no create/edit surface exists; refreshSuggestions is the only entrance). the offer rule: a caller sees only suggestions whose drafted plan their own capability could realize — the list filters, the get answers null, and take/decline enforce the same predicate (preview ≡ enforcement). Taking mints a Scratchpad through the live spine (origin suggestion; the plan lands via the setScratchpadPlan validate/mark path verbatim — stale steps arrive marked, never repaired); declining stores the learning reason on the record. Every suggestion drills down to the SuggestionSchema that produced it. The ops event domain (at.ops.suggestion.*).

Example request

graphql
query ExampleSuggestion($id: ID!) {
  suggestion(id: $id) {
    id
    sysId
    type
    caption
    status
    parentId
    rootId
    createdAt
    updatedAt
    revisionNum
    revision
    skill
    schemaId
    why
    dedupKey
    expiresAt
    takenScratchpadId
    declineReason
  }
}

Variables:

json
{
  "id": "01900000-0000-7000-8000-eb53a62d0000"
}

Example response

json
{
  "data": {
    "suggestion": {
      "id": "01900000-0000-7000-8000-eb53a62d0000",
      "sysId": "SU-EXMP-0000-000F",
      "type": "Suggestion",
      "caption": "Blue jeans",
      "status": "open",
      "parentId": "01900000-0000-7000-8000-eacdfcfd0000",
      "rootId": "01900000-0000-7000-8000-a1295a650000",
      "createdAt": "2027-01-31T00:00:00.000Z",
      "updatedAt": "2027-01-31T00:00:00.000Z",
      "revisionNum": 1,
      "revision": "01900000-0000-7000-8000-53c6eea90000",
      "skill": "<skill>",
      "schemaId": "01900000-0000-7000-8000-98907d560000",
      "why": "<why>",
      "dedupKey": "<dedup key>",
      "expiresAt": "2028-01-31T00:00:00.000Z",
      "takenScratchpadId": "01900000-0000-7000-8000-8c0dbe830000",
      "declineReason": "<decline reason>"
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": null,
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

Errors this call can answer