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

Orders

Enum

How an order reaches the buyer.

ValueMeaning
SHIPPINGNo description.
PICKUPNo description.
LOCAL_DELIVERYNo description.
NONENo description.
Object

How much of a discount landed on one line.

Money!

No description.

Int!

Which application it came from, by index into Order.discountApplications.

Object

One discount that applied to an order.

DiscountApplicationKind!

What triggered it.

String

The code the buyer typed, or null when it applied automatically.

String

The merchant’s name for it.

Money!

How much came off in total.

DiscountTargetType!

No description.

Enum

What triggered a discount.

ValueMeaning
CODEA code the buyer entered.
AUTOMATICA rule that applied on its own.
MANUALA staff member discounted it by hand, on a draft order.
Enum

What a discount reduced.

ValueMeaning
LINE_ITEMNo description.
ORDERNo description.
SHIPPINGNo description.
Object

An official invoice — فاکتور رسمی.

String

شماره منحصر به فرد مالیاتی, assigned at submission.

OfficialInvoiceStatus!

No description.

DateTime

No description.

URL

A short-lived link to this filing’s PDF, when its current version is drawn and this filing is the one the order’s PDF is drawn from. Null otherwise: asking for it draws nothing. Order.invoiceDocument draws it, says why there is none, and is behind READ_ORDERS rather than READ_TAX.

String

The tax system’s own code and message. Actionable only by the merchant.

MoadianInvoice

The filing record, with every submission attempt.

Plural attempts because rejection is normal: a mistyped identifier produces one, the merchant corrects it, and a second submission goes out.

Enum

Where an official invoice’s submission has got to.

ValueMeaning
DRAFTNo description.
QUEUEDNo description.
SUBMITTEDNo description.
ACCEPTEDNo description.
REJECTEDNo description.
CANCELLEDNo description.
Object

A placed order.

ID!

No description.

Version!

No description.

String!

The merchant-facing number — شماره سفارش. A string; merchants prefix them.

DateTime!

No description.

OrderFinancialStatus!

No description.

OrderFulfillmentStatus!

No description.

OrderStatus!

No description.

OrderLineConnection!

No description.

ArgumentTypeMeaning
firstIntNo description.
afterStringNo description.

Int!

Units across every line, for a list row that does not page them.

OrderCost!

No description.

Customer

Who bought it. Null for an order placed by a guest.

Company

The company it was bought for — a buyer ordering on a company’s account at checkout, or a draft quoted for one. Null for an order bought for nobody but the buyer, and for a company the shop no longer holds. What the company owes across such orders is Company.outstandingBalance.

OrderBuyer!

Who placed it, from the order itself rather than from any account.

Kept separately because a guest order has no customer, and because a customer who later changes their name does not rewrite what was on the parcel.

Address

Where it went. Null for an order that ships nothing.

[OrderPayment!]!

How it was paid, one entry per movement of money.

A list because an order can be part-paid: a deposit online and the rest on delivery, or two card-to-card transfers because a daily limit got in the way.

PaymentLink

The newest link to pay what this order owes after an edit, whatever became of it — status says. Null when it never had one. Minted by orderEditCommit and orderPaymentLinkSend.

OrderTextCheck

Whether Kaladan’s text with a new balance link could go now, as DraftOrder.paymentLinkTextCheck reads it for a draft: what the send dialog reads before the merchant presses send. Sends nothing and charges nothing. Null when the messaging service does not answer.

[FulfillmentOrder!]!

The work of fulfilling, split by location: one FulfillmentOrder for each location the lines resolve to.

[Fulfillment!]!

Parcels actually sent.

[Return!]!

Goods coming back. The money side of a return is a separate refund, made with refundCreate.

[TaxLine!]!

Tax charged, broken out by rate so a report can group it.

[DiscountApplication!]!

Every discount that applied, and what triggered it.

OfficialInvoice

The official invoice, when one was requested — فاکتور رسمی.

Requested at checkout and carried here. Filing it with سامانه مودیان is a separate operation, moadianInvoiceSubmit; this is where a merchant sees that it is owed.

PrintedDocument

The order’s invoice as a PDF — the فاکتور the merchant hands the buyer, and the one the buyer downloads from their account.

Drawn from the filing, type 1 or type 2 as it is filed: the seller by its name and economic code, the buyer a type 1 names by its identifier, the lines and totals in the shop’s money unit, dated in its calendar. A test order has none (UNAVAILABLE, TEST_ORDER).

Drawn once per version, on request. draw: true draws the filing’s current version when it has no PDF yet — a correction, an accepted filing’s tax id or a sale edited and built again is a new version — and every other read only says where it stands. Ask for url with draw: true when the merchant presses download, not when the page opens: the link is minted on each read and lives minutes.

Null when the tax service does not answer.

ArgumentTypeMeaning
drawBoolean! · default falseNo description.

DeliveryMethodType!

No description.

String

The delivery option’s name, as the buyer saw it at checkout.

SalesChannel!

Where the order came from.

Attribution matters more here than it would elsewhere: a merchant spending on Torob clicks and running an Instagram account needs to know which produced the order, and neither platform will tell them.

OrderAttribution

A freer attribution than channel — a UTM campaign, an Instagram post id, the staff member who took a phone order.

OrderRisk!

How likely this is to be trouble, and why.

StaffMember

The staff member working it. Null when nobody has claimed it.

[String!]!

Merchant-applied tags. The main way a shop organizes its own queue.

String

The buyer’s note from checkout.

String

The merchant’s own note. Never shown to the buyer.

Separate from note because staff write things here that a buyer must not read — “مشتری بدقول، فقط پیش‌پرداخت”.

[Attribute!]!

Key/value data carried over from the cart, and whatever apps added.

OrderEventConnection!

Everything that has happened to this order, newest first.

ArgumentTypeMeaning
firstIntNo description.
afterStringNo description.

Boolean!

Whether this was placed in test mode.

Test orders are real rows that must never reach a report, a payout, or a tax filing. Modelled rather than deleted, because a merchant testing their shop should be able to see what they did.

DateTime

No description.

OrderCancelReason

No description.

DateTime

No description.

DateTime!

No description.

DateTime!

No description.

Metafield

No description.

ArgumentTypeMeaning
namespaceStringNo description.
keyString!No description.

[Metafield]!

No description.

ArgumentTypeMeaning
identifiers[MetafieldIdentifier!]!No description.
Object

Totals across a filtered order set.

Money!

No description.

Money!

No description.

Int!

No description.

Object

Where an order came from, beyond its channel.

String

A UTM campaign, or a Torob click id.

String

No description.

String

No description.

String

The referring URL, when there was one.

String

The Instagram post or story an order was traced to.

StaffMember

The staff member who took a phone or DM order.

Object

Who placed an order, as recorded on the order itself.

String!

No description.

String

No description.

String

No description.

Input

Why an order is being cancelled, and what to do about the consequences.

OrderCancelReason!

No description.

String

The merchant’s own explanation, kept on the order and in the audit log.

Boolean

Whether to return the goods to stock.

Defaults true, which is right when nothing shipped. A cancellation after dispatch should usually be false, and the goods handled as a return.

Boolean

Whether to notify the buyer by SMS.

Defaults true. A merchant cancelling a whole batch of fraudulent orders sets it false so the abuser is not told which ones were caught.

Enum

Why an order was cancelled.

ValueMeaning
CUSTOMERNo description.
INVENTORYNo description.
PAYMENT_FAILEDNo description.
FRAUDNo description.
DELIVERY_REFUSEDThe buyer refused the parcel on delivery — عدم تحویل. Its own reason rather than CUSTOMER, because refusing a cash-on-delivery parcel costs the merchant the outbound freight and is the single most common abuse in this market. It has to be countable.
OTHERNo description.
Object

A page of orders.

[OrderEdge!]!

No description.

[Order!]!

No description.

PageInfo!

No description.

Int

How many match across every page. Counted for orders, over the whole filter up to 10000, and a client showing it says “10000 or more”; null for a customer’s orders, which are listed from the buyer’s own history and not counted there — CustomerStatistics.orderCount is the buyer’s figure — unless this page is the whole result.

OrderAggregate!

What the orders in this filter add up to, across every page.

On the connection because a merchant filtering to “unpaid, this month” wants the total without paging, and computing it client-side would be wrong the moment the result spans more than one page.

Object

What an order came to.

Money!

No description.

Money!

No description.

Money!

No description.

Money!

No description.

Money!

A cash-on-delivery charge, or a payer-borne gateway fee. Zero when absorbed.

Money!

No description.

Money!

How much has actually been received.

Money!

No description.

Money!

What is still owed.

Non-zero on a cash-on-delivery order until the courier hands the money over, and on a part-paid order until the rest arrives. The number a merchant chases.

Money

Cost of goods across the order, from each line’s snapshot.

Money

Revenue less cost of goods. Excludes shipping and tax.

Object

One order, with its cursor.

String!

No description.

Order!

No description.

Object

One thing that happened to an order.

ID!

No description.

String!

order.placed, payment.verified, fulfillment.created, note.added.

String!

Human-readable in the current locale, composed from the action and its data.

JSON

Whatever the event carries — a tracking number, an amount, a reason.

AuditActor!

No description.

DateTime!

No description.

Object

A page of order events.

[OrderEventEdge!]!

No description.

[OrderEvent!]!

No description.

PageInfo!

No description.

Object

One order event, with its cursor.

String!

No description.

OrderEvent!

No description.

Input

A filter on the order list.

[OrderFinancialStatus!]

No description.

[OrderFulfillmentStatus!]

No description.

[OrderStatus!]

No description.

[RiskLevel!]

No description.

ID

No description.

ID

No description.

ID

No description.

String

No description.

ID

No description.

ID

Orders bought for this company: what Company.outstandingBalance sums.

DateTime

No description.

DateTime

No description.

Boolean

Orders with money still owed. The queue a merchant works every morning.

Boolean

Orders whose payment is AUTHORIZED or UNRESOLVED — awaiting reconciliation.

Boolean

Orders with an unapproved card-to-card receipt.

Boolean

Orders that asked for an official invoice and have not had one filed.

Boolean

Test orders. Excluded unless asked for.

Enum

Where an order’s money stands.

ValueMeaning
PENDINGPlaced, nothing received — an unpaid gateway attempt, or cash on delivery.
AUTHORIZEDThe bank confirmed a hold; the platform has not yet verified with the gateway. Not a failure, and it can last: it is where an order sits when a callback was lost, until the reconciliation worker catches up. An admin that shows it as failed is how a merchant refunds a payment they never received.
PARTIALLY_PAIDNo description.
PAIDNo description.
PARTIALLY_REFUNDEDNo description.
REFUNDEDNo description.
FAILEDNo description.
VOIDEDNo description.
Enum

Where an order’s goods stand.

ValueMeaning
UNFULFILLEDNo description.
PARTIALLY_FULFILLEDNo description.
FULFILLEDNo description.
RESTOCKEDNo description.
Object

One line of a placed order.

ID!

No description.

ProductVariant

What was bought, if it still exists. Null once the merchant deletes it.

Which is why every field below duplicates it: an order must render years later, when the catalogue has moved on.

String!

The product’s title as it was when bought.

String

No description.

String

No description.

Image

No description.

Int!

No description.

Int!

How many have shipped.

Int!

How many are still to ship — quantity less fulfilled, refunded and cancelled.

Int!

No description.

Int!

How many the buyer has asked to send back.

Money!

No description.

Money!

No description.

Money!

No description.

Money

What the merchant paid for it, captured at the moment of sale.

A snapshot, not a lookup: cost changes, and a margin report on last year’s orders must use last year’s cost.

[TaxLine!]!

No description.

[DiscountAllocation!]!

No description.

Boolean!

Whether this line needs delivering at all.

[Attribute!]!

No description.

Object

A page of order lines.

[OrderLineEdge!]!

No description.

[OrderLine!]!

No description.

PageInfo!

No description.

Object

One order line, with its cursor.

String!

No description.

OrderLine!

No description.

Object

What the order mutations return.

Order

No description.

[UserError!]!

No description.

Object

One movement of money against an order.

ID!

No description.

PaymentMethodType!

No description.

String

The provider’s name — زرین‌پال, زیبال. Null for cash on delivery.

PaymentStatus!

No description.

Money!

No description.

String

The gateway’s reference number — شماره پیگیری.

String

The card network’s retrieval reference — شماره مرجع / RRN.

String

The paying card, masked. Never the full number.

DateTime

No description.

[PaymentReceipt!]!

Receipts uploaded for a manual transfer — رسید کارت به کارت.

More than one is ordinary: daily transfer limits mean a large order arrives as several transfers.

Transaction

The full record behind this payment — authority, verification attempts, splits.

This object is the fact, shaped exactly as the buyer sees it. That one is the record, and it is what somebody chasing a payment that went wrong needs.

Object

How likely an order is to be trouble.

Two risks matter here and they are not the same. Payment fraud is the international one. Delivery refusal is the Iranian one: a cash-on-delivery order placed with no intention of paying costs the merchant the outbound freight, and it is common enough that merchants keep their own lists.

RiskLevel!

No description.

[RiskReason!]!

One entry per signal that fired, with what it saw.

StaffMember

Whether a staff member has reviewed and cleared it. A cleared order stops appearing in the risk queue regardless of its level.

DateTime

No description.

Enum

How an order list is ordered.

ValueMeaning
PLACED_ATNo description.
UPDATED_ATNo description.
TOTALNo description.
NUMBERNo description.
RISKNo description.
Enum

Whether an order is still live.

ValueMeaning
OPENNo description.
CLOSEDNo description.
CANCELLEDNo description.
Input

Changes to an order’s own fields. Nothing here touches money or goods.

String

No description.

[String!]

No description.

ID

No description.

[MetafieldInput!]

No description.

String

The buyer’s contact details, when a staff member corrects a typo.

String

No description.

Enum

How a buyer paid.

ValueMeaning
ONLINE_GATEWAYNo description.
CASH_ON_DELIVERYNo description.
CARD_TO_CARDNo description.
WALLETNo description.
INSTALLMENTNo description.
Object

A receipt a buyer uploaded for a manual transfer.

The fact, as the buyer sees it. detail is the record: what the check found, who decided, and why.

ID!

No description.

Image

No description.

String

No description.

Money

What the buyer says they sent. Not what was credited — see detail.

DateTime

No description.

ReceiptStatus!

No description.

DateTime!

No description.

ManualReceipt

The full approval record — verification method, reviewer, rejection reason.

Separately scoped: an app that renders an order does not need to read who approved a transfer or how confident the match was.

Enum

Where a payment attempt got to.

ValueMeaning
INITIATEDNo description.
AUTHORIZEDNo description.
PAIDVerified with the gateway. The only status that means paid.
FAILEDNo description.
REFUNDEDNo description.
UNRESOLVEDMoney is believed to have moved and the gateway has not confirmed which way — تراکنش نامشخص. It lasts until the reconciliation worker resolves it.
Object

A document Kaladan draws from a record and keeps — an order’s invoice, a parcel’s packing slip — as a PDF.

Private, always. It holds a buyer’s name and address, and a type-1 invoice a company’s identifier, so it is never public: url is a link signed for minutes, minted on each read and only for a reader the field’s scope lets through. Drawn once per version, never per download: a second read of a drawn version reads the stored file.

PrintedDocumentStatus!

No description.

PrintedDocumentUnavailableReason

Why there is none. Set with UNAVAILABLE, and only then.

URL

A short-lived link to the PDF. Set with READY, and only then; it expires within minutes, so read it when it is about to be opened.

Enum

Where a printed document stands.

ValueMeaning
NOT_DRAWNThe current version has none yet. Read with draw: true, it is drawn.
DRAWINGBeing drawn. Read again in a few seconds; a second read draws nothing new.
READYDrawn and stored. url is set.
FAILEDDrawing it failed for good, and it is not drawn again for this version: a failure that could be retried was retried. A new version is drawn afresh.
UNAVAILABLEThere is nothing to draw. unavailableReason says why.
Enum

Why a printed document cannot be drawn.

ValueMeaning
TEST_ORDERA test order: no invoice is filed for one, and an invoice for a sale that did not happen is a document that must not exist.
SELLER_UNIDENTIFIEDThe shop’s business profile names no economic code — کد اقتصادی — which an invoice names its seller by. Recording one makes the invoice drawable.
NOT_ISSUEDNo invoice exists for the order yet: its placement has not reached the tax service, or it was cancelled before anything was filed.
NOT_BUILTThe invoice could not be built from the order yet: a service it is read from did not answer, or the order could not be read. Read again later.
CANCELLEDCancelled: the parcel, or every filing for the order.
Enum

Where a merchant’s review of a receipt stands.

ValueMeaning
PENDINGNo description.
APPROVEDNo description.
REJECTEDNo description.
Enum

How risky an order looks.

ValueMeaning
LOWNo description.
MEDIUMNo description.
HIGHNo description.
Object

One signal that fired on an order.

RiskReasonCode!

No description.

String

What the signal saw — a count, a distance, a previous order’s number.

Enum

What kind of signal fired.

ValueMeaning
PRIOR_DELIVERY_REFUSALThis buyer has refused cash-on-delivery parcels before.
HIGH_VALUE_FIRST_CODFirst order from this number, paid on delivery, above the usual value.
VELOCITYSeveral orders from one number in a short window.
ADDRESS_MISMATCHThe delivery address does not match the province the number is registered in.
RECEIPT_UNVERIFIEDThe card-to-card receipt could not be matched to a transfer.
AUTH_FAILURESThe buyer’s number has failed OTP repeatedly.
APP_FLAGGEDAn installed app raised it. detail carries the app’s own message.
Object

One rate’s worth of tax on an order or a line.

String!

What the merchant calls it — “مالیات بر ارزش افزوده”.

Float!

As a fraction: 0.09 for nine per cent.

Money!

No description.