Skip to content
Select theme
Light
Dark
Auto
Select language
English
فارسی

Common

Object

A key/value pair a client attaches to a cart, a line, or an order.

String!

The name the client chose. Not namespaced and not validated.

String

What it was set to. Null where the client sent none.

Input

A key/value pair a client attaches to a cart, a line, or an order.

String!

The name to store it under.

String

What to store. Null removes the attribute.

Object

Something the platform changed on the buyer’s behalf, without failing.

Distinct from a UserError: the mutation succeeded and the payload is the new truth. A quantity was trimmed to available stock, a line was dropped because its variant was unpublished, a discount stopped applying when the cart shrank. A theme that ignores these shows a buyer a cart they did not agree to.

CartWarningCode!

What was adjusted.

ID

The object that changed, when one is identifiable.

String!

English, for logs. Render from code.

Enum

What the platform adjusted.

ValueMeaning
QUANTITY_ADJUSTEDA line’s quantity was reduced to what is in stock.
MERCHANDISE_UNAVAILABLEA line was removed: its variant is no longer purchasable.
PRICE_CHANGEDA line’s price changed since it was added.
DISCOUNT_REMOVEDA discount stopped applying.
DELIVERY_OPTION_INVALIDATEDThe selected delivery option is no longer offered and the selection was cleared.
LINE_LIMIT_REACHEDThe cart holds more distinct lines than the platform will price; the newest were dropped.
Enum

The currencies a Kaladan shop can price in.

One, today. A shop selling to the diaspora needs a separate legal entity and separate payment rails — it is a different product, not another enum value, and adding one here without that in place would let a theme render a price nobody can pay.

ValueMeaning
IRRIranian rial.
Scalar

An instant, RFC 3339, always UTC, always with an offset of Z.

Never a Jalali date. The shop’s calendar is a presentation instruction (Shop.calendar), and converting to it is the client’s job at the moment of render. A Jalali string on the wire cannot be compared, sorted, or subtracted without parsing it back, and two clients would disagree about which day a timestamp near midnight falls on.

Scalar

An exact decimal number, carried as a string.

Money is never a float. 0.1 + 0.2 is not 0.3 in IEEE 754, and a rounding error in a total is a support ticket. Amounts arrive as "1250000" or "1250000.50" and should be read into a decimal type, never into a double.

Object

A physical size, for shipping rates and for display.

Float!

The longest side, in unit.

Float!

The second side, in unit.

Float!

The third side, in unit.

LengthUnit!

What the three numbers are in.

Object

A video hosted somewhere else and embedded — Aparat, YouTube.

ID!

A globally unique, opaque identifier. Never parse or construct one.

String

Persian alternative text for the video. Null when the merchant has not written any.

MediaContentType!

What kind of media this is, so a gallery can branch before selecting.

Image

A still to show before the video itself loads or plays.

URL!

The URL to embed in an iframe.

ExternalVideoHost!

Which service hosts it, so a theme can pick the right embed treatment.

Enum

Where an external video lives.

ValueMeaning
APARATIran’s own video platform, and the one that resolves during an international outage.
YOUTUBENo description.
VIMEONo description.
Scalar

HTML that has already been sanitized by the platform: a closed tag set, no scripts, no event handlers, no inline styles.

It is safe to inject directly. It is not safe to concatenate with anything else and re-sanitize — that is how a nested-quote bug becomes an XSS.

Scalar

A URL-safe identifier a merchant chooses and can change: pirahan-abi.

Lowercase, digits, and hyphens. Persian characters are transliterated on the way in, so پیراهن آبی becomes pirahan-abi. Because a merchant can change it, never store a handle as a foreign key — store the id.

Interface

An object that can carry custom data.

Metafield

One metafield, or null when it is unset or not published to the storefront.

The two are deliberately indistinguishable: telling a public caller that a private key exists is itself a disclosure.

ArgumentTypeMeaning
namespaceStringThe owning app, or custom for a merchant’s own. Defaults to custom.
keyString!The metafield’s key within its namespace.

[Metafield]!

Several metafields at once.

The result is positional: one entry per identifier, in the order asked, null where there is nothing to return. That is what lets a client zip the response against its request without matching on keys.

ArgumentTypeMeaning
identifiers[MetafieldIdentifier!]!The metafields to fetch. The result has one entry per identifier.
Object

A raster image held by the platform.

ID!

A globally unique, opaque identifier. Never parse or construct one.

String

Persian alternative text for the image. Null when the merchant has not written any.

MediaContentType!

What kind of media this is, so a gallery can branch before selecting.

Image

Null: an image is its own still. Present because every Media has one, so a gallery can read previewImage from any item and fall back to the item.

URL!

A URL for the image, transformed as asked.

The transform is applied by the CDN and the result is cached, so asking for the exact size you will render is cheaper than asking for the original and letting the browser scale it. Ask for WEBP or AVIF unless you have a reason not to.

ArgumentTypeMeaning
transformImageTransformNo description.

Int

Width of the untransformed image, in pixels.

Int

Height of the untransformed image, in pixels.

String

A thumbhash: about thirty bytes of base64 that decode to a blurred stand-in for the image.

Render it immediately, swap in the real image when it arrives. On a throttled connection this is the difference between a laid-out page and a column of grey rectangles.

String

The image’s dominant colour as #rrggbb, for a placeholder background.

Enum

Which part of an image survives a crop.

ValueMeaning
CENTERNo description.
TOPNo description.
BOTTOMNo description.
LEFTNo description.
RIGHTNo description.
Enum

An encoding an image can be served as.

ValueMeaning
WEBPNo description.
AVIFNo description.
JPGNo description.
PNGNo description.
Input

How to transform an image before serving it.

Int

Constrain the width, in pixels.

Int

Constrain the height, in pixels.

ImageCropRegion

How to reconcile the requested box with the image’s aspect ratio.

Int

Multiply the requested size for a high-density display. 1, 2, or 3.

ImageFormat

Encode as this format. Defaults to the best the requesting client accepts.

Int

Encoder quality, 1–100. Defaults to the platform’s own balance.

Scalar

An arbitrary JSON value.

Used only where the members genuinely depend on runtime data — a filter’s re-submittable input, a metafield’s parsed reference, generated structured data. It is never a way to avoid writing a schema: every field typed JSON here says in its own description exactly what it contains and who decides.

Enum

Units a dimension can be given in.

ValueMeaning
MILLIMETERNo description.
CENTIMETERNo description.
METERNo description.
Scalar

A BCP 47 language tag: fa-IR, en, ar.

The shop declares which it supports (Localization.availableLocales); a request picks one with @inContext.

Interface

Anything that can appear in a product gallery.

ID!

A globally unique, opaque identifier. Never parse or construct one.

String

Persian alternative text. Null when the merchant has not written any.

MediaContentType!

What kind of media this is, so a gallery can branch before selecting.

Image

A still to show before the media itself loads or plays.

Enum

What kind of media an object is.

ValueMeaning
IMAGENo description.
VIDEONo description.
EXTERNAL_VIDEONo description.
MODEL_3DNo description.
Object

A single piece of custom data attached to an object.

ID!

A globally unique, opaque identifier. Never parse or construct one.

String!

Who owns the key — an app’s handle, or custom for the merchant.

String!

The key within its namespace.

String!

The value’s type: single_line_text_field, number_integer, boolean, json, money, product_reference, list.product_reference, and so on.

Always read value through type. A metafield’s type is fixed by its definition and cannot change under a client without an API version change.

String!

The value, always as a string, encoded per type. A json metafield holds a serialized document; a number_integer holds "42".

One representation for every type keeps the field non-null and keeps clients from branching on which of a dozen typed members is populated.

Node

The object a reference type points at, already resolved — so a metafield holding a product does not cost a second round trip.

Null for every non-reference type.

NodeConnection!

The objects a list.*_reference points at. Empty for every other type.

ArgumentTypeMeaning
firstIntNo description.
afterStringNo description.

DateTime!

When the value last changed.

Input

Names one metafield.

String

The owning app or custom for a merchant’s own. Defaults to custom.

String!

The key within the namespace.

Object

A 3D model shown in a viewer.

ID!

A globally unique, opaque identifier. Never parse or construct one.

String

Persian alternative text for the model. Null when the merchant has not written any.

MediaContentType!

What kind of media this is, so a gallery can branch before selecting.

Image

A still to show before the model itself loads or plays.

[Model3dSource!]!

The model, in each format it is published in.

More than one because a viewer picks by what it supports — glb almost everywhere, usdz for iOS Quick Look.

Object

One encoding of a 3D model.

URL!

Where the file is.

String!

Its media type.

String!

The format — glb, usdz.

Int!

Bytes. Worth reading before loading one on a mobile connection.

Object

An amount in a currency.

Decimal!

The amount, in the currency’s canonical unit — rial for IRR, undivided.

Divide by Shop.moneyPresentation.divisor before display; do not hard-code ten. Read into a decimal type, never a float.

CurrencyCode!

The currency the amount is in.

Enum

The unit an amount is spoken in.

ValueMeaning
RIALRial — the settlement currency.
TOMANToman — ten rial. What almost every Iranian shop displays.
Object

How this shop’s amounts should be rendered.

Everything a formatter needs, so that a theme, an embedded buy button, and a native app all produce the same string without any of them knowing about Iran.

MoneyDisplayUnit!

The unit prices are spoken in.

Int!

What to divide a canonical amount by to reach unit: 1 for rial, 10 for toman.

Given as a number rather than implied by the enum so a client divides instead of branching, and so a future unit costs no client change.

Int!

Digits to show after the separator once divided. Zero, in practice.

PriceRounding!

How the platform rounds amounts it computes itself — shipping, a percentage discount, tax.

Stated so a theme showing a client-side estimate lands on the same figure the server will charge. Prices a merchant typed are not rounded; they are already what the merchant meant.

NumeralSystem!

Which digits to draw.

Object

A span of prices, for a product whose variants are not all priced alike.

min and max are equal when they are.

Money!

The cheapest.

Money!

The dearest.

Interface

An object with a globally unique, opaque id.

Ids are opaque: base64 of an internal reference, never a bare database key. Do not parse one, do not construct one, and do not assume two ids of the same type sort in creation order. Query.node re-fetches any of them, which is what makes a normalizing client cache possible.

ID!

A globally unique identifier.

Object

A page of nodes of mixed type, as returned by a reference list.

[NodeEdge!]!

Each Node with its cursor. Use this when you need to page.

[Node!]!

The Nodes themselves, unwrapped. Use this when you do not.

PageInfo!

Whether there is more, and the cursors to ask with.

Object

One node in a page, with its cursor.

String!

This position in the current ordering. Pass it as after or before.

Node!

The Node at this position.

Enum

Which digit glyphs to render.

ValueMeaning
PERSIANPersian: ۰۱۲۳۴۵۶۷۸۹.
LATINLatin: 0123456789.
Object

Where one page sits in a collection.

Cursor-based, never offset-based. An offset shifts under you the moment anything is inserted, so page 2 of a catalogue re-sorted by a merchant silently skips products. A cursor addresses a position in a specific ordering.

Boolean!

Whether another page exists after endCursor.

Boolean!

Whether another page exists before startCursor.

String

Cursor of the first edge, or null when the page is empty.

String

Cursor of the last edge, or null when the page is empty.

Object

How the platform rounds an amount it computed.

Decimal!

The step to round to, in the canonical unit. 10000 rounds to the nearest thousand toman.

PriceRoundingMode!

Which way, at the halfway point and otherwise.

Enum

Which way an amount is rounded.

ValueMeaning
NEARESTTo the nearer step; exactly halfway goes up.
UPAlways up, away from zero.
DOWNAlways down, toward zero.
Object

What a page tells a crawler about itself.

Worth more here than it would be elsewhere: Torob and Emalls are primary discovery channels rather than a long tail, they crawl rather than integrate, and the Phase-2 product-discovery engine reads the same markup. Structured data is generated by the platform so that every theme emits the same correct shape.

String

Title tag. Falls back to the resource’s own title when the merchant left it blank.

String

Meta description. Falls back to a trimmed summary of the body.

URL

The canonical URL for this resource on this shop’s primary domain.

Image

An image for Open Graph and Twitter cards.

Boolean!

Whether the merchant has asked crawlers to skip this page.

JSON!

schema.org JSON-LD for this resource, ready to serialize into a <script type="application/ld+json"> tag without modification.

Generated by the platform from the same data the page renders, so it cannot drift from it. A theme that composes its own is free to, but it will be the one that breaks when Torob changes what it expects.

Scalar

An absolute URL, including scheme.

Object

One reason a mutation declined.

code and params are the contract. message is not: it is English, written for whoever is reading a log, and a client that shows it to a buyer has shipped an English string into a Persian checkout. Map code to your own template and interpolate params — "حداکثر ۸۰ نویسه" from MAX_LENGTH and {"maxLength": 80}.

This is the same taxonomy the REST surfaces use in an RFC 7807 Violation, so a code means the same thing wherever it appears.

UserErrorCode!

The rule that failed.

Every mutation documents which codes it can return; treat an unrecognized one as a generic failure and fall back to a neutral message rather than crashing. A new code is added in a new API version.

[String!]

The path to the offending value, as input-field segments from the mutation’s arguments: ["lines", "0", "quantity"].

The same address a REST response writes as the JSON Pointer #/lines/0/quantity. Null when the failure is about the operation as a whole rather than one value.

JSON

The arguments of the rule that failed, keyed by constraint name, and null for rules that take none: {"maxLength": 80}, {"enum": ["RIAL", "TOMAN"]}, {"available": 3}.

They live here rather than beside code so a generic renderer never has to know which members are metadata and which are arguments.

String!

English, for the developer reading logs. Never a contract, never parsed, and never shown to a buyer.

Enum

The failure catalogue.

One catalogue across every Kaladan surface — a code means the same thing in the Admin API and in an RFC 7807 Violation as it does here. Each surface’s enum lists only the codes that surface can actually return, so a generated client gets a precise switch rather than a union of everything the platform can fail at; a code never means two different things in two places.

Split in two: rules about the shape of a value, which any field can break, and rules about the state of the shop, which only certain operations can.

ValueMeaning
REQUIREDA required value was absent.
MIN_LENGTHA string was shorter than params.minLength.
MAX_LENGTHA string was longer than params.maxLength.
PATTERNA string did not match params.pattern.
OUT_OF_RANGEA value was outside params.minimum/params.maximum.
ENUMA value was not one of params.enum.
LIST_SIZEA list had fewer than params.minItems or more than params.maxItems.
INVALIDA value was syntactically wrong for its type — a malformed id, a bad phone number.
INCONSISTENTTwo values that must agree did not — a city outside its province.
NOT_FOUNDThe referenced object does not exist, or is not published to this shop’s storefront.
FORBIDDENThe object exists but this token may not read or change it.
EXPIREDThe cart, checkout handoff, or token has expired.
UNAVAILABLEThe merchandise cannot be sold right now: unpublished, or out of stock with no backorder.
INSUFFICIENT_STOCKLess stock is on hand than was asked for; params.available says how much.
CODE_INVALIDA discount or gift card code was not recognized, has lapsed, or is used up.
NOT_APPLICABLEA discount is real but this cart does not qualify.
INVALID_STATEThe operation cannot run in the cart’s current state — selecting delivery before an address.
IDEMPOTENCY_CONFLICTThe same idempotency key was replayed with different arguments.
RATE_LIMITEDToo many attempts in too short a window — an OTP, a review, a discount code.
Object

A video hosted by the platform.

ID!

A globally unique, opaque identifier. Never parse or construct one.

String

Persian alternative text for the video. Null when the merchant has not written any.

MediaContentType!

What kind of media this is, so a gallery can branch before selecting.

Image

A still to show before the video itself loads or plays.

[VideoSource!]!

One entry per encoding and resolution offered.

Int

Duration in milliseconds, or null while the video is still being processed.

Object

One encoding of a video.

URL!

Where the file is.

String!

Its media type, for a <source type> attribute.

String!

The container — mp4, webm.

Int!

Frame width in pixels.

Int!

Frame height in pixels.

Object

A weight, with the unit it was measured in.

Float!

The number, in unit.

WeightUnit!

What the number is in.

Enum

Units a weight can be given in.

ValueMeaning
GRAMNo description.
KILOGRAMNo description.