markdownPlan
query · in the family Markdown plan
What it does
Look up one record — a markdown plan — scheduled price cuts over time.
One MarkdownPlan 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:
- Owner
- System Administrator
- Manager
- Associate Manager
- Warehouse Associate
- Sales Associate
- An API key whose scope allows
api:markdownPlan
What happens
Reads only — changes nothing.
Arguments
| Name | Type | Required | Notes |
|---|---|---|---|
id | ID ID! | yes | The id of the record. |
Returns
MarkdownPlan — A MarkdownPlan — the markdown cadence: a product scope + ≤ 8 ordered effective-dated steps (percent_off ppm-EXCLUSIVE · amount_off · to_fixed; startAt strictly increasing; the last step MAY carry endAt = the clearance-LAPSE arm, absent = the standing far-future window). the write rule: the schedule transition pre-computes the whole price ladder per targeted InventoryItem (base₀ = the record covering step-1's startAt, then each prior result — half-away rounding, every result > 0) and writes every future-dated SalePrice up-front through the existing per-record create (splice-gated, evented, plan/step-stamped; the first window per II trims the covering standing record; caps: ≤ 250 items · ≤ 500 writes). The prices then move by dated-window resolution alone — the scheduler fires only the plan's own status flips. The live splice law protects the cadence (an external overlapping write refuses CONFLICT/PRICE_WINDOW_OVERLAP naming the plan's records). Cancel dooms the not-yet-effective plan-stamped records only (effective windows are permanent price history; the step-1 trim is NOT restored). A markdown moves the step-1 base — promotions/loyalty/employee compose on top unchanged. Update is draft-only (amend-after-schedule = cancel + author anew). At most 32 open (draft+scheduled+active) per org group. Org participation is the canned-pool selection (≤ 32; absent = every org); logicalFacilityIds (≤ 32) restricts within the selected orgs' facilities (absent = all of them). NOT searchable (the document non-joiner stance — this born-paginated list is the discovery read); NO uniq marker.
Example request
query ExampleMarkdownPlan($id: ID!) {
markdownPlan(id: $id) {
id
sysId
type
caption
status
parentId
rootId
createdAt
updatedAt
revisionNum
revision
organizationIds
logicalFacilityIds
currency
nextDueAt
resolvedInventoryItemIds
}
}Variables:
{
"id": "01900000-0000-7000-8000-29bb34ff0000"
}Example response
{
"data": {
"markdownPlan": {
"id": "01900000-0000-7000-8000-29bb34ff0000",
"sysId": "MD-EXMP-0000-000F",
"type": "MarkdownPlan",
"caption": "Blue jeans",
"status": "draft",
"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",
"organizationIds": [
"01900000-0000-7000-8000-1971e30a0000"
],
"logicalFacilityIds": [
"01900000-0000-7000-8000-10c08c590000"
],
"currency": "USD",
"nextDueAt": "2027-01-31T00:00:00.000Z",
"resolvedInventoryItemIds": [
"01900000-0000-7000-8000-240777180000"
]
}
},
"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)