Common
AccessScope
Section titled “AccessScope”The permission vocabulary, shared by staff roles and app tokens.
Write implies read for the same resource — WRITE_PRODUCTS alone satisfies a
field requiring READ_PRODUCTS. Nothing implies anything across resources.
The vocabulary is complete ahead of the operations that use it, deliberately: a scope added later would leave every app already installed unable to use the new feature until its merchant approved it again.
| Value | Meaning |
|---|---|
READ_PRODUCTS | No description. |
WRITE_PRODUCTS | No description. |
READ_INVENTORY | No description. |
WRITE_INVENTORY | No description. |
READ_LOCATIONS | No description. |
WRITE_LOCATIONS | No description. |
READ_SHIPPING | No description. |
WRITE_SHIPPING | No description. |
READ_ORDERS | No description. |
WRITE_ORDERS | No description. |
READ_DRAFT_ORDERS | No description. |
WRITE_DRAFT_ORDERS | No description. |
READ_CHECKOUTS | The Checkout API: reading a checkout, and starting, filling and completing one. No Admin API field asks for either. They are here so that a merchant’s own checkout can be authorised exactly as Kaladan’s hosted checkout is — the same two words, with nothing the platform holds that a merchant cannot. |
WRITE_CHECKOUTS | No description. |
READ_FULFILLMENTS | No description. |
WRITE_FULFILLMENTS | No description. |
READ_CUSTOMERS | No description. |
WRITE_CUSTOMERS | No description. |
READ_DISCOUNTS | No description. |
WRITE_DISCOUNTS | No description. |
READ_PRICE_LISTS | No description. |
WRITE_PRICE_LISTS | No description. |
READ_PAYMENTS | Reading a transaction, a gateway configuration, or a card-to-card receipt. Separate from READ_PAYOUTS because seeing that an order was paid and seeing what the merchant nets after the platform’s split are different disclosures. |
WRITE_PAYMENTS | No description. |
READ_PAYOUTS | Settlement records, split beneficiaries, and what the merchant actually receives. |
WRITE_PAYOUTS | No description. |
READ_CONTENT | No description. |
WRITE_CONTENT | No description. |
READ_THEMES | No description. |
WRITE_THEMES | No description. |
READ_CHANNELS | No description. |
WRITE_CHANNELS | No description. |
READ_MARKETING | No description. |
WRITE_MARKETING | No description. |
READ_METAOBJECTS | No description. |
WRITE_METAOBJECTS | No description. |
READ_FILES | No description. |
WRITE_FILES | No description. |
READ_TAX | Tax settings and سامانه مودیان invoices. |
WRITE_TAX | No description. |
READ_ANALYTICS | No description. |
READ_SHOP_SETTINGS | No description. |
WRITE_SHOP_SETTINGS | No description. |
WRITE_BILLING | Changing the shop’s plan, and paying Kaladan. The one scope the Partner API’s enum does not contain, so no app can request it — there is no value for it to name. Money between Kaladan and the merchant is not the merchant’s commerce, and nothing installed should be able to move a shop onto a more expensive plan. This asymmetry is why the two enums are checked as Partner subset-of Admin rather than as equal. |
READ_STAFF | Staff, roles, and invitations. The scope that grants scopes. |
WRITE_STAFF | No description. |
READ_APPS | No description. |
WRITE_APPS | No description. |
READ_AUDIT_LOG | The audit log. Read-only and separately scoped, because the record of who did what is exactly what somebody covering their tracks would want. |
Attribute
Section titled “Attribute”A key/value pair on an order, a line, or a draft.
String!
No description.
String
No description.
AttributeInput
Section titled “AttributeInput”A key/value pair as supplied.
String!
No description.
String
No description.
AuditActor
Section titled “AuditActor”Who took an action.
AuditActorKind!
No description.
ID
The staff member’s or app’s id. Null for the platform.
displayName
Section titled “displayName”String!
A name for display — the staff member’s, or the app’s.
impersonatedBy
Section titled “impersonatedBy”String
The operator behind an impersonated session, when there was one.
Impersonation is recorded as the merchant’s own action and names the operator, because a merchant reading their audit log must be able to see that support did this rather than one of their staff.
AuditActorKind
Section titled “AuditActorKind”What kind of actor took an action.
| Value | Meaning |
|---|---|
STAFF | No description. |
APP | No description. |
OPERATOR | Kaladan’s own staff, acting through support tooling. |
SYSTEM | The platform itself — a scheduled job, a reconciliation worker. |
AuditEvent
Section titled “AuditEvent”One privileged action, and who took it.
Read-only from every surface, including this one. An audit log a caller can write is not an audit log.
It exists for three readers who each need it for different reasons: a merchant asking which staff member discounted an order, support asking what an app changed before a shop broke, and the platform asking what an impersonating operator did.
ID!
No description.
action
Section titled “action”String!
product.updated, staff.role_changed, payout.settings_changed.
AuditActor!
Who: a staff member, an app, or the platform itself.
subject
Section titled “subject”Node
What was acted on. Null when the subject has since been deleted.
subjectType
Section titled “subjectType”String!
No description.
subjectId
Section titled “subjectId”ID!
No description.
changes
Section titled “changes”JSON
What changed, field by field: {"price": {"from": "1200000", "to": "990000"}}.
Values are redacted where they would disclose more than the event does — a national identifier appears as changed, not as its old and new values.
String
The IP the action came from, where there was one.
requestId
Section titled “requestId”String
The request id, tying this to the logs and the trace that produced it.
occurredAt
Section titled “occurredAt”DateTime!
No description.
CurrencyCode
Section titled “CurrencyCode”The currencies a Kaladan shop can price in.
| Value | Meaning |
|---|---|
IRR | Iranian rial. |
DateTime
Section titled “DateTime”An instant, RFC 3339, always UTC. Jalali is presentation; see the API conventions.
Decimal
Section titled “Decimal”An exact decimal number, carried as a string. Money is never a float.
Dimensions
Section titled “Dimensions”A packed size, for carrier rating and for display.
length
Section titled “length”Float!
No description.
Float!
No description.
height
Section titled “height”Float!
No description.
LengthUnit!
No description.
DimensionsInput
Section titled “DimensionsInput”A packed size as supplied.
length
Section titled “length”Float!
No description.
Float!
No description.
height
Section titled “height”Float!
No description.
LengthUnit!
No description.
ExternalVideo
Section titled “ExternalVideo”A video hosted somewhere else and embedded — Aparat, YouTube.
ID!
No description.
String
No description.
mediaContentType
Section titled “mediaContentType”MediaContentType!
No description.
position
Section titled “position”Int!
No description.
previewImage
Section titled “previewImage”Image
No description.
status
Section titled “status”MediaStatus!
No description.
errorMessage
Section titled “errorMessage”String
No description.
embedUrl
Section titled “embedUrl”URL!
No description.
ExternalVideoHost!
No description.
ExternalVideoHost
Section titled “ExternalVideoHost”Where an external video lives.
| Value | Meaning |
|---|---|
APARAT | Iran’s own video platform, and the one that resolves during an international outage. |
YOUTUBE | No description. |
VIMEO | No description. |
A file in the shop’s library: one uploaded there, or one uploaded for a product’s gallery, a post or the shop’s brand.
Always public. A private file — an import spreadsheet, an export, a buyer’s
receipt — is never a File here, by files or by node: it is reached
through what owns it, under that owner’s scope, by a short-lived address
(Job.resultUrl). So every url here serves the file to anybody holding it,
which is what public means.
ID!
No description.
String!
What the merchant called it: the name given when it was made or renamed, else the name of the file uploaded. Empty when neither said.
String
What the file shows, in words, for somebody who cannot see it — what a screen reader says for a picture. Null when nobody wrote one.
The file’s own. A product’s photo is described in its gallery
(productMediaUpdate), which is what a storefront reads for it.
contentType
Section titled “contentType”String!
MIME type as declared at upload; never re-derived from the bytes.
Int!
Measured by the object store after upload, not taken from the client.
URL!
Where the file is served, to anybody with the address. Long-lived, and the address a gallery composes for the same file.
previewUrl
Section titled “previewUrl”URL
An image’s address, transformed as asked — a thumbnail for a list. Applied by
the CDN and cached, as Image.url is. Null for a file that is not an image.
| Argument | Type | Meaning |
|---|---|---|
transform | ImageTransform | No description. |
usedBy
Section titled “usedBy”[FileUse!]!
What uses the file, as far as the platform can follow: a product whose
gallery still holds the file and a post that still shows it, each asked
about the files uploaded for it, and the shop’s
logo, square logo, favicon or cover, asked about every file because a brand
image may be any Image. A product’s photo that is also the cover is used
twice. Empty when none does, and then fileDelete takes it.
Not followed: the file’s address pasted into a page’s, an article’s or a product’s text, a theme setting, a custom field naming the file, an article’s image. Nothing records those, so a file used by none of these may still be shown somewhere.
createdAt
Section titled “createdAt”DateTime!
No description.
FileCreateInput
Section titled “FileCreateInput”A staged upload to make a library file of.
stagedUploadId
Section titled “stagedUploadId”ID!
The reservation the bytes were put to.
String
What to call it. Unset takes the filename it was staged with. At most 255
characters, or MAX_LENGTH.
String
What it shows, for somebody who cannot see it. At most 512 characters.
FileCreatePayload
Section titled “FileCreatePayload”What fileCreate returns.
[File!]!
The files made, in the order their uploads were given.
userErrors
Section titled “userErrors”[UserError!]!
Why an upload was not made a file, each pointed at its position in input.
FileDeletePayload
Section titled “FileDeletePayload”What fileDelete returns.
deletedFileId
Section titled “deletedFileId”ID
No description.
userErrors
Section titled “userErrors”[UserError!]!
No description.
FileFilter
Section titled “FileFilter”Which files a list returns.
[FileKind!]
Files of these kinds. Unset is every kind; an empty list is none.
FileKind
Section titled “FileKind”What a file is, by the content type it was uploaded as.
| Value | Meaning |
|---|---|
IMAGE | A picture: image/*. |
VIDEO | A video: video/*. |
DOCUMENT | A document — a PDF, a spreadsheet, text: application/* and text/*. |
FilePayload
Section titled “FilePayload”What fileUpdate returns.
File
No description.
userErrors
Section titled “userErrors”[UserError!]!
No description.
FileUpdateInput
Section titled “FileUpdateInput”What to change about a file. Unset or null leaves a field as it is.
String
A new name. Empty clears it. At most 255 characters, or MAX_LENGTH.
String
A new description. Empty clears it. At most 512 characters.
FileUse
Section titled “FileUse”One thing that uses a file.
FileUseKind!
No description.
product
Section titled “product”Product
The product whose gallery holds the file, for PRODUCT_MEDIA.
Post
The post that shows the file, for POST.
FileUseKind
Section titled “FileUseKind”What uses a file.
| Value | Meaning |
|---|---|
PRODUCT_MEDIA | A photo in a product’s gallery. |
POST | A photo in a post. |
SHOP_BRAND | The shop’s logo, square logo, favicon or cover image. |
HTML sanitized by the platform: a closed tag set, no scripts, no handlers.
Handle
Section titled “Handle”A URL-safe identifier a merchant chooses and can change.
HasMetafields
Section titled “HasMetafields”An object that can carry custom data.
metafield
Section titled “metafield”Metafield
No description.
| Argument | Type | Meaning |
|---|---|---|
namespace | String | No description. |
key | String! | No description. |
metafields
Section titled “metafields”[Metafield]!
Positional: one entry per identifier, null where there is nothing.
| Argument | Type | Meaning |
|---|---|---|
identifiers | [MetafieldIdentifier!]! | No description. |
An image the platform holds, with transformation at read time.
ID!
No description.
String
No description.
mediaContentType
Section titled “mediaContentType”MediaContentType!
No description.
position
Section titled “position”Int!
No description.
previewImage
Section titled “previewImage”Image
No description.
status
Section titled “status”MediaStatus!
No description.
errorMessage
Section titled “errorMessage”String
No description.
URL!
A URL for the image, transformed as asked. Applied by the CDN and cached.
| Argument | Type | Meaning |
|---|---|---|
transform | ImageTransform | No description. |
Int
No description.
height
Section titled “height”Int
No description.
thumbhash
Section titled “thumbhash”String
A thumbhash: thirty bytes that decode to a blurred stand-in.
dominantColor
Section titled “dominantColor”String
The image’s dominant colour as #rrggbb, for a placeholder background.
ImageCropRegion
Section titled “ImageCropRegion”Which part of an image survives a crop.
| Value | Meaning |
|---|---|
CENTER | No description. |
TOP | No description. |
BOTTOM | No description. |
LEFT | No description. |
RIGHT | No description. |
ImageFormat
Section titled “ImageFormat”An encoding an image can be served as.
| Value | Meaning |
|---|---|
WEBP | No description. |
AVIF | No description. |
JPG | No description. |
PNG | No description. |
ImageTransform
Section titled “ImageTransform”How to transform an image before serving it.
maxWidth
Section titled “maxWidth”Int
No description.
maxHeight
Section titled “maxHeight”Int
No description.
ImageCropRegion
No description.
Int
No description.
format
Section titled “format”ImageFormat
No description.
quality
Section titled “quality”Int
No description.
ScalarAn arbitrary JSON value, used only where the members depend on runtime data.
ObjectLong-running work the platform is doing on the merchant’s behalf.
ID!
No description.
JobKind!
No description.
status
Section titled “status”JobStatus!
No description.
progress
Section titled “progress”Int
0–100 where the work can be counted, null where it cannot.
processedCount
Section titled “processedCount”Int!
Rows, products, or invoices processed so far.
totalCount
Section titled “totalCount”Int
The total, once known. Null while the input is still being read.
requiredScope
Section titled “requiredScope”AccessScope
What the caller must hold to download this job’s result.
Derived from kind, and the reason Query.jobs can be unscoped without
leaking: a CUSTOMER_IMPORT names READ_CUSTOMERS, an ORDER_EXPORT
names READ_ORDERS. Null for a job whose output discloses nothing —
MEDIA_PROCESSING.
Surfaced rather than left implicit because the check is dynamic and a static
@scope on resultUrl cannot express it. A rule the schema states can be
tested against; one it only implies gets built on a guess.
resultUrl
Section titled “resultUrl”URL
Where to download the result — an export, or an import’s per-row error report.
Short-lived. Null until status is COMPLETED, and null for jobs that
produce nothing to download.
Also null when the caller does not hold requiredScope. The file is the
data: an order export read by a token holding no scopes is every buyer’s name,
address and telephone number leaving through a URL. The job’s own row remains
readable — progress and status disclose nothing — so an app can watch work it
started finish without being able to read what it produced.
errors
Section titled “errors”[JobError!]!
Row-level failures, capped. A partially successful import is the normal case, not an exception: one bad price in a thousand-row spreadsheet should not reject the spreadsheet.
nextPollAfterSeconds
Section titled “nextPollAfterSeconds”Int
How long to wait before asking again, in seconds.
Null once the job is finished. A client polling a ten-minute import every
second is a client the cost budget will stop, and this is how it learns to
wait instead — the same job an HTTP Retry-After would have done.
createdAt
Section titled “createdAt”DateTime!
No description.
startedAt
Section titled “startedAt”DateTime
No description.
completedAt
Section titled “completedAt”DateTime
No description.
JobError
Section titled “JobError”One row that could not be processed.
Int
Row number in the source, when the source has rows.
reference
Section titled “reference”String
The identifier the row named, for finding it in the merchant’s own file.
UserErrorCode!
No description.
[String!]
No description.
params
Section titled “params”JSON
No description.
message
Section titled “message”String!
No description.
JobKind
Section titled “JobKind”What a job is doing.
| Value | Meaning |
|---|---|
PRODUCT_IMPORT | No description. |
PRODUCT_EXPORT | No description. |
INVENTORY_IMPORT | No description. |
CUSTOMER_IMPORT | No description. |
ORDER_EXPORT | No description. |
PRICE_UPDATE | No description. |
FEED_GENERATION | No description. |
MOADIAN_SUBMISSION | No description. |
MEDIA_PROCESSING | No description. |
REPORT_EXPORT | A report written to a file by reportExportStart: every row of its whole period. Its file needs READ_ANALYTICS. |
REPORT_SEND | A saved report sent now by savedReportSendNow, to its own recipients. It produces no file: resultUrl is always null. |
JobStatus
Section titled “JobStatus”Where a job has got to.
| Value | Meaning |
|---|---|
QUEUED | No description. |
RUNNING | No description. |
COMPLETED | Finished. errors may still be non-empty — see JobError. |
FAILED | Could not run at all. Nothing was applied. |
CANCELLED | No description. |
LengthUnit
Section titled “LengthUnit”Units a dimension can be given in.
| Value | Meaning |
|---|---|
MILLIMETER | No description. |
CENTIMETER | No description. |
METER | No description. |
Locale
Section titled “Locale”A BCP 47 language tag.
InterfaceAnything that can appear in a product gallery.
The same interface the Storefront API declares, so an app moving between the two
does not meet two different models of one idea. What this one adds is
status and errorMessage: the storefront only ever serves media that is
ready, and an admin has to render the minute before that.
ID!
No description.
String
Alternative text. Persian, and the merchant’s own.
mediaContentType
Section titled “mediaContentType”MediaContentType!
What kind of media this is, so a gallery can branch before selecting.
position
Section titled “position”Int!
Order within its product’s gallery.
previewImage
Section titled “previewImage”Image
A still to show before the media itself loads or plays.
status
Section titled “status”MediaStatus!
Where processing has got to.
An upload is usable at READY. An admin that renders a PROCESSING item as
broken is an admin that flickers on every save.
errorMessage
Section titled “errorMessage”String
Why processing failed, when it did.
MediaContentType
Section titled “MediaContentType”What kind of media an object is.
| Value | Meaning |
|---|---|
IMAGE | No description. |
VIDEO | No description. |
EXTERNAL_VIDEO | No description. |
MODEL_3D | No description. |
MediaStatus
Section titled “MediaStatus”Where media processing has got to.
| Value | Meaning |
|---|---|
UPLOADING | No description. |
PROCESSING | No description. |
READY | No description. |
FAILED | No description. |
Metafield
Section titled “Metafield”One value attached to one object.
ID!
No description.
namespace
Section titled “namespace”String!
No description.
String!
No description.
String!
No description.
String!
Always a string, encoded per type.
definition
Section titled “definition”MetafieldDefinition
No description.
reference
Section titled “reference”Node
The object a reference type points at, resolved. Null otherwise.
updatedAt
Section titled “updatedAt”DateTime!
No description.
MetafieldDefinition
Section titled “MetafieldDefinition”The shape of a metafield, and who may see it.
ID!
No description.
namespace
Section titled “namespace”String!
The owning app’s handle, or custom for the merchant’s own.
String!
No description.
String!
What the merchant sees in the admin.
description
Section titled “description”String
No description.
ownerType
Section titled “ownerType”MetafieldOwnerType!
No description.
String!
single_line_text_field, number_integer, json, product_reference,
list.product_reference, and the rest. Fixed once created: changing it would
reinterpret every value already stored.
validations
Section titled “validations”JSON
Validation applied on write, keyed by rule — {"max": 100}.
storefrontVisible
Section titled “storefrontVisible”Boolean!
Whether the storefront APIs may read values of this definition.
False by default. Turning it on publishes every value already written under it, so it is an act with a blast radius rather than a setting.
valueCount
Section titled “valueCount”Int!
How many values exist. Worth knowing before deleting the definition.
createdAt
Section titled “createdAt”DateTime!
No description.
updatedAt
Section titled “updatedAt”DateTime!
No description.
MetafieldDefinitionInput
Section titled “MetafieldDefinitionInput”A metafield definition as supplied.
namespace
Section titled “namespace”String
No description.
String!
No description.
String!
No description.
description
Section titled “description”String
No description.
ownerType
Section titled “ownerType”MetafieldOwnerType!
No description.
String!
No description.
validations
Section titled “validations”JSON
No description.
storefrontVisible
Section titled “storefrontVisible”Boolean
No description.
MetafieldIdentifier
Section titled “MetafieldIdentifier”Names one metafield.
namespace
Section titled “namespace”String
No description.
String!
No description.
MetafieldInput
Section titled “MetafieldInput”A metafield value as supplied. Setting value to null deletes it.
namespace
Section titled “namespace”String
No description.
String!
No description.
String
No description.
String
No description.
MetafieldOwnerType
Section titled “MetafieldOwnerType”What kind of object a metafield can hang on.
| Value | Meaning |
|---|---|
PRODUCT | No description. |
PRODUCT_VARIANT | No description. |
COLLECTION | No description. |
CUSTOMER | No description. |
ORDER | No description. |
DRAFT_ORDER | No description. |
LOCATION | No description. |
SHOP | No description. |
PAGE | No description. |
ARTICLE | No description. |
BLOG | No description. |
Model3d
Section titled “Model3d”A 3D model shown in a viewer.
ID!
No description.
String
No description.
mediaContentType
Section titled “mediaContentType”MediaContentType!
No description.
position
Section titled “position”Int!
No description.
previewImage
Section titled “previewImage”Image
No description.
status
Section titled “status”MediaStatus!
No description.
errorMessage
Section titled “errorMessage”String
No description.
sources
Section titled “sources”[Model3dSource!]!
No description.
Model3dSource
Section titled “Model3dSource”One encoding of a 3D model.
URL!
No description.
mimeType
Section titled “mimeType”String!
No description.
format
Section titled “format”String!
No description.
filesize
Section titled “filesize”Int!
No description.
ObjectAn amount in a currency. Canonical unit is the rial; the toman is display.
amount
Section titled “amount”Decimal!
No description.
currencyCode
Section titled “currencyCode”CurrencyCode!
No description.
MoneyInput
Section titled “MoneyInput”An amount as supplied. The currency is the shop’s and is not accepted here.
amount
Section titled “amount”Decimal!
No description.
MoneyRange
Section titled “MoneyRange”A span of amounts. min and max are equal when they are.
Money!
No description.
Money!
No description.
InterfaceAn object with a globally unique, opaque id.
ID!
No description.
PageInfo
Section titled “PageInfo”Where one page sits in a collection. Cursor-based, never offset-based.
hasNextPage
Section titled “hasNextPage”Boolean!
No description.
hasPreviousPage
Section titled “hasPreviousPage”Boolean!
No description.
startCursor
Section titled “startCursor”String
No description.
endCursor
Section titled “endCursor”String
No description.
StagedUpload
Section titled “StagedUpload”A reserved slot awaiting its bytes.
ID!
Echo this back to whatever mutation attaches the file.
URL!
PUT the bytes here. Presigned and short-lived.
method
Section titled “method”String!
The method to use. PUT.
headers
Section titled “headers”[Attribute!]!
Any headers the store requires on the PUT.
expiresAt
Section titled “expiresAt”DateTime!
No description.
StagedUploadInput
Section titled “StagedUploadInput”What a client wants to upload.
filename
Section titled “filename”String!
What the file is called. It becomes the file’s name when nothing names it
otherwise. At most 255 characters, or MAX_LENGTH.
contentType
Section titled “contentType”String!
No description.
Int!
Bytes. Checked against the plan’s storage before a slot is reserved:
NOT_ENTITLED with params.meter storage_bytes when it would not fit.
checksum
Section titled “checksum”String
Optional SHA-256, hex. Recorded with the file when supplied.
ScalarAn absolute URL, including scheme.
UserError
Section titled “UserError”One reason a mutation declined.
Same taxonomy as every Kaladan surface: code and params are the contract,
message is English for a developer reading logs. An admin UI renders from the
code; it does not print the message.
UserErrorCode!
No description.
[String!]
The path to the offending value, as input-field segments.
params
Section titled “params”JSON
The arguments of the rule that failed, keyed by constraint name.
message
Section titled “message”String!
English, for the developer. Never shown to a merchant, never parsed.
UserErrorCode
Section titled “UserErrorCode”The failure catalogue.
One catalogue across Kaladan; this enum lists what this surface can return. The last five appear only here, because only here is there a merchant’s own state to be wrong about.
| Value | Meaning |
|---|---|
REQUIRED | No description. |
MIN_LENGTH | No description. |
MAX_LENGTH | No description. |
PATTERN | No description. |
OUT_OF_RANGE | No description. |
ENUM | No description. |
LIST_SIZE | No description. |
INVALID | No description. |
INCONSISTENT | No description. |
NOT_FOUND | No description. |
FORBIDDEN | No description. |
EXPIRED | No description. |
INVALID_STATE | No description. |
RATE_LIMITED | No description. |
IDEMPOTENCY_CONFLICT | No description. |
INSUFFICIENT_STOCK | Requested quantity exceeds what is on hand. params.requested and params.available carry the numbers, so a client can offer what is left rather than a dead end. The same code, with the same params, as the Storefront API returns at the cart. |
CONFLICT | ifVersion did not match. Somebody else changed the resource since you read it. Re-read, show the merchant what differs, and let them decide. |
TAKEN | The value is already taken by another resource — a handle, an SKU, a domain. params.conflictingId names it where naming it is safe. |
NOT_ENTITLED | Allowed by the schema, refused by the plan. params.capability says which entitlement is missing, so the UI can offer an upgrade rather than an error. A plan limit reached carries params.meter — products, staff_seats, sales_channels, storage_bytes — with params.limit, what the plan allows, and params.used, what the shop holds now, counted exactly by whatever refused. For a count, used is at least limit, and above it for a shop holding more than its plan allows — an override that raised a limit ran out, say: it keeps everything it has and cannot add more until it is under the limit again. Storage is bytes, and adds params.requested, the size asked for: used + requested exceeds limit, and used alone may not — a file can be too big for what is left. There used counts uploads in flight too. Nothing existing is ever touched. Offer the upgrade; the same numbers are on ShopSubscription.usage. |
IN_USE | The resource cannot be deleted while something depends on it. params.dependents counts them. fileDelete names them as well, in params.usedBy: the global id of each product and post that uses the file, and the shop’s for its brand. |
SCOPE_ESCALATION | The caller tried to hand out an access broader than their own — inviting a staff member to, or changing a role toward, scopes the actor does not hold. params.scopes names the excess, so the UI can say which grant to drop rather than refusing the whole form. |
Version
Section titled “Version”An opaque token proving what a resource looked like when it was read.
Send it back on an update to get optimistic concurrency; see @scope’s
neighbours below and ConflictError.
Versioned
Section titled “Versioned”An object whose changes can be guarded against a concurrent write.
Two staff members editing one product is ordinary, and GraphQL has no
If-Match. So the resource carries a version, and an update may pass it back
as ifVersion. A stale one is a CONFLICT user error rather than a silent
overwrite of somebody’s work.
Passing ifVersion is optional. Omitting it means last-write-wins, which is the
right answer for a background job reconciling stock and the wrong answer for a
person typing into a form.
version
Section titled “version”Version!
Changes on every write. Opaque — do not parse, compare, or order it.
ObjectA video hosted by the platform.
ID!
No description.
String
No description.
mediaContentType
Section titled “mediaContentType”MediaContentType!
No description.
position
Section titled “position”Int!
No description.
previewImage
Section titled “previewImage”Image
No description.
status
Section titled “status”MediaStatus!
No description.
errorMessage
Section titled “errorMessage”String
No description.
sources
Section titled “sources”[VideoSource!]!
One entry per encoding and resolution produced.
durationMs
Section titled “durationMs”Int
Duration in milliseconds, or null while still processing.
VideoSource
Section titled “VideoSource”One encoding of a video.
URL!
No description.
mimeType
Section titled “mimeType”String!
No description.
format
Section titled “format”String!
No description.
Int!
No description.
height
Section titled “height”Int!
No description.
Weight
Section titled “Weight”A weight, with the unit it was measured in.
Float!
No description.
WeightUnit!
No description.
WeightInput
Section titled “WeightInput”A weight as supplied.
Float!
No description.
WeightUnit!
No description.
WeightUnit
Section titled “WeightUnit”Units a weight can be given in.
| Value | Meaning |
|---|---|
GRAM | No description. |
KILOGRAM | No description. |