notes
query · in the family Reading your records
What it does
The notes attached to one record.
ONE construct's note thread, born-paginated. order: oldest = the conversation order, the default; newest = the last-written notes first — the cursor resumes in the asked direction. targetConstructId is the required anchor (tenant-scoped — a cross-tenant/missing target refuses NOT_FOUND). Requires authentication.
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:
- Owner
- System Administrator
- Manager
- Associate Manager
- Warehouse Associate
- Sales Associate
- Cashier
- An API key whose scope allows
api:notes
Arguments
| Name | Type | Required | Notes |
|---|---|---|---|
targetConstructId | ID ID! | yes | |
limit | Int | no | How many records to answer at most; a page may hold fewer. |
nextToken | String | no | The cursor from the previous page, passed back exactly as received. |
order | NoteOrder | no | One of the values of [NoteOrder](/types/NoteOrder/). |
Returns
NotePage NotePage! — One page of a construct's note thread.
This is a page: items holds the records and nextToken the cursor for the next page — pass it back verbatim until it is null. See paging.
Example request
query ExampleNotes($targetConstructId: ID!, $limit: Int) {
notes(targetConstructId: $targetConstructId, limit: $limit) {
items {
id
type
caption
status
parentId
rootId
createdAt
updatedAt
revisionNum
revision
targetType
authorId
parentNoteId
title
kind
body
labelIds
taskId
}
nextToken
}
}Variables:
{
"targetConstructId": "01900000-0000-7000-8000-567d5fed0000",
"limit": 1
}Example response
{
"data": {
"notes": {
"items": [
{
"id": "01900000-0000-7000-8000-37386ae00000",
"type": "<type>",
"caption": "Blue jeans",
"status": "<status>",
"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",
"targetType": "<target type>",
"authorId": "01900000-0000-7000-8000-958fc7760000",
"parentNoteId": "01900000-0000-7000-8000-5f045a750000",
"title": "Blue jeans",
"kind": "<kind>",
"body": "Restock before the weekend.",
"labelIds": [
"01900000-0000-7000-8000-9eccf29d0000"
],
"taskId": "01900000-0000-7000-8000-76ef3d8c0000"
}
],
"nextToken": "<the cursor from the previous page>"
}
},
"extensions": {
"at": {
"callId": "01EXAMPLE-CALL-ID",
"version": {
"requested": null,
"serviced": {
"name": "genesis",
"number": 0
}
}
}
}
}Errors this call can answer
VALIDATION/INVALID— Something in the request is not valid. Retry: no. (VALIDATION)AUTHN/REQUIRED— Sign in to do this. Retry: no. (AUTHN)AUTHZ/FORBIDDEN— Your role does not allow this action. Retry: no. (AUTHZ)RATE_LIMIT/THROTTLED— Too many requests in a short time. Retry: yes. (RATE_LIMIT)NOT_FOUND/*— That record could not be found. Retry: no. (NOT_FOUND)