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

Orders

Object

A delivery company.

String!

A stable code: IRAN_POST, TIPAX, CHAPAR, ALOPEYK, SNAPP_BOX.

String!

The carrier’s name in the current locale.

Image

The carrier’s mark.

Enum

How an order reached, or will reach, the buyer.

ValueMeaning
SHIPPINGNo description.
PICKUPNo description.
LOCAL_DELIVERYNo description.
NONENothing shipped — a digital product.
Object

When something should arrive.

Both bounds may be null when the carrier will not commit to an estimate, which several Iranian couriers will not.

DateTime

No description.

DateTime

No description.

Int

Business days, as the carrier states it.

Alongside the timestamps rather than derived from them: “۲ تا ۳ روز کاری” is what the carrier promised, and the timestamps are this platform’s reading of it against a holiday calendar.

Object

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

Issued through سامانه مودیان, which accepts submissions asynchronously and is queried for their fate separately. status is therefore a process to render, not a fact.

String

The invoice’s unique tax identifier — شماره منحصر به فرد مالیاتی.

OfficialInvoiceStatus!

Where the submission has got to.

DateTime

When it was issued.

URL

A PDF of the invoice, once there is one.

String

Why it was rejected, as the tax system’s own code and message.

A pass-through of somebody else’s error rather than this API’s taxonomy: it is actionable only by the merchant, and translating it would lose the code they will be asked to quote.

Enum

Where an official invoice’s submission has got to.

ValueMeaning
DRAFTRequested, not yet submitted.
QUEUEDWaiting to be sent.
SUBMITTEDSent; no verdict yet.
ACCEPTEDNo description.
REJECTEDRejected. rejectionReason says why.
CANCELLEDWithdrawn after acceptance.
Object

A placed order, as the buyer who placed it may see it.

Money is settled here in a way it is not in a cart: what was paid is recorded, not recomputed. A merchant changing a price afterwards does not move it.

ID!

No description.

String!

The merchant-facing order number — شماره سفارش.

A string, not an integer: merchants prefix them, and a leading zero that survives on a printed invoice must survive here.

DateTime!

When the order was placed.

OrderFinancialStatus!

Where the money stands.

OrderFulfillmentStatus!

Where the goods stand.

OrderStatus!

Open, or finished one way or another.

OrderLineConnection!

What was bought, at the prices actually charged.

ArgumentTypeMeaning
firstIntNo description.
afterStringNo description.

Int!

How many units the order holds, for a history row that does not page the lines to say “۳ کالا”.

OrderCost!

What it came to.

Address

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

[OrderPayment!]!

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

[Shipment!]!

Parcels sent so far. Empty until the merchant ships something.

OfficialInvoice

The official invoice, when one was requested. Null when it was not.

PrintedDocument

The order’s invoice as a PDF — the buyer’s فاکتور, and the only document a buyer is given for an order.

The same document the merchant downloads, drawn from the shop’s filing of the sale: type 1 naming the company or person it was bought for by their identifier, or type 2 naming nobody, in the shop’s money unit and calendar. A test order has none (UNAVAILABLE, TEST_ORDER), and neither does an order of a shop that has not recorded its economic code (SELLER_UNIDENTIFIED) — draw no button for either.

The signed-in buyer’s own orders only, as everything under customer: there is no way to reach another buyer’s order, so there is none to reach their invoice.

Drawn once, on request. Read status with the page, and read url with draw: true when the buyer presses download: that draws it the first time anybody asks, and the link is minted on each read and lives minutes.

Null when the tax service does not answer — the order still renders.

ArgumentTypeMeaning
drawBoolean! · default falseNo description.

DeliveryMethodType!

How it was delivered, or is going to be.

String

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

String

The note the buyer left at checkout.

[Attribute!]!

Key/value data carried over from the cart.

DateTime

When it was cancelled, or null.

OrderCancelReason

Why, when it was cancelled.

URL

Where to send the buyer to finish paying. What a «پرداخت مجدد» button opens.

Present while financialStatus is PENDING or PARTIALLY_PAID, and the merchant still accepts the order. It leads to hosted checkout, which owns the payment step here exactly as it does from a cart.

PARTIALLY_PAID is ordinary rather than exceptional: daily card-to-card transfer caps make paying a large order in two receipts routine, and the buyer who paid the first half needs a door back in for the second.

It collects cost.outstandingAmount, not the total.

URL!

A link to this order’s page on the storefront, carrying its own access token.

The same link that goes out by SMS. Useful for a buyer forwarding an order to whoever is receiving the parcel.

Metafield

Custom data an app attached to this order — an RMA reference, loyalty points earned, a gift message an app collected.

The same data the Storefront API exposes on the thank-you page, so an account page and a confirmation page render an app’s additions identically.

ArgumentTypeMeaning
namespaceStringNo description.
keyString!No description.

[Metafield]!

No description.

ArgumentTypeMeaning
identifiers[MetafieldIdentifier!]!No description.
Enum

Why an order was cancelled.

ValueMeaning
CUSTOMERThe buyer asked.
INVENTORYThe stock was not really there.
PAYMENT_FAILEDPayment never completed.
FRAUDJudged fraudulent.
DELIVERY_REFUSEDThe parcel was refused on delivery — عدم تحویل. Its own reason rather than CUSTOMER, because refusing a cash-on-delivery parcel costs the merchant the outbound freight and has to be countable.
OTHERNo description.
Object

A page of orders.

[OrderEdge!]!

No description.

[Order!]!

No description.

PageInfo!

No description.

Int!

No description.

Object

What an order came to.

Money!

Lines before discounts.

Money!

Everything taken off.

Money!

Delivery charged.

Money!

VAT charged — مالیات بر ارزش افزوده.

Money!

What the chosen payment method added — a cash-on-delivery charge, or a payer-borne gateway fee. Zero when the merchant absorbed it.

Money!

The total charged.

Money!

How much of it has actually been received.

Money!

How much has been given back.

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.

Object

One order, with its cursor.

String!

No description.

Order!

No description.

Enum

Where an order’s money stands.

ValueMeaning
PENDINGPlaced, nothing received — an unpaid gateway attempt, or cash on delivery.
AUTHORIZEDThe bank confirmed a hold but the platform has not yet verified with the gateway — پرداخت در انتظار تأیید. A real state, and one that can last: it is where an order sits when a callback was lost, until the reconciliation job catches up. Render it as “در حال بررسی پرداخت”. Rendering it as failed is how a buyer who already paid pays twice.
PARTIALLY_PAIDSome of the total is in.
PAIDAll of it is in.
PARTIALLY_REFUNDEDSome of it has gone back.
REFUNDEDAll of it has gone back.
FAILEDPayment was attempted and did not succeed.
VOIDEDWritten off without payment.
Enum

Where an order’s goods stand.

ValueMeaning
UNFULFILLEDNo description.
PARTIALLY_FULFILLEDNo description.
FULFILLEDNo description.
RESTOCKEDEverything shipped has been returned.
Object

One line of a placed order.

ID!

No description.

String!

The product’s title as it was when bought.

A snapshot, not a lookup. A merchant who renames or deletes a product does not rewrite the buyer’s history, and an order from two years ago must still render.

String

The variant’s title as it was when bought — آبی / XL.

String

The SKU as it was when bought.

Image

The image as it was when bought — a snapshot, like the title.

Handle

The product’s slug, for linking back to it — when it still exists.

Null for a product the merchant has deleted. Draw the row without a link rather than a link that 404s.

ID

The product’s current id, for a “buy it again” that adds to a cart through the Storefront API. Null when the product is gone.

ID

The variant’s current id. Null when the variant is gone.

Int!

How many were bought.

Int!

How many have shipped.

Int!

How many were refunded.

Money!

The unit price actually charged, before line discounts.

Money!

The unit price after discounts.

Money!

discountedUnitPrice × quantity.

[Attribute!]!

Line-level key/value data carried over from the cart.

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

One movement of money against an order.

PaymentMethodType!

How it was paid.

String

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

PaymentStatus!

Where this attempt got to.

Money!

How much moved.

String

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

What a buyer quotes to their bank and to support. Render it selectable; it is the single most-copied string in an order history.

String

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

What the bank’s own records key on, which is what makes it the one that settles an argument about whether a charge happened.

String

The paying card, masked as 6037-99**-****-1234. Never the full number.

DateTime

When the money moved.

[PaymentReceipt!]!

Receipts uploaded for a card-to-card payment — رسید کارت به کارت.

More than one is ordinary: daily transfer limits mean a large order is paid in several transfers, each awaiting the merchant’s approval. Empty for every other method.

Enum

How an order list is ordered.

ValueMeaning
PLACED_ATNo description.
TOTALNo description.
NUMBERNo description.
Enum

Whether an order is still live.

ValueMeaning
OPENNo description.
CLOSEDNo description.
CANCELLEDNo description.
Enum

How a buyer paid.

ValueMeaning
ONLINE_GATEWAYA Shaparak-connected gateway, reached by redirect — درگاه پرداخت.
CASH_ON_DELIVERYCash collected on delivery — پرداخت در محل.
CARD_TO_CARDA transfer to the merchant’s card or SHEBA, with a receipt — کارت به کارت.
WALLETStore credit or a gift card — کیف پول.
INSTALLMENTA buy-now-pay-later or instalment provider — اقساطی.
Object

A receipt the buyer uploaded for a manual transfer.

Image

The uploaded image — فیش واریزی.

String

The transfer reference the buyer typed in.

Money

How much the buyer says was transferred.

DateTime

When the buyer says it was transferred.

ReceiptStatus!

Where the merchant’s review of it stands.

DateTime!

No description.

Enum

Where a payment attempt got to.

ValueMeaning
INITIATEDStarted; the buyer never returned from the gateway.
AUTHORIZEDThe bank confirmed a hold; the platform has not yet verified it.
PAIDVerified with the gateway. The only status that means paid.
FAILEDRejected, cancelled, or timed out.
REFUNDEDReturned to the buyer.
UNRESOLVEDMoney is believed to have moved, but the gateway has not confirmed it and reconciliation has not yet resolved which way it went — تراکنش نامشخص. It lasts until reconciliation resolves it. Say so plainly to the buyer: an order stuck here with no explanation produces a support call, and one labelled “ناموفق” produces a second payment.
Object

A document drawn from a record and kept — here, an order’s invoice — as a PDF.

Private, always: url is a link signed for minutes, minted on each read, and the file behind it is never public. Drawn once per version, never per download.

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_DRAWNNone yet. Read with draw: true, it is drawn.
DRAWINGBeing drawn. Read again in a few seconds.
READYDrawn. url is set.
FAILEDDrawing it failed, and it is not drawn again for this version.
UNAVAILABLEThere is nothing to draw. unavailableReason says why.
Enum

Why a printed document cannot be drawn.

ValueMeaning
TEST_ORDERA test order: no invoice is made for one.
SELLER_UNIDENTIFIEDThe shop has not recorded the economic code an invoice names it by.
NOT_ISSUEDNo invoice exists for the order yet, or it was cancelled before one was.
NOT_BUILTThe invoice could not be built yet. Read again later.
CANCELLEDEvery invoice for the order was cancelled.
Enum

Where a merchant’s review of a receipt stands.

ValueMeaning
PENDINGNo description.
APPROVEDNo description.
REJECTEDNo description.
Object

A parcel sent against an order.

ID!

No description.

Carrier

Who is carrying it.

String

The tracking number — کد رهگیری مرسوله.

Iran Post’s is 24 digits; other carriers differ. Render it selectable.

URL

Where the buyer can follow it, when the carrier offers a page.

ShipmentStatus!

Where it has got to.

[ShipmentLine!]!

Which lines, and how many of each, are in this parcel.

DateTime

When it left.

DateTime

When it arrived.

DeliveryWindow

When it is expected.

Object

How much of one order line is in a parcel.

OrderLine!

No description.

Int!

No description.

Enum

Where a parcel has got to.

ValueMeaning
PENDINGCreated but not yet handed over.
IN_TRANSITNo description.
OUT_FOR_DELIVERYNo description.
DELIVEREDNo description.
ATTEMPTED_DELIVERYThe carrier tried and could not deliver.
REFUSEDThe buyer refused the parcel — مرجوعی.
RETURNEDNo description.
FAILUREThe carrier reported a problem.