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

Mutations

No description.

ProductPayload!

Create a product.

Only title is required; a merchant photographing stock on a phone types the name first. Created DRAFT unless told otherwise, so a half-finished product is never briefly public.

Errors: NOT_ENTITLED when the plan’s product limit is reached — params.meter is products, with params.limit and params.used, and no field, since nothing in the input is wrong. Drafts and archived products count; a deleted one does not.

All or nothing. A product whose variants, prices, custom data or publication are refused is removed again, and the refusals answer alone with product: null; one that could not be removed is answered with the refusals and an INVALID_STATE on input saying it is still there.

input.publishToChannelIds publishes the product once it is whole, as productPublish would, and needs WRITE_CHANNELS too — without it, FORBIDDEN on input.publishToChannelIds with params.scope, and nothing is made. A publish refused — a channel switched off, or one the shop does not have — is answered under input.publishToChannelIds (.N for one id).

ArgumentTypeMeaning
inputProductCreateInput!No description.

ProductPayload!

Change a product. Partial: omitted is unchanged, explicit null clears.

Errors: CONFLICT when ifVersion is stale, TAKEN when the handle is another product’s, NOT_FOUND for an unknown category.

ArgumentTypeMeaning
idID!No description.
inputProductUpdateInput!No description.
ifVersionVersionNo description.

ProductPayload!

Delete a product.

Refused with IN_USE when an order references it — an order must still render years later. Archive it instead; that is what ARCHIVED is for.

ArgumentTypeMeaning
idID!No description.
ifVersionVersionNo description.

ProductPayload!

Publish to, or unpublish from, sales channels. Both lists are optional.

ArgumentTypeMeaning
idID!No description.
publishToChannelIds[ID!]No description.
unpublishFromChannelIds[ID!]No description.

ProductPayload!

Replace a product’s option axes.

Destructive by nature: removing an axis merges the variants that differed only along it, and the mutation reports what it merged rather than doing it silently.

ArgumentTypeMeaning
idID!No description.
options[ProductOptionInput!]!No description.
ifVersionVersionNo description.

ProductVariantPayload!

Add variants to a product.

Errors: TAKEN for a duplicate SKU or a combination that already exists, INCONSISTENT when selectedOptions does not name every axis.

ArgumentTypeMeaning
productIdID!No description.
variants[ProductVariantCreateInput!]!No description.

ProductVariantPayload!

Change variants, in bulk.

Bulk because the screen is a grid: a merchant editing prices changes forty rows and expects one save. Partial per variant, and all-or-nothing — a rejected row rejects the batch, so a half-applied price change never ships.

ArgumentTypeMeaning
productIdID!No description.
variants[ProductVariantUpdateInput!]!No description.

ProductVariantPayload!

Remove variants. Refused with IN_USE when an order references one.

ArgumentTypeMeaning
productIdID!No description.
variantIds[ID!]!No description.

StagedUploadPayload!

Reserve upload slots and get presigned URLs.

Bytes never travel through this API: reserve here, PUT straight to storage, then attach with productMediaCreate, or make a library file with fileCreate.

Refused at the first upload that cannot be reserved, named by its position in input: OUT_OF_RANGE for a file larger than the platform stores, and NOT_ENTITLED (params.meter storage_bytes) for one the plan’s storage will not hold. The slots reserved before it stand, and lapse if nothing is put to them.

ArgumentTypeMeaning
input[StagedUploadInput!]!No description.

FileCreatePayload!

Make library files of staged uploads: public, used by nothing yet, named as given or by the filename each was staged with.

Each upload is made a file or refused on its own, and the payload names both: NOT_FOUND on ["input", i, "stagedUploadId"] for a reservation whose bytes have not landed or that lapsed, INVALID or OUT_OF_RANGE for bytes that are not the size reserved, MAX_LENGTH for a name or an alt too long. The merchant’s answer to the first three is to upload that file again.

A retry is answered with the file the first one made, for an upload it already made one of. The bytes are not stored twice.

ArgumentTypeMeaning
input[FileCreateInput!]!No description.

FilePayload!

Rename a file, or describe it.

NOT_FOUND for a file that is not in the library — a private one included, which is not on this surface at all.

ArgumentTypeMeaning
idID!No description.
inputFileUpdateInput!No description.

FileDeletePayload!

Delete a file from the library.

A file something uses is not deleted: IN_USE, with params.dependents and params.usedBy naming what uses it — the products whose galleries hold it, the posts that show it, the shop for its brand. Take it off there first. Only what File.usedBy follows is checked: a file whose address was pasted into a page’s text is deleted all the same, and stops showing there.

Deleting cannot be undone here. The file leaves every list, its address stops serving it, and it stops counting against the plan’s storage at once.

ArgumentTypeMeaning
idID!No description.

MediaPayload!

Attach uploaded files to a product.

Media arrives PROCESSING and becomes READY. An admin should render the preview immediately rather than waiting, or every save flickers.

ArgumentTypeMeaning
productIdID!No description.
stagedUploadIds[ID!]!No description.
alt[String!]No description.

MediaPayload!

Reorder or re-describe media. mediaIds in the order wanted.

ArgumentTypeMeaning
productIdID!No description.
mediaIds[ID!]No description.
alt[String!]No description.

MediaPayload!

No description.

ArgumentTypeMeaning
productIdID!No description.
mediaIds[ID!]!No description.

CollectionPayload!

No description.

ArgumentTypeMeaning
inputCollectionCreateInput!No description.

CollectionPayload!

No description.

ArgumentTypeMeaning
idID!No description.
inputCollectionUpdateInput!No description.
ifVersionVersionNo description.

CollectionPayload!

No description.

ArgumentTypeMeaning
idID!No description.
ifVersionVersionNo description.

CollectionPayload!

Add or remove products in a manual collection.

Refused with INVALID_STATE on an automatic collection: its membership is the rules, and editing it by hand would be silently undone the next time they run.

ArgumentTypeMeaning
idID!No description.
addProductIds[ID!]No description.
removeProductIds[ID!]No description.

CollectionPayload!

Publish to, or unpublish from, sales channels.

ArgumentTypeMeaning
idID!No description.
publishToChannelIds[ID!]No description.
unpublishFromChannelIds[ID!]No description.

TaxonomyCategoryPayload!

Hang a shop-owned node under a platform category (or another of this shop’s).

The shared tree is not edited. The new node inherits the nearest platform ancestor’s marketplace mappings. A retry without idempotencyKey would leave a duplicate this service cannot merge, so the key is required.

ArgumentTypeMeaning
inputTaxonomyExtensionCreateInput!No description.
idempotencyKeyString!No description.

InventoryPayload!

Move stock by a signed delta, recording why.

Deltas rather than absolutes: two staff counting the same shelf should both have their corrections applied, not have the second discard the first.

idempotencyKey is required. A retried adjustment that applied the first time moves stock twice, and on connections that drop requests that is not hypothetical.

ArgumentTypeMeaning
input[InventoryAdjustInput!]!No description.
idempotencyKeyString!No description.

InventoryPayload!

Set an absolute count after a physical stocktake.

The difference is recorded as a RECOUNT adjustment, so the ledger still explains the change. It is taken where the level is held, so a sale landing at the same moment is not added to the count; a count equal to what is there records nothing and is not refused, so a stocktake confirming twenty shelves and correcting one writes one entry. adjustments lists only the counts that changed something; levels lists every one counted.

A count at a location where the item is not stocked stocks it there. All of the counts or none, at most 250, one per level, never negative (INVALID); a count that would take available below zero where the location does not oversell is INSUFFICIENT_STOCK, as inventoryAdjust is. A retry with the same idempotencyKey is answered with what the first call recorded.

ArgumentTypeMeaning
input[InventorySetOnHandInput!]!No description.
idempotencyKeyString!No description.

InventoryItemPayload!

Turn tracking on or off, or set cost.

ArgumentTypeMeaning
idID!No description.
inputInventoryItemUpdateInput!No description.

InventoryPayload!

Set or clear the low-stock threshold of levels. Null clears it.

All of them or none, at most 250. A level the item is not stocked at is refused INVALID_STATE — stock it there first — and a negative threshold INVALID. A setting, not a movement: no ledger entry, and the level’s updatedAt stays where it was.

A threshold set above where the level already is notifies at once, once: waiting for the next sale would never cross it on the way down. Lowering a threshold, raising it while already below, and clearing it notify nothing. levels are the levels as they now stand; adjustments is always empty.

ArgumentTypeMeaning
input[InventoryLevelUpdateInput!]!No description.

InventoryPayload!

Start stocking an item at a location, or stop.

Starting opens the item’s level there at zero, or opens a stopped one again as it was — its threshold included — and is allowed at an inactive location, which holds stock and sells none. Starting where it is already stocked changes nothing. levels is the level. Any movement at a location — a count, an adjustment, a transfer arriving, a return — starts stocking the item there as well.

Stopping is refused with IN_USE while anything is there: the merchant has to say where it went. params names what, by the field it is on InventoryLevel — onHand, committed, reserved, incoming, each when it is not zero — and transfers, how many transfers not yet received or cancelled carry the item from or to the location. reserved counts a checkout’s hold that has lapsed until the platform settles it, within a minute. Stopping where it is not stocked changes nothing. levels is empty: the level is no longer one of the item’s.

An item is sold only where it is stocked: a checkout is never served from a location the item is not stocked at, whatever that location’s overselling setting.

ArgumentTypeMeaning
inventoryItemIdID!No description.
locationIdID!No description.

InventoryPayload!

No description.

ArgumentTypeMeaning
inventoryItemIdID!No description.
locationIdID!No description.

InventoryTransferPayload!

No description.

ArgumentTypeMeaning
inputInventoryTransferCreateInput!No description.

InventoryTransferPayload!

Send it. Deducts at the origin and counts as incoming at the destination.

ArgumentTypeMeaning
idID!No description.
ifVersionVersionNo description.

InventoryTransferPayload!

Receive it, recording what actually arrived.

A shortfall becomes shrinkage at the origin unless told otherwise. Somewhere is where it has to land: leaving it unaccounted makes both locations wrong.

ArgumentTypeMeaning
idID!No description.
inputInventoryTransferReceiveInput!No description.

InventoryTransferPayload!

No description.

ArgumentTypeMeaning
idID!No description.
ifVersionVersionNo description.

JobPayload!

Import products from a spreadsheet.

Excel matters here more than CSV: it is what Iranian merchants have, and what a wholesaler sends them.

Returns a Job. Rows that fail do not fail the import — one bad price in a thousand rows should not reject the file — and Job.errors lists them with their row numbers so the merchant can fix their own copy.

A row that would create a product past the plan’s limit is one of them: NOT_ENTITLED with the same params as productCreate.

ArgumentTypeMeaning
stagedUploadIdID!No description.
dryRunBoolean · default falseNo description.

JobPayload!

Export the catalogue. Returns a Job whose resultUrl is the file.

ArgumentTypeMeaning
filtersProductAdminFilterNo description.
formatExportFormat · default "XLSX"No description.

JobPayload!

Import stock counts by SKU and location.

An Excel workbook (its first sheet) or CSV, whose header names three columns in any order: sku, location and on_hand — or «کد کالا», «انبار» or «مکان», and «موجودی». Other columns are ignored. A location is named by its name, however it is typed; an SKU exactly as the product stores it. A count may be written in Persian or Arabic digits, with thousands separators. Each row sets the location’s on-hand count, recorded as a RECOUNT filed under the job, as inventorySetOnHand does; a row equal to what is there records nothing, and a row naming a location the item is not stocked at stocks it there.

Returns a Job of kind INVENTORY_IMPORT, listed by jobs and stopped by jobCancel. Rows that fail do not fail the import, and Job.errors names each by its row number and by its column as the file’s header spells it: REQUIRED for an empty cell; NOT_FOUND for an SKU no variant carries or a location nobody has; INVALID for an SKU several variants carry (params.variants), a name several locations share (params.locations), a count that is not a whole number, or a row repeating an earlier one (params.duplicateOf); INCONSISTENT for rows counting one item at one location differently, none of which is applied (params.rows); INVALID_STATE for an item whose stock is not tracked; OUT_OF_RANGE for a negative count; INSUFFICIENT_STOCK as for inventorySetOnHand.

dryRun judges every row and changes nothing. Either way Job.resultUrl is a workbook listing every row with the count now, the count in the file, the change and what happened to it — on a dry run, what would change. An import of the same file again moves nothing that already matches.

At most 10,000 rows: past that the job is FAILED before any row is applied, with one error, OUT_OF_RANGE, params.maximum and params.rows. A file that is not a spreadsheet, or lacks a column, fails the same way.

ArgumentTypeMeaning
stagedUploadIdID!No description.
dryRunBoolean · default falseNo description.

JobPayload!

Stop a job that has not finished.

Best-effort: work already applied stays applied. An import cancelled halfway has imported half, and Job.processedCount says how much.

ArgumentTypeMeaning
idID!No description.

OrderPayload!

Change tags, notes, the assignee, or a mistyped contact detail.

ArgumentTypeMeaning
idID!No description.
inputOrderUpdateInput!No description.
ifVersionVersionNo description.

OrderPayload!

Cancel an order.

Restocks by default, which is right when nothing shipped and wrong after dispatch — handle that as a return instead. notifyCustomer defaults true and should be set false when cancelling a batch of fraudulent orders, so the abuser is not told which ones were caught.

Errors: INVALID_STATE when it is already cancelled, or when money has been captured and not yet refunded: refund it first, with refundCreate.

ArgumentTypeMeaning
idID!No description.
inputOrderCancelInput!No description.
ifVersionVersionNo description.

OrderPayload!

Close an order that is finished.

Bookkeeping, not a state change anyone waits on: it takes a fulfilled and paid order off the working queue. Reopening is orderReopen.

ArgumentTypeMeaning
idID!No description.

OrderPayload!

No description.

ArgumentTypeMeaning
idID!No description.

OrderPayload!

Record that a staff member has looked at a risky order and cleared it.

Clearing does not change the risk level — it records a decision, and the decision is what takes the order out of the queue. A level that could be edited would stop meaning anything.

ArgumentTypeMeaning
idID!No description.
noteStringNo description.

DraftOrderPayload!

No description.

ArgumentTypeMeaning
inputDraftOrderCreateInput!No description.

DraftOrderPayload!

No description.

ArgumentTypeMeaning
idID!No description.
inputDraftOrderUpdateInput!No description.
ifVersionVersionNo description.

DraftOrderPayload!

No description.

ArgumentTypeMeaning
idID!No description.

PaymentLinkPayload!

Send the buyer a link to pay — the DM-to-order flow, made into an operation.

Defaults to SMS. Re-sending mints a fresh link rather than resurrecting an expired one.

SMS is Kaladan’s own text (see PaymentLinkChannel), sent to input.phone, else the draft’s number, else its customer’s. Whether it can go is asked before anything is minted, as paymentLinkTextCheck reads it: no service line, no credit, or a text too long refuses the send and mints nothing — NOT_ENTITLED on input.channel with params.reason NO_SERVICE_LINE (params.lineType SERVICE) or NO_CREDIT (params.creditsNeeded and params.creditsRemaining), or OUT_OF_RANGE with params.reason TOO_LONG and params.maxSegments. Then the link is minted and the text sent, and textStatus says what became of it. A text that did not go leaves the link minted: it comes back with the draft and the refusal beside it — the same codes, REQUIRED on input.phone when nobody can be reached, INVALID_STATE with params.reason REFUSED when the provider refused it — and nothing is charged; the merchant can copy the link.

MANUAL mints the link for the merchant to paste. EMAIL is not carried yet (INVALID_STATE on input.channel).

While the store is locked — a plan without the online store, or a shop suspended for an unpaid term — no draft’s link is sent on any channel: a locked store takes no new order, and a draft paid through its link becomes one. INVALID_STATE on id with params.reason STORE_LOCKED and, when the lock is dated, params.lockedSince; nothing is minted.

ArgumentTypeMeaning
idID!No description.
inputPaymentLinkSendInputNo description.

DraftOrderCompletePayload!

Turn a draft into an order.

markAsPaid records money the merchant took outside the platform — cash over a counter, a transfer they checked themselves. The payment is recorded against the staff member, so it is auditable rather than invisible.

idempotencyKey is required: completing twice creates two orders and consumes stock twice.

Errors: INSUFFICIENT_STOCK when the goods went while the draft sat — the commonest failure, and what reservesInventory exists to prevent. REQUIRED when an official invoice was asked for and its identifying fields are missing.

ArgumentTypeMeaning
idID!No description.
inputDraftOrderCompleteInput!No description.
idempotencyKeyString!No description.

FulfillmentPayload!

Ship a parcel.

Omitting lines ships everything remaining, which is the common case and what a barcode scanner produces. Tracking may be added later — it frequently arrives after the parcel does.

idempotencyKey is required: a repeated call would ship the same goods twice and decrement stock twice.

Errors: INVALID_STATE when the fulfillment order is held or closed, OUT_OF_RANGE when a line asks for more than remains.

ArgumentTypeMeaning
inputFulfillmentCreateInput!No description.
idempotencyKeyString!No description.

FulfillmentPayload!

Add or correct tracking after the fact.

ArgumentTypeMeaning
idID!No description.
trackingTrackingInput!No description.
notifyCustomerBoolean · default trueNo description.

FulfillmentPayload!

Cancel a parcel that has not left.

Returns the goods to the fulfillment order, not to stock: they are still on the packing bench.

ArgumentTypeMeaning
idID!No description.

FulfillmentOrderPayload!

Hold work without losing it.

AWAITING_RECEIPT_APPROVAL is the reason this exists: a card-to-card order must not ship until somebody has looked at the transfer.

ArgumentTypeMeaning
idID!No description.
inputFulfillmentHoldInput!No description.

FulfillmentOrderPayload!

No description.

ArgumentTypeMeaning
idID!No description.

FulfillmentOrderPayload!

Move outstanding work to another location.

What a merchant does when the Tehran warehouse is out and the shop is not. Refused with INSUFFICIENT_STOCK when the destination cannot cover it either.

ArgumentTypeMeaning
idID!No description.
locationIdID!No description.

ReturnPayload!

Open a return — مرجوعی.

Goods only. The refund is a separate operation, refundCreate, and deliberately so: a merchant frequently receives goods back and refunds a different amount, or refunds without receiving anything.

ArgumentTypeMeaning
inputReturnCreateInput!No description.

ReturnPayload!

No description.

ArgumentTypeMeaning
idID!No description.
notifyCustomerBoolean · default trueNo description.

ReturnPayload!

Refuse it. staffNote is required, because the buyer will ask why.

ArgumentTypeMeaning
idID!No description.
staffNoteString!No description.
notifyCustomerBoolean · default trueNo description.

ReturnPayload!

Record what came back and in what condition.

Restocking defaults to true only for SELLABLE. Putting damaged goods back into sellable stock is how a shop sells the same broken item twice, so it has to be asked for.

Returns the stock movements it made, so a client shows what it did rather than sending the merchant to go and look.

ArgumentTypeMeaning
idID!No description.
inputReturnReceiveInput!No description.
idempotencyKeyString!No description.

ReturnPayload!

Close a finished return. Any refund is a separate record.

ArgumentTypeMeaning
idID!No description.

PaymentTerminalPayload!

Register a terminal of the merchant’s own — an OWN_GATEWAY one — and check it with its provider.

apiKey is write-only: no field on this API returns it. It is filed with the platform’s secret holder, encrypted, before the terminal is registered, and if registration is refused it is disabled there at once, so no key nothing refers to stays readable.

Registered PENDING_VERIFICATION, then checked — the provider is asked whether it accepts the credential, without charging anybody. Accepted, the terminal comes back ACTIVE; refused, it comes back PENDING_VERIFICATION with lastError in the provider’s own words, and no userErrors: it is registered, and paymentTerminalKeySet or paymentTerminalVerify is the next step. A provider that does not answer leaves it pending and unchecked — lastError null — for paymentTerminalVerify to ask again.

A terminal of the merchant’s own takes payments while the shop is in OWN_GATEWAY mode; registered while it is in PLATFORM mode, it waits for paymentModeSwitchRequest.

Errors: NOT_FOUND on provider for one this deployment does not speak — sandbox, the test provider, included everywhere but development; REQUIRED on apiKey for a provider that takes one, INCONSISTENT for one that takes none; INVALID on apiKey for one with spaces or control characters inside it, MAX_LENGTH past 4096 characters.

ArgumentTypeMeaning
inputPaymentTerminalInput!No description.

PaymentTerminalPayload!

Check a terminal’s credential with its provider again, charging nobody. Safe to repeat.

The answer is recorded on the terminal, not returned as an error: accepted makes it ACTIVE, refused makes it PENDING_VERIFICATION and revoked REVOKED, each refusal in the provider’s own words as lastError. A provider that does not answer changes nothing, and the request fails rather than answering: nothing was checked. A DISABLED terminal is not checked → INVALID_STATE.

ArgumentTypeMeaning
idID!No description.

PaymentTerminalPayload!

Give a terminal a new key — the merchant rotated it at their provider, or the one on file was refused.

Checked before it is taken. The new key is filed and put to the provider; only once the provider accepts it does the terminal use it, and the key it replaced is disabled at the secret holder. Refused, the terminal keeps the key it had and the new one is disabled → INVALID on apiKey, params.reason the provider’s own words. A provider that revoked the terminal itself → INVALID_STATE, and the terminal is REVOKED. INCONSISTENT for a provider that takes no key.

ArgumentTypeMeaning
idID!No description.
apiKeyString!No description.

PaymentTerminalPayload!

Make a terminal the one new payments use, or set its fallback position.

Fallbacks matter more here than elsewhere: a single PSP being unreachable for an hour is ordinary, and a shop with one terminal simply stops selling.

Omit fallbackOrder to make the terminal primary — for method alone, or for every method it carries when method is omitted; the terminal primary before it becomes a fallback. Supply it to place the terminal in its mode’s fallback sequence instead — 1 is tried first after the primary — giving up any primary it held to the first fallback that can take it. Positions are compacted, so a gap left by a disabled terminal closes itself.

Errors: INVALID_STATE for a terminal that is not ACTIVE or UNAVAILABLE, with the status in params, for one that does not carry method, and for a PLATFORM terminal that cannot split; OUT_OF_RANGE for a fallbackOrder below 1. Kaladan’s own terminals are Kaladan’s to order: a PLATFORM terminal is refused — INVALID_STATE on id, params.reason platform_terminal — and nothing moves.

ArgumentTypeMeaning
idID!No description.
fallbackOrderIntNo description.
methodPaymentMethodTypeNo description.

PaymentTerminalPayload!

Stop charging through a terminal. Payments it already took still finish on it, and its key stays on file for them. The first fallback that can take each of its primaries takes it; with none, the method has no terminal until one is verified. Final: a disabled terminal is registered again to be used again.

Kaladan’s own terminals are Kaladan’s to switch off: a PLATFORM terminal is refused — INVALID_STATE on id, params.reason platform_terminal, disabled already or not — and nothing changes.

ArgumentTypeMeaning
idID!No description.

BankAccountPayload!

Register a settlement account.

The SHEBA checksum is validated, and the holder’s name is checked against the business profile - an account in somebody else’s name is the commonest shape of a takeover and of an honest mistake alike.

ArgumentTypeMeaning
inputBankAccountInput!No description.

BankAccountPayload!

No description.

ArgumentTypeMeaning
idID!No description.

PaymentConfigurationPayload!

How one method is offered - surcharge, limits, provinces, transfer target.

ArgumentTypeMeaning
input[PaymentMethodConfigurationInput!]!No description.

PaymentConfigurationPayload!

Beneficiaries on every split - تسهیم.

For a merchant paying a partner or a supplier out of each sale. Kaladan’s own commission is not set here; it comes from the plan.

Replaces the list wholesale. A beneficiary named by id is kept, with the same id and its شبا on file unless a new one is given; one left out is removed.

Errors: INVALID for a SHEBA that fails its checksum, OUT_OF_RANGE when the ratios add to more than what is left after the platform’s share, REQUIRED for a new beneficiary with no SHEBA, NOT_FOUND for an id that is not on this shop’s list, INCONSISTENT for one id named twice.

ArgumentTypeMeaning
input[SplitBeneficiaryInput!]!No description.

PaymentConfigurationPayload!

Ask to change payment mode.

An operation with its own state, not a toggle: the new terminal must verify, and the old one keeps working until it does. Cannot complete while a transaction is unresolved, because resolving one needs the terminal it was made on.

It completes on its own once nothing blocks it — on this request when nothing does, otherwise when the last blocker clears — and the answer says which: mode changed and pendingModeSwitch null, or the switch pending with its blockers. What completing does to money: to OWN_GATEWAY, every payment from that instant goes through the merchant’s own terminal, names nobody, and Kaladan takes no commission on it; the merchant’s own provider pays them out, and Kaladan still verifies and reconciles. To PLATFORM, every payment from that instant goes through Kaladan’s terminal and names Kaladan’s commission, under the terms in force, beside the merchant’s share. Payments already in flight finish as they started.

A shop that has never chosen a mode chooses one here, at once, with its default bank account as where money settles. Asking for the mode a shop has answers as it stands; asking for the one a pending switch is going to answers that switch; asking for another while one is pending → INVALID_STATE.

ArgumentTypeMeaning
toPaymentMode!No description.

PaymentConfigurationPayload!

Withdraw a pending mode switch. The mode stays what it was, and so does the commission; terminals registered for the switch stay registered. With nothing pending it changes nothing.

TransactionPayload!

Ask the gateway what became of a transaction, now.

The manual form of what the reconciliation worker does continuously. A merchant with a customer on the phone should not have to wait for the next scheduled pass.

Safe to repeat: an inquiry reads, it does not move money.

ArgumentTypeMeaning
idID!No description.

TransactionPayload!

Capture a previously authorized amount.

Rare here - few Iranian providers separate authorization from capture - but modelled because the ones that do are the ones large merchants use.

ArgumentTypeMeaning
idID!No description.
amountMoneyInputNo description.
idempotencyKeyString!No description.

TransactionPayload!

Release an authorization without taking it.

ArgumentTypeMeaning
idID!No description.
idempotencyKeyString!No description.

TransactionPayload!

Record cash a courier collected and has now settled - پس‌کرایه.

The money existed before this call; this is when the platform learns of it. Creates a CASH_COLLECTION transaction against the order. A test order’s cash is recorded as test money, the order’s own test flag read first, so it pays that order and reaches no report or payout. No such order → NOT_FOUND on orderId, and nothing is recorded.

ArgumentTypeMeaning
orderIdID!No description.
amountMoneyInput!No description.
collectedAtDateTimeNo description.
referenceStringNo description.
idempotencyKeyString!No description.

ManualReceiptPayload!

Approve a transfer receipt.

Creates a MANUAL_TRANSFER transaction for amount, or for what the buyer claimed when no amount is given, and releases any fulfillment order held on AWAITING_RECEIPT_APPROVAL.

idempotencyKey is required: approving twice credits the order twice.

ArgumentTypeMeaning
idID!No description.
inputReceiptDecisionInputNo description.
idempotencyKeyString!No description.

ManualReceiptPayload!

Refuse one. rejectionReason is required - the buyer is told it, so it has to be something they can act on.

ArgumentTypeMeaning
idID!No description.
inputReceiptDecisionInput!No description.

JobPayload!

Run a reconciliation pass now, for one day and one provider.

Normally scheduled. Run by hand when a provider re-issues a report, or when a merchant is disputing a figure and wants it re-checked while they wait.

ArgumentTypeMeaning
businessDateString!No description.
providerString!No description.

DiscrepancyPayload!

Record what was done about a disagreement.

note is required. A discrepancy resolved with no explanation is a discrepancy that will be re-opened by whoever reads the run next month.

It records what was done and moves no money: REFUNDED is a refund made outside the platform — by hand, by bank transfer — on every kind, an UNCLAIMED_PAYMENT included. Giving an unclaimed payment back through its provider is discrepancyRefund, and while a refund that raised is in flight this is refused: the provider’s answer closes it.

ArgumentTypeMeaning
idID!No description.
inputDiscrepancyResolveInput!No description.

DiscrepancyPayload!

Give an UNCLAIMED_PAYMENT back to its buyer, through the provider that took it.

What the payment took, less anything already given back of it, recorded as a Refund against the payment rather than an order, with whoever asked named on it. The provider is asked at once, and the discrepancy comes back INVESTIGATING with its refund until the provider says the money went back — at once, as a rule, and RESOLVED as REFUNDED then. A refusal leaves it open, naming the refused refund, to be asked again or resolved.

Both grants, because it does what neither does alone: it closes a discrepancy, which is WRITE_PAYOUTS, and sends money back, which is WRITE_PAYMENTS — a role allowed to reconcile is not by that allowed to give money away. Any other kind, a closed one, one with a refund in flight, a payment an order has claimed since, one with nothing left to give back, and a provider with no refund API are INVALID_STATE.

idempotencyKey is required: money moves. A replay with the same discrepancy and note returns what the first returned, and asks the provider for nothing more; with anything else it is IDEMPOTENCY_CONFLICT.

ArgumentTypeMeaning
idID!No description.
inputDiscrepancyRefundInput!No description.
idempotencyKeyString!No description.

DiscrepancyPayload!

Take one for investigation, so two people do not chase the same gap.

ArgumentTypeMeaning
idID!No description.

RefundPayload!

Record money going back.

method decides what actually happens: GATEWAY asks the provider that took the money at once, from one payment of the order, and the refund comes back as the provider left it; MANUAL_TRANSFER records the intent and waits for the merchant to make the transfer and supply its reference.

idempotencyKey is required: money moves. The same key with the same input answers the refund the first call recorded — and asks its provider nothing more — while the same key with anything else is IDEMPOTENCY_CONFLICT. A refusal spends no key.

Capped under the order’s lock: two refunds of one order recorded at once are taken one after the other, so together they never pass what was received. OUT_OF_RANGE beyond what is left, with requested and available; for GATEWAY, also beyond what one payment has left, available then being the most one can give back. INVALID_STATE on method when no payment of the order can be given back through its provider.

Refused with INVALID_STATE against an UNRESOLVED transaction. Refunding money that may never have arrived is the exact failure this refusal exists to prevent; inquire first.

ArgumentTypeMeaning
inputRefundCreateInput!No description.
idempotencyKeyString!No description.

RefundPayload!

Mark a manual refund as made, with the transfer reference.

The reference is the only evidence the money moved, so it is required.

ArgumentTypeMeaning
idID!No description.
manualReferenceString!No description.

RefundPayload!

No description.

ArgumentTypeMeaning
idID!No description.

OrderEditPayload!

Open a staging area for changes to a placed order.

Staged rather than immediate because an edit changes what is owed, and a merchant adding three items and removing one needs to see the net before it becomes a charge.

ArgumentTypeMeaning
orderIdID!No description.

OrderEditPayload!

Stage a line change. Quantity is absolute; zero removes the line.

A line that has shipped is not editable - goods already sent are a return.

ArgumentTypeMeaning
idID!No description.
inputOrderEditLineInput!No description.

OrderEditCommitPayload!

Apply the staged changes in one step.

An order something was paid on that now owes more is given a payment link for exactly what it owes (paymentLink); one that now holds more than it costs is refunded separately, by a person, with refundCreate — a commit creates no refund; an unpaid order simply has its balance adjusted, which is the commonest case on cash on delivery.

ArgumentTypeMeaning
idID!No description.
notifyCustomerBoolean · default trueNo description.
idempotencyKeyString!No description.

OrderPaymentLinkPayload!

Mint a new link for what an order owes after an edit, and send it — when the one a commit minted expired or was lost.

Only for an open order something was paid on that still owes: INVALID_STATE otherwise, params.reason saying unpaid (its balance is collected the way it was agreed) or nothing_owed. The new link replaces every earlier one.

SMS, the default, is Kaladan’s own text to the order’s own buyer — the number on the order, else its customer’s — exactly as for a draft’s link (draftOrderSendPaymentLink): asked before anything is minted, refused the same way when it cannot go, and a text that did not go leaves the link minted beside its refusal, with textStatus saying what became of the text. input.phone is refused — INVALID on input.phone, nothing minted: an order’s link goes to the order’s buyer and nobody else. MANUAL mints the link for the merchant to paste; EMAIL is not carried yet (INVALID_STATE on input.channel).

While the store is locked, a link is still sent for an order placed before the lock — the buyer may pay what they owe — and refused for one placed at or after it, or for any order while the lock has no date to compare with, which checkout refuses too: INVALID_STATE on id with params.reason STORE_LOCKED and params.lockedSince when it is dated. Nothing is minted.

ArgumentTypeMeaning
idID!No description.
inputPaymentLinkSendInputNo description.

OrderEditPayload!

Throw the staging area away. The order is untouched.

ArgumentTypeMeaning
idID!No description.

TaxConfigurationPayload!

VAT rate, tax-inclusive pricing, and how invoices reach سامانه مودیان.

ArgumentTypeMeaning
inputTaxConfigurationInput!No description.

MoadianInvoicePayload!

File an invoice with the tax system.

Queues it; the answer arrives on a later inquiry, because that is how the tax system works. Watch MoadianInvoice.submissions for the verdict.

Errors: REQUIRED when the buyer’s identifier or a line’s commodity code is missing - the two things that are almost always missing - and NOT_ENTITLED when no memory-unit id is configured.

ArgumentTypeMeaning
idID!No description.

MoadianInvoicePayload!

Supply what an invoice lacks, and file it.

A rejected invoice is corrected and filed again. Rejection is normal rather than exceptional: a mistyped national identifier or an unclassified product produces one, and this is the loop that closes it. A draft whose lines were built without a commodity code takes the missing codes here and is filed in the same step, because filing refuses it before the tax system can reject it — the delivery charge’s included, which no category classifies and which is named by its own line id. A draft with no lines yet is INVALID_STATE.

ArgumentTypeMeaning
idID!No description.
inputMoadianInvoiceCorrectionInput!No description.

MoadianInvoicePayload!

Ask the tax system what became of the latest submission.

ArgumentTypeMeaning
idID!No description.

MoadianInvoicePayload!

File a cancellation - ابطالی - against an accepted invoice.

ArgumentTypeMeaning
idID!No description.
reasonString!No description.

MoadianBatchPayload!

File everything outstanding, as a job.

What a merchant runs before a deadline. Rows that fail do not fail the batch; the job’s errors name the invoices needing correction.

ArgumentTypeMeaning
filtersMoadianInvoiceFilterNo description.

CustomerPayload!

Record a customer by hand.

Errors: TAKEN when the mobile number already belongs to somebody — it is the identity, so there is no second record under it.

ArgumentTypeMeaning
inputCustomerCreateInput!No description.

CustomerPayload!

No description.

ArgumentTypeMeaning
idID!No description.
inputCustomerUpdateInput!No description.
ifVersionVersionNo description.

CustomerPayload!

Change what a customer agrees to be contacted on.

source is required on an opt-in: consent recorded without where it came from is a claim the merchant cannot defend.

ArgumentTypeMeaning
idID!No description.
inputMarketingConsentInput!No description.

CustomerMergePayload!

Fold one customer record into another.

Guest checkouts under a mistyped number are how duplicates arise, and a merchant looking at two histories for one person cannot serve either.

Orders, addresses, credit entries and tags move to the surviving record; the merged one is tombstoned rather than deleted so its ids keep resolving. Not reversible — the mutation says so, and an admin should too.

ArgumentTypeMeaning
keepIdID!No description.
mergeIdID!No description.
idempotencyKeyString!No description.

CustomerPayload!

End every session on a customer record.

The immediate action when a number turns out to belong to somebody else, or when a buyer reports a device they no longer have. Takes effect at once rather than at token expiry: an hour of somebody else’s order history is an hour too long.

Does not touch the record itself. A merchant who needs the history intact — and it is a tax record, so they do — must be able to sever access without deleting anything.

ArgumentTypeMeaning
customerIdID!No description.
reasonString!No description.

CustomerPayload!

Detach a mobile number from a customer record, releasing it for reuse.

The record survives with its orders, its invoices and its store credit — those are the merchant’s books — and nobody can sign in as it again. The number becomes available for a fresh customer record, which is what the new holder gets when they next check out.

Not a merge, and not a deletion. customerMerge joins two records that are one person; this splits an identity off a record because they were never the same person to begin with. Deletion would take the merchant’s own sales history with it.

Requires a reason, and appears in the audit log naming the staff member: releasing a number is how somebody would detach a customer from evidence, and it must not be quiet.

Errors: INVALID_STATE for a record with no phone, FORBIDDEN where the shop’s data-retention settings forbid it.

ArgumentTypeMeaning
customerIdID!No description.
reasonString!No description.

CustomerPayload!

Erase a customer’s personal data.

Redacts name, phone, email and addresses. Orders survive with the buyer redacted, because they are tax records the merchant is required to keep — the API cannot offer to delete them and should not pretend to.

ArgumentTypeMeaning
idID!No description.
reasonStringNo description.

CustomerSegmentPayload!

No description.

ArgumentTypeMeaning
inputCustomerSegmentInput!No description.

CustomerSegmentPayload!

No description.

ArgumentTypeMeaning
idID!No description.
inputCustomerSegmentInput!No description.
ifVersionVersionNo description.

CustomerSegmentPayload!

No description.

ArgumentTypeMeaning
idID!No description.

CompanyPayload!

No description.

ArgumentTypeMeaning
inputCompanyInput!No description.

CompanyPayload!

No description.

ArgumentTypeMeaning
idID!No description.
inputCompanyInput!No description.
ifVersionVersionNo description.

CompanyPayload!

Add or remove the people who may order on a company account.

ArgumentTypeMeaning
idID!No description.
addCustomerIds[ID!]No description.
removeCustomerIds[ID!]No description.

PriceListPayload!

No description.

ArgumentTypeMeaning
inputPriceListCreateInput!No description.

PriceListPayload!

No description.

ArgumentTypeMeaning
idID!No description.
inputPriceListUpdateInput!No description.
ifVersionVersionNo description.

PriceListPayload!

No description.

ArgumentTypeMeaning
idID!No description.

PriceListEntryPayload!

Set explicit prices on a list, in bulk.

A list is a sparse override: entries exist only for variants whose price differs, and everything else falls through to the variant’s own price.

ArgumentTypeMeaning
idID!No description.
entries[PriceListEntryInput!]!No description.

PriceListEntryPayload!

No description.

ArgumentTypeMeaning
idID!No description.
variantIds[ID!]!No description.

ScheduledPriceChangePayload!

Schedule a price change.

Takes a snapshot of the current prices first, so a temporary change can be reverted exactly. Without one a three-day sale is a one-way door.

ArgumentTypeMeaning
inputScheduledPriceChangeInput!No description.

ScheduledPriceChangePayload!

No description.

ArgumentTypeMeaning
idID!No description.

ScheduledPriceChangePayload!

Put back the prices a scheduled change replaced, now rather than on its date.

ArgumentTypeMeaning
idID!No description.

DiscountPayload!

Create a discount.

Errors: TAKEN for a code another discount holds, REQUIRED for a code on a CODE trigger, INCONSISTENT when the value kind and its arguments disagree.

A percentage discount without value.cap is accepted and should be warned about in an admin: uncapped percentages on a large basket are how a campaign loses money.

ArgumentTypeMeaning
inputDiscountCreateInput!No description.

DiscountPayload!

No description.

ArgumentTypeMeaning
idID!No description.
inputDiscountUpdateInput!No description.
ifVersionVersionNo description.

DiscountPayload!

Switch a discount off without deleting it.

Preferred over deletion: orders already carrying it keep a reference, and a merchant re-running the same campaign next Nowruz wants it back.

ArgumentTypeMeaning
idID!No description.

DiscountPayload!

No description.

ArgumentTypeMeaning
idID!No description.

DiscountPayload!

No description.

ArgumentTypeMeaning
idID!No description.

StoreCreditPayload!

Grant or remove store credit by hand.

note is required for a MANUAL reason. Credit is a liability the shop chooses to honour — redeemable against orders here, never withdrawable — which is why there is no cash-out mutation and will not be one.

ArgumentTypeMeaning
inputStoreCreditAdjustInput!No description.
idempotencyKeyString!No description.

GiftCardCreatePayload!

Issue a gift card.

The full code is returned once and only its hash is stored. Omit code to have one generated: a code a merchant chose is a code somebody can guess.

ArgumentTypeMeaning
inputGiftCardCreateInput!No description.

StoreCreditPayload!

Move a card’s value onto a customer’s credit account.

One ledger for everything the shop owes, rather than a balance in two places.

ArgumentTypeMeaning
codeString!No description.
customerIdID!No description.
idempotencyKeyString!No description.

GiftCardPayload!

Switch off a lost, stolen, or mistakenly issued card. Not deleted.

ArgumentTypeMeaning
idID!No description.
reasonStringNo description.

PagePayload!

Create a page — or one of the shop’s policies, with input.policyKind.

An ordinary page needs a title (REQUIRED on input.title). A policy starts from Kaladan’s draft: with policyKind and no title, body or handle, the kind’s Persian name, its pre-written text with […] placeholders to fill in, and the kind’s own handle (return, shipping, privacy, terms) are filled in, as a draft. A shop holds one page of each kind — a second is TAKEN on input.policyKind, params.conflictingId naming the one it has — and a policy is never scheduled: in force now or a draft, so a date ahead is INVALID_STATE on input.publishedAt.

ArgumentTypeMeaning
inputPageInput!No description.

PagePayload!

Change a page. A policy’s kind is fixed: input.policyKind naming another kind is INVALID on input.policyKind, and naming its own is accepted.

ArgumentTypeMeaning
idID!No description.
inputPageInput!No description.
ifVersionVersionNo description.

PagePayload!

No description.

ArgumentTypeMeaning
idID!No description.

BlogPayload!

No description.

ArgumentTypeMeaning
inputBlogInput!No description.

BlogPayload!

No description.

ArgumentTypeMeaning
idID!No description.
inputBlogInput!No description.
ifVersionVersionNo description.

ArticlePayload!

No description.

ArgumentTypeMeaning
inputArticleInput!No description.

ArticlePayload!

No description.

ArgumentTypeMeaning
idID!No description.
inputArticleInput!No description.
ifVersionVersionNo description.

ArticlePayload!

No description.

ArgumentTypeMeaning
idID!No description.

MenuPayload!

Save a menu, replaced whole.

Trees do not merge: a partial update of a nested, ordered structure has no unambiguous meaning, and guessing at one is how a merchant loses a mega-menu.

ArgumentTypeMeaning
inputMenuInput!No description.

MenuPayload!

No description.

ArgumentTypeMeaning
idID!No description.

UrlRedirectPayload!

Create redirects, in bulk.

Bulk because the case that matters is a migration: a shop arriving from WooCommerce brings years of indexed URLs, and losing them costs the merchant its Torob placement.

Errors: TAKEN for a path already redirected, INCONSISTENT for a redirect pointing at itself or forming a loop.

ArgumentTypeMeaning
input[UrlRedirectInput!]!No description.

UrlRedirectPayload!

No description.

ArgumentTypeMeaning
ids[ID!]!No description.

ReviewPayload!

Publish a review. It becomes visible on the storefront immediately.

ArgumentTypeMeaning
idID!No description.

ReviewPayload!

Refuse one. reason is required, and is not shown to the reviewer verbatim.

ArgumentTypeMeaning
idID!No description.
inputReviewModerationInput!No description.

ReviewPayload!

Withdraw a published review.

Distinct from rejecting: a buyer asking where their review went is owed the difference between “we never published it” and “we took it down”.

ArgumentTypeMeaning
idID!No description.
inputReviewModerationInput!No description.

ReviewPayload!

Reply publicly. The reply is shown beneath the review, naming the shop.

ArgumentTypeMeaning
idID!No description.
bodyString!No description.

MetaobjectDefinitionPayload!

No description.

ArgumentTypeMeaning
inputMetaobjectDefinitionInput!No description.

MetaobjectDefinitionPayload!

Change a definition. type cannot change — it is what every instance is keyed by, and what the Storefront API queries.

ArgumentTypeMeaning
idID!No description.
inputMetaobjectDefinitionInput!No description.
ifVersionVersionNo description.

MetaobjectDefinitionPayload!

Delete a definition and every instance under it. Refused with IN_USE unless deleteInstances.

ArgumentTypeMeaning
idID!No description.
deleteInstancesBoolean · default falseNo description.

MetaobjectPayload!

No description.

ArgumentTypeMeaning
typeString!No description.
inputMetaobjectInput!No description.

MetaobjectPayload!

No description.

ArgumentTypeMeaning
idID!No description.
inputMetaobjectInput!No description.
ifVersionVersionNo description.

MetaobjectPayload!

No description.

ArgumentTypeMeaning
idID!No description.

PostPayload!

A draft post, with whatever photos and products it has so far. Publishing is a separate step.

ArgumentTypeMeaning
inputPostInput!No description.

PostPayload!

Change a post: the fields sent, each list replaced whole. A published post must stay publishable (one to ten photos, all READY), or the change is refused.

ArgumentTypeMeaning
idID!No description.
inputPostInput!No description.
ifVersionVersionNo description.

PostPayload!

Put a post on the page, or back on it after hiding, in its old place. LIST_SIZE with no photo; INVALID_STATE, naming the photos, while any is not yet READY.

ArgumentTypeMeaning
idID!No description.
ifVersionVersionNo description.

PostPayload!

Take a post off the page; it can be published again.

ArgumentTypeMeaning
idID!No description.

PostPayload!

Keep a published post at the top of the page. At most three at once: OUT_OF_RANGE beyond that.

ArgumentTypeMeaning
idID!No description.

PostPayload!

Stop keeping a post at the top of the page.

ArgumentTypeMeaning
idID!No description.

PostDeletePayload!

Delete a post, for good: it leaves the page and every list.

ArgumentTypeMeaning
idID!No description.

ThemeAcquirePayload!

Take a free theme from the theme store.

The shop owns it from now on, with no payment and no invoice, and may install it with themeInstall. Taking one the shop already owns answers what it already has, so pressing twice is safe.

Errors, on themeHandle: INVALID_STATE with params.reason PAID for a theme with a price, which themePurchase buys, or AWAITING_PAYMENT while a purchase of it waits for its invoice to be paid; NOT_FOUND for a theme that is not listed.

ArgumentTypeMeaning
themeHandleString!No description.

ThemePayload!

Install a theme the shop owns.

The newest build of it, or themeVersion. Only a theme the shop owns — taken free with themeAcquire, or bought and paid for with themePurchase: anything else is NOT_ENTITLED on themeHandle, with params.reason NOT_OWNED.

Does not publish by default: installing and publishing in one step replaces a live storefront with an unconfigured one, which merchants do once and never again. A hub theme is the platform’s and can’t be installed: INVALID on themeHandle.

Errors: NOT_FOUND on themeHandle for a theme with no build to install, and on themeVersion for a build that doesn’t exist; INVALID_STATE with params.reason RETIRED for a build no longer installed; TAKEN on themeHandle when the shop already has that build installed.

ArgumentTypeMeaning
inputThemeInstallInput!No description.

ThemeSettingsPayload!

Save the merchant’s draft settings.

A deep merge, not a replacement: the builder saves one section at a time, and a whole-document replace would make every save a race between two open tabs. Section lists within a template are replaced, because order is meaningful and merging an ordered list has no unambiguous meaning.

Settings the theme does not declare come back in unknownSettingKeys rather than being silently dropped — usually a builder running against a theme that has since been upgraded.

ArgumentTypeMeaning
idID!No description.
inputThemeSettingsUpdateInput!No description.

ThemePayload!

Make the draft live, atomically.

The previous document is kept, so themeRollback is one operation rather than an undo history.

ArgumentTypeMeaning
idID!No description.
ifVersionVersionNo description.

ThemePayload!

Put back the previously published settings. Refused when there are none.

ArgumentTypeMeaning
idID!No description.

ThemePreviewPayload!

Mint a shareable link that renders the draft as the storefront would.

So a merchant can get an opinion without publishing. The theme is told preview: true and must not emit analytics or fire pixels.

ArgumentTypeMeaning
idID!No description.
expiresInHoursInt · default 24No description.

ThemeUpgradePayload!

Move to a newer build of the same theme: toVersion, or the newest.

Settings survive: they live outside the image, which is the whole reason an upgrade does not destroy customization. Migrations the manifest declared are applied and reported back, and everything the merchant had that the new build no longer declares is kept in the document and named in notCarriedOver, never silently discarded.

The live theme is never upgraded in place. Upgrading the published theme installs the new build beside it as an unpublished copy carrying its draft, and leaves the live one exactly as it was; upgradedFromId says so. Publishing the copy is the merchant’s say. An unpublished theme is upgraded where it is.

Errors: INVALID_STATE on toVersion with params.reason NOT_NEWER for a build no newer than the installed one, or RETIRED; NOT_FOUND for a build that doesn’t exist; TAKEN when the copy’s build is already installed.

ArgumentTypeMeaning
idID!No description.
toVersionStringNo description.

ThemePayload!

Remove a theme. Refused with IN_USE while it is the published one.

ArgumentTypeMeaning
idID!No description.

ThemePayload!

Place an app’s block inside a theme section.

ArgumentTypeMeaning
themeIdID!No description.
inputThemeAppBlockInput!No description.

ThemePayload!

No description.

ArgumentTypeMeaning
themeIdID!No description.
blockIdID!No description.

CampaignPayload!

No description.

ArgumentTypeMeaning
inputCampaignInput!No description.

CampaignPayload!

No description.

ArgumentTypeMeaning
idID!No description.
inputCampaignInput!No description.
ifVersionVersionNo description.

CampaignSendPayload!

Send it, or schedule it.

idempotencyKey is required and is the most load-bearing one on this API: a retried send messages twelve thousand people twice and bills for both.

Errors: NOT_ENTITLED when credit is short, with params.creditsNeeded and params.creditsRemaining; INVALID_STATE when the template is still awaiting the provider’s approval, which is how a Nowruz campaign misses Nowruz.

ArgumentTypeMeaning
idID!No description.
idempotencyKeyString!No description.

CampaignPayload!

Stop a send in progress.

Best-effort: messages already handed to the provider are gone. The campaign becomes PARTIALLY_SENT and results says who was reached.

ArgumentTypeMeaning
idID!No description.

CampaignSendPayload!

Resume a campaign that stopped for want of credit.

Sends only to those not already reached, which is why PARTIALLY_SENT records who was.

ArgumentTypeMeaning
idID!No description.
idempotencyKeyString!No description.

MessageTemplatePayload!

No description.

ArgumentTypeMeaning
inputMessageTemplateInput!No description.

MessageTemplatePayload!

Change a template.

lineType is ignored for a TRANSACTIONAL one, which always rides a service line. An order confirmation on a promotional line reaches three buyers in ten, and the API declines to let a merchant do that to themselves.

ArgumentTypeMeaning
idID!No description.
inputMessageTemplateInput!No description.
ifVersionVersionNo description.

MessageTemplateTestPayload!

Send one message to one of the shop’s own staff, to check a template before a campaign.

Only to the shop’s own people. phone must be the number an active member of the shop’s staff signs in with; any other number — a customer’s, a stranger’s, a suspended member’s — is refused, so a test is never a way to text somebody who did not agree to it. It goes as a test on the promotional line, as the marketing it checks, and asks no customer’s consent because it reaches no customer.

variables fills every placeholder with a sample value, by the name the body uses (order_number, not {{ order_number }}). A placeholder left without a value is refused rather than sent with a blank.

Sent and charged once per press. idempotencyKey names the press: the same key with the same template, phone and variables answers what the first call did and sends and charges nothing more, so a double tap or a retried request is one message. A new press is a new key. A test no provider carried is given back, as every text is.

Errors: REQUIRED on idempotencyKey when it is blank; IDEMPOTENCY_CONFLICT on idempotencyKey for a key already used for another test; INVALID on phone when it is not a mobile number, or with params.reason NOT_STAFF when it is not an active staff member’s; REQUIRED on variables with params.missing naming the empty placeholders; NOT_ENTITLED when credit is short (params.creditsNeeded, params.creditsRemaining) or the shop has no promotional line (params.lineType PROMOTIONAL); INVALID_STATE when the provider has not approved the body; INVALID_STATE on phone with params.reason SUPPRESSED (the number blocked promotional texts) or REFUSED when the courier would not take it; INVALID_STATE on idempotencyKey with params.reason EXPIRED for a press left unfinished for over an hour. Nothing is sent or charged then.

ArgumentTypeMeaning
idID!No description.
phoneString!No description.
variables[MessageTemplateVariableInput!]No description.
idempotencyKeyString!No description.

AutomationPayload!

No description.

ArgumentTypeMeaning
inputAutomationInput!No description.

AutomationPayload!

No description.

ArgumentTypeMeaning
idID!No description.
inputAutomationInput!No description.
ifVersionVersionNo description.

AutomationPayload!

No description.

ArgumentTypeMeaning
idID!No description.

OrderTextSettingsPayload!

Switch Kaladan’s automatic order texts on or off — “your order was cancelled” and “your receipt was rejected” (see SmsBalance.orderTexts). A field left out is unchanged. Both are on until a merchant switches one off; read when a text is due, so switching one off stops the next one.

ArgumentTypeMeaning
inputOrderTextSettingsInput!No description.

SavedReportPayload!

Keep a report, optionally scheduled.

A weekly SMS of six numbers is the report most likely to be read by a merchant who opens the admin twice a month.

ArgumentTypeMeaning
inputSavedReportInput!No description.

SavedReportPayload!

No description.

ArgumentTypeMeaning
idID!No description.
inputSavedReportInput!No description.
ifVersionVersionNo description.

SavedReportPayload!

No description.

ArgumentTypeMeaning
idID!No description.

JobPayload!

Export a report to a file.

Returns a Job of kind REPORT_EXPORT; the file arrives at Job.resultUrl when it completes, which needs READ_ANALYTICS. Exports are not capped at the query limit — an accountant wants the whole year, and truncated on a screen is not an answer they can file — so limit is not read: the file holds every row of the whole period, a time series oldest first and anything else ranked by the first measure, and a last row of totals. comparison is not read either.

The columns are the Reports page’s: the grouping, then each measure, headed and worded in the shop’s language. Numbers are numbers, money is in the shop’s display unit, and a bucket is dated in the shop’s calendar. CSV is UTF-8 with a byte-order mark, so Excel opens Persian as Persian.

Whole or not at all. A report too large to write — more rows than an export carries — fails the job, with the reason in Job.errors, rather than producing a file missing rows.

ArgumentTypeMeaning
inputReportInput!No description.
formatExportFormat · default "XLSX"No description.

JobPayload!

Send a saved report now, to its own recipients, without waiting for its schedule.

Returns a Job of kind REPORT_SEND, which runs the report as its schedule would — the same recipients, the same numbers — and completes once the report has gone; the jobs page lists it beside the shop’s exports. The report’s lastSentAt moves then, and its next scheduled run stays where it was.

Sent once. idempotencyKey names this press: the same report and key are the same send, so a second press, or a request retried, is answered the same job and the report goes once. A new press is a new key.

Errors: NOT_FOUND for an unknown report; INVALID on id when the report has no schedule, so names nobody to send it to; FORBIDDEN when it carries a measure the caller may not read; REQUIRED on idempotencyKey when it is blank. Nothing is sent then.

ArgumentTypeMeaning
idID!No description.
idempotencyKeyString!No description.

ShopPayload!

Change the shop’s own settings. Partial.

Changing moneyPresentation.unit touches no stored price — amounts are canonical in rial everywhere — but it changes every number a buyer sees, so an admin should confirm rather than treat it as a preference.

ArgumentTypeMeaning
inputShopUpdateInput!No description.
ifVersionVersionNo description.

ShopPayload!

Set the merchant’s legal identity.

Changing nationalId clears its verification and re-queues the Shahkar match: an identifier verified against one number says nothing about another. Until it verifies, official invoices cannot be filed.

ArgumentTypeMeaning
inputBusinessProfileInput!No description.

ShopPayload!

Connect a custom domain.

Returns the DNS records the merchant must create. Certificate issuance is asynchronous and can lag the DNS change by minutes, so a freshly connected domain answers PENDING rather than being broken.

Errors: NOT_ENTITLED, with params.capability CUSTOM_DOMAIN, on a plan without custom domains. The free showcase plan has none, and nor does Starter.

ArgumentTypeMeaning
hostString!No description.

ShopPayload!

Make a domain the canonical one.

Everything else redirects to it. Emitting links against anything else splits the shop’s SEO between two hosts, which for an Iranian shop means splitting its Torob placement.

ArgumentTypeMeaning
idID!No description.

ShopPayload!

No description.

ArgumentTypeMeaning
idID!No description.

StaffInvitationPayload!

Invite somebody onto the shop.

Answers with a link, once, and sends nothing. The inviter copies acceptUrl and sends it however they reach the person — the platform does not message somebody on a merchant’s behalf. Accepting it is the Merchant Account API’s, because the invitee may have no account yet — which is why staff management could not live entirely in a shop-scoped API.

Errors: TAKEN when that number is already staff here, NOT_ENTITLED when the plan’s staff limit is reached, SCOPE_ESCALATION when the role grants more than the inviter holds — nobody may invite somebody more powerful than themselves.

A pending invitation holds a seat. The staff limit counts every member, the owner and the suspended included, and every invitation not yet answered or lapsed — so accepting one is never refused, and the person following a link is never the one told the shop is full. The refusal carries params.meter staff_seats, params.limit, params.used and params.pendingInvitations, how many of used are invitations: revoking one frees its seat as surely as an upgrade does.

ArgumentTypeMeaning
inputStaffInviteInput!No description.

StaffInvitationPayload!

Withdraw an invitation before it is answered.

ArgumentTypeMeaning
idID!No description.

StaffMemberPayload!

Change what a staff member may do.

Refused with SCOPE_ESCALATION when the new role exceeds the caller’s own, and with INVALID_STATE for the last owner — a shop with nobody who can administer it is one only support can rescue.

ArgumentTypeMeaning
idID!No description.
roleIdID!No description.

StaffMemberPayload!

Withdraw access without deleting the record.

Preferred over removal: the audit log stays readable, and a suspended member who returns keeps their history.

ArgumentTypeMeaning
idID!No description.
reasonStringNo description.

StaffMemberPayload!

No description.

ArgumentTypeMeaning
idID!No description.

StaffMemberPayload!

Remove somebody entirely. Their audit entries survive, attributed to them.

ArgumentTypeMeaning
idID!No description.

RolePayload!

Define a role.

A merchant who wants a different «انباردار» makes their own rather than changing what the word means for support and every other shop, which is why built-in roles are read-only.

ArgumentTypeMeaning
inputRoleInput!No description.

RolePayload!

No description.

ArgumentTypeMeaning
idID!No description.
inputRoleInput!No description.

RolePayload!

Delete a role. Refused with IN_USE while anybody holds it.

ArgumentTypeMeaning
idID!No description.

InstalledAppPayload!

Begin installing an app.

Returns a Kaladan page where the merchant approves the scopes it asks for. Nothing is installed until they do.

Errors: NOT_FOUND for an unlisted app, NOT_ENTITLED when the plan does not allow app installs.

ArgumentTypeMeaning
handleString!No description.

InstalledAppPayload!

Begin installing a custom app from the link its developer sent.

A custom app is never listed, so this is how it reaches the one shop it was built for: the link names that shop, and this shop must be it. Returns the approval page, as appInstall does; the page says Kaladan did not review the app.

Errors: NOT_FOUND for a link that is unknown, expired, or names another shop (one answer for the three), TAKEN when the app is already installed.

ArgumentTypeMeaning
linkString!No description.

AppAuthorizationPayload!

Answer an app’s authorization request, which arrives at the admin’s /oauth/authorize naming the app’s client, its registered redirect, its own state and an S256 challenge.

When this shop already granted what the app’s published version asks for, this answers redirectUrl, the app’s redirect carrying a code, its state and the shop. Otherwise it begins an approval and answers approvalToken, for the approval page; accepting that approval answers the redirect. An unknown client, or a redirect the client did not register, is a userError and never a redirect: a browser is only ever sent to an address the app registered.

A custom app arriving here for the first time is refused: it is installed by its link.

ArgumentTypeMeaning
inputAppAuthorizationInput!No description.

AppApprovalPayload!

Approve what an approval asks for: install the app, or move it to the version it asked to be re-approved for.

Four things are written, in order, and a retry completes them: the standing approval, the consent receipt, the installation, and, for a request the app started, a code for its redirect. Approving twice answers what the first approval did. The person approving must hold every scope the version asks for; one who does not is told which, and that an owner can approve.

redirectUrl is where the browser goes next: the app’s redirect with a code, for a request the app started; the app’s own address naming the shop, for an install started here, where the app then asks for a code itself.

ArgumentTypeMeaning
tokenString!No description.

AppApprovalPayload!

Decline an approval. Nothing is installed or changed. A request the app started is sent back to its redirect with error=access_denied.

ArgumentTypeMeaning
tokenString!No description.

AppChargeAcceptPayload!

Accept a charge an app asked for, and pay for it.

The merchant pays at acceptance, with VAT on top. Accepting raises Kaladan’s invoice for the charge — its first period, or the whole of a one-time charge — and answers paymentUrl, the bank’s page for the invoice’s totalAmount, as platformInvoicePay does; the way back is the invoice’s page in this admin. The charge becomes active when that payment verifies, not now: until then it is pending. A recurring charge renews on its own cycle, each period an invoice of its own, and a renewal left unpaid makes that charge past due and nothing else.

With a trial nothing is paid now: the charge becomes active within moments, once billing has the trial on record, its first period’s invoice is raised before the trial ends, and returnUrl takes the merchant back to the app.

Accepting twice answers the first, with the same key or a new one: no second invoice, and the attempt already waiting at the bank rather than a second one. Once the invoice is paid, accepting again answers the charge and its invoice with no paymentUrl and no error: there is nothing to pay.

Errors: NOT_FOUND on token for one that is unknown, lapsed unanswered, or another shop’s. INVALID_STATE on token for a charge that was declined, or ended. IDEMPOTENCY_CONFLICT on idempotencyKey for a key already used to accept another charge. REQUIRED on idempotencyKey when it is empty. INVALID_STATE on token with params.reason: PAYMENT_CONFIRMING while a payment already made is still being confirmed, and VOID when the charge’s invoice was voided because the charge lapsed unpaid or ended.

ArgumentTypeMeaning
tokenString!No description.
idempotencyKeyString!No description.

AppChargeDeclinePayload!

Decline a charge an app asked for. Nothing is billed, and the app is told through its charge’s status; it decides what declining means for what it offers. returnUrl takes the merchant back to the app.

Declining twice answers as the first did. Errors: NOT_FOUND on token for one that is unknown, lapsed unanswered, or another shop’s, as for appChargeAccept; INVALID_STATE on token for a charge already accepted.

ArgumentTypeMeaning
tokenString!No description.

InstalledAppPayload!

Re-approve an app that has published a version asking for more.

Returns the same approval page. Until it is done the app runs on its old grant, which is why nothing breaks while a merchant thinks about it.

ArgumentTypeMeaning
idID!No description.

InstalledAppPayload!

Remove an app.

Every token it holds on this shop is revoked before this answers, and its next call is refused. app/uninstalled is sent to it at once, and shop/redact follows in 48 hours — the window in which an accidental uninstall can be undone without the app having discarded anything. A reinstall inside the window withdraws the shop/redact.

Any recurring charge stops at the end of the period already paid for.

ArgumentTypeMeaning
idID!No description.

SubscriptionChangePayload!

Move the shop to another plan.

WRITE_BILLING — the one scope no app can hold. Nothing installed should be able to put a merchant on a more expensive plan.

Returns a paymentUrl, and the change takes effect when that payment verifies. Prepaid rails mean there is no charge-and-confirm: there is the bank’s own page and the same verify-and-reconcile path every other payment takes.

Errors: INVALID_STATE when a downgrade has blockers — a merchant with four staff cannot drop to a plan allowing two without removing somebody, and finding that out after paying is the worst possible moment.

ArgumentTypeMeaning
planHandleString!No description.
intervalBillingInterval!No description.
idempotencyKeyString!No description.

SubscriptionChangePayload!

Get a payment link for the current term’s renewal.

Renewal is explicit here rather than silent, because card-on-file recurring billing does not exist on these rails. A merchant renews by paying, and this is where they are sent to do it.

ArgumentTypeMeaning
idempotencyKeyString!No description.

PlatformInvoicePayPayload!

Pay one of Kaladan’s invoices: where to send the merchant to do it.

WRITE_BILLING, as every payment to Kaladan is. The bank’s own page, through Kaladan’s terminal, for the invoice’s totalAmount, and back to the invoice’s page in this admin when it is done. The invoice is paid when that payment verifies, not now.

One invoice has one payment waiting at a time. Repeating the call — with the same key, or after a dropped connection with a new one — answers the attempt already waiting, the same page, and never a second authority at the bank. A new attempt starts only once the last one was refused, or lapsed before the merchant reached the bank.

Errors: NOT_FOUND on id for an invoice this shop does not have. INVALID_STATE on id, with params.reason: PAID or VOID when there is nothing to pay, and PAYMENT_CONFIRMING while a payment already made is still being confirmed — paying again then is paying twice. REQUIRED on idempotencyKey when it is empty.

ArgumentTypeMeaning
idID!No description.
idempotencyKeyString!No description.

StoreOpenPayload!

Open the shop’s store: “Open my store”.

A shop starts on the free showcase plan, with its showcase live on kaladan.shop and its store locked. This places it on Starter with the trial days the plan offers, free, and the store answers at once. From then on billing runs as for any plan: the trial ends, the merchant pays or the store closes, and the showcase stays.

Once per shop. A shop that has had a trial, or holds a paid plan, is refused INVALID_STATE. Paying for a plan is subscriptionChange, which needs no trial first. Repeating the call with the same key answers the first result.

ArgumentTypeMeaning
idempotencyKeyString!No description.

OnboardingPayload!

Mark a setup step as skipped, so it stops being suggested.

Kept rather than deleted: a merchant who skipped e-Namad and later wants it should find it where they left it, not have to rediscover that it exists.

ArgumentTypeMeaning
stepOnboardingStepKey!No description.

OnboardingPayload!

No description.

ArgumentTypeMeaning
stepOnboardingStepKey!No description.

NotificationPayload!

No description.

ArgumentTypeMeaning
ids[ID!]!No description.

NotificationPayload!

Mark everything read. What the “clear all” button calls.

ShippingProfilePayload!

Create a profile for products that do not ship like the rest — furniture, anything fragile, anything a courier surcharges.

Every shop has a default profile already; this is for the exceptions.

ArgumentTypeMeaning
inputShippingProfileInput!No description.

ShippingProfilePayload!

No description.

ArgumentTypeMeaning
idID!No description.
inputShippingProfileInput!No description.
ifVersionVersionNo description.

ShippingProfilePayload!

Delete a profile. Its products fall back to the default one.

ArgumentTypeMeaning
idID!No description.

ShippingZonePayload!

Create a zone.

An empty provinceCodes means everywhere the profile’s other zones do not cover, which is how “the rest of the country” is expressed without listing thirty entries.

ArgumentTypeMeaning
inputShippingZoneInput!No description.

ShippingZonePayload!

No description.

ArgumentTypeMeaning
idID!No description.
inputShippingZoneInput!No description.
ifVersionVersionNo description.

ShippingZonePayload!

Delete a zone. Refused with IN_USE when it is the only one covering a province the shop has open orders in.

ArgumentTypeMeaning
idID!No description.

ShippingRatePayload!

Create a rate.

Errors: REQUIRED for a banded kind with no bands, INCONSISTENT when the bands leave a gap — a cart falling in one would be quoted nothing — NOT_FOUND for a carrier that is not integrated, since a carrier the platform cannot call is one the merchant prices by hand.

ArgumentTypeMeaning
inputShippingRateInput!No description.

ShippingRatePayload!

No description.

ArgumentTypeMeaning
idID!No description.
inputShippingRateInput!No description.
ifVersionVersionNo description.

ShippingRatePayload!

Switch a rate on or off, by isActive, without deleting it — a seasonal courier, off out of season and on again when it returns.

ArgumentTypeMeaning
idID!No description.
isActiveBoolean!No description.

ShippingRatePayload!

No description.

ArgumentTypeMeaning
idID!No description.

MoadianInvoicePayload!

File a برگشت از فروش against an accepted invoice, for goods that came back.

Created automatically when a refund is recorded against an order whose invoice was accepted; this is the manual route for the cases the platform cannot infer. Type is inherited from the original — a return against a type-1 sale is type 1, subject برگشتی.

Errors: INVALID_STATE unless the original is ACCEPTED, OUT_OF_RANGE when the returned amount exceeds what the original invoiced.

ArgumentTypeMeaning
invoiceIdID!No description.
inputMoadianReturnInput!No description.

MoadianInvoicePayload!

File an ابطالی against an accepted invoice — a sale that did not happen.

Distinct from a return, where it did happen and the goods came back. The tax system treats them differently and so does an auditor.

ArgumentTypeMeaning
invoiceIdID!No description.
reasonString!No description.

ShopPayload!

Record a trust seal the merchant has been issued — نماد اعتماد or ساماندهی.

The application happens on the issuer’s own site; this is where the certificate comes back to. Until it does, the seal does not appear on the storefront, Torob will not crawl the shop, and most gateways will not activate — the three things e-Namad exists to unlock.

An e-Namad is checked against its record at the issuer, and shown on the storefront once verified and until it lapses. A ساماندهی is recorded and not checked yet, so it is not shown. GUILD and OTHER are refused (ENUM on input.kind): nothing can verify them.

ArgumentTypeMeaning
inputTrustCredentialInput!No description.

ShopPayload!

No description.

ArgumentTypeMeaning
kindTrustCredentialKind!No description.

TaxConfigurationPayload!

Install the electronic seal certificate that سامانه مودیان filings are signed with.

The expiry is read from the certificate rather than typed, so it cannot be wrong — and it is the field whose lapse silently breaks every filing, which is why certificate.expiring is already in the notification vocabulary.

ArgumentTypeMeaning
inputTaxCertificateInput!No description.

ShopPayload!

Turn test mode on or off.

Orders placed while it is on are marked Order.test and excluded from every report, payout and tax filing. A merchant walks their own storefront and checks out for real, which is what PLACE_TEST_ORDER asks of them.

Turning it off does not convert the test orders. They stay test forever, because a report that changed retroactively is worse than one that was always incomplete. A checkout or draft already started keeps what it started as.

ArgumentTypeMeaning
enabledBoolean!No description.

SubscriptionChangePayload!

Buy SMS credit.

Metered per segment, and Persian text is UCS-2, so a segment is about seventy characters. Sold like everything Kaladan sells: this raises Kaladan’s invoice for the credit — the segments at the rate in force, rounded up to a whole rial, with VAT on top — and answers invoice and paymentUrl, the bank’s page for the invoice’s totalAmount, as platformInvoicePay does; the way back is the invoice’s page in this admin. The credit lands when that payment verifies, not now, and an invoice left unpaid lapses and grants nothing. Repeating the call with the same key answers the same invoice and the attempt already waiting at the bank.

Errors: OUT_OF_RANGE on segments below one or above 1,000,000. REQUIRED on idempotencyKey when it is empty.

WRITE_BILLING because it is money to Kaladan rather than the merchant’s own commerce — the same reason no app can change a plan.

ArgumentTypeMeaning
segmentsInt!No description.
idempotencyKeyString!No description.

SubscriptionChangePayload!

Buy a paid theme.

Sold like everything Kaladan sells: this raises Kaladan’s invoice for the theme — the listing’s price, with VAT on top — and answers invoice and paymentUrl, the bank’s page for the invoice’s totalAmount, as platformInvoicePay does; the way back is the invoice’s page in this admin. The theme is the shop’s when that payment verifies, not now: until then ThemeStoreListing.acquisition is AWAITING_PAYMENT and themeInstall refuses it. An invoice left unpaid lapses, and the purchase with it. One-off rather than recurring, and it covers every version of the theme. It does not touch the plan.

Repeating the call answers the same invoice and the attempt already waiting at the bank — with the same key, or with another while the first purchase still waits for payment, so a merchant who lost the page never pays twice.

Errors, on themeHandle: TAKEN when the shop already owns the theme; INVALID_STATE with params.reason FREE for a free theme, which themeAcquire takes instead, and NOT_SOLD for a paid theme Kaladan does not sell; NOT_FOUND for a theme that is not listed. On idempotencyKey: REQUIRED when it is empty, IDEMPOTENCY_CONFLICT when it bought another theme, and INVALID_STATE with params.reason VOID when this purchase’s invoice lapsed (buying again is a new key) or PAYMENT_CONFIRMING while a payment is being confirmed.

WRITE_BILLING because it is money to Kaladan rather than the merchant’s own commerce.

ArgumentTypeMeaning
themeHandleString!No description.
idempotencyKeyString!No description.

StorefrontTokenPayload!

Issue a new storefront token and stop an old one.

The token ships inside a theme’s JavaScript and inside a <script> tag on somebody else’s website, so it is to be assumed known to everyone — which is only survivable because it can be rotated.

The old token keeps working for graceHours so a cached theme does not break the moment the new one is issued. Zero cuts it off immediately, which is what a merchant does when it has actually leaked.

ArgumentTypeMeaning
idID!No description.
graceHoursInt · default 24No description.

StorefrontTokenPayload!

Set which origins may use a storefront token.

The gateway enforces this on the CORS preflight. Empty means the shop’s own domains only, which is the right default and the one a buy button on a partner’s site needs widened.

ArgumentTypeMeaning
idID!No description.
origins[String!]!No description.

TranslationPayload!

Write translations for one resource in one locale.

Partial: an omitted field is unchanged, and null clears it back to the primary locale — the same rule every other update on this surface follows.

A translation is never machine-generated by the platform. A shop selling in Arabic that gets a machine translation it did not ask for is a shop whose product names are subtly wrong in a language its staff cannot check.

What a translation was made from is read, never sent. The platform reads each field’s text in the shop’s default locale from the resource itself at the moment of the write and keeps it beside the translation, so outdated has something true to be compared against. A caller cannot supply it: a client that sent the text it believed it was translating would let a stale screen file a translation as current.

Preparing is not publishing. Any locale may be written, published or not and on any plan, so a merchant can translate a catalogue before showing it. Publishing a locale is shopUpdate’s publishedLocales, which needs MULTI_LOCALE to add one.

Refused, changing nothing (each field names the entry by its position):

  • a key the resource’s type does not translate → INVALID on input.N.key;
  • a key named twice → INVALID on the second input.N.key;
  • a value for a field whose default-locale text is empty, which has nothing to translate → INVALID on input.N.value;
  • an id naming no translatable resource of this shop → NOT_FOUND on resourceId;
  • a locale that is not a well-formed BCP 47 tag → INVALID on locale.

A value for an HTML field is sanitized as the field it translates is, so a translated description can carry no script the original could not.

Gated on READ_PRODUCTS as well, because the write reads a product’s text to keep beside the translation; see Query.translations.

translations in the payload is the resource’s fields after the write, as Query.translations reads them.

ArgumentTypeMeaning
resourceIdID!No description.
localeLocale!No description.
input[TranslationInput!]!No description.

FeedConfigurationPayload!

Configure a feed, or change one.

Creates the sales channel behind it when channelId is omitted, so a merchant turning on Torob does not first have to understand channels.

Which products go is Publication on that channel — the same mechanism as every other channel — and filters only narrows it. Refused with INVALID_STATE when the target has a prerequisite the shop has not met, with params.unmetPrerequisites naming which: a Torob feed from a shop without e-Namad generates a file nobody reads.

Errors: NOT_FOUND for an unknown target, INVALID for a format the target does not accept, INCONSISTENT for a mapping whose sourceField is not a path this schema can resolve.

NOT_ENTITLED on ["input", "channelId"] when creating the channel would pass the plan’s sales channel limit — params.meter sales_channels, with params.limit and params.used, which counts active channels, the online store among them. The field is the way out short of an upgrade: name a channel the shop already has, and nothing is created.

ArgumentTypeMeaning
inputFeedConfigurationInput!No description.
ifVersionVersionNo description.

FeedConfigurationPayload!

Stop publishing to a target and delete its configuration.

The channel and its publications survive, because a merchant turning Torob off for a month should not have to re-pick four hundred products to turn it back on.

ArgumentTypeMeaning
idID!No description.

FeedGeneratePayload!

Regenerate now, rather than waiting for the schedule.

Returns the job, of kind JobKind.FEED_GENERATION. What a merchant presses after fixing the mapping that dropped four hundred products.

ArgumentTypeMeaning
idID!No description.

FeedConfigurationPayload!

Issue a new feed URL and stop the old one immediately.

The URL is the only thing protecting a shop’s full catalogue and pricing from anyone who has it, so it is rotatable — and the merchant must re-register the new one with the target, which the mutation’s own doc says because forgetting is how a feed goes quietly stale.

ArgumentTypeMeaning
idID!No description.

MetafieldDefinitionPayload!

No description.

ArgumentTypeMeaning
inputMetafieldDefinitionInput!No description.

MetafieldDefinitionPayload!

Change a definition. type and ownerType cannot change — either would reinterpret every value already stored.

Turning on storefrontVisible publishes every existing value under it. That is an act with a blast radius, and an admin should confirm it as one.

ArgumentTypeMeaning
idID!No description.
inputMetafieldDefinitionInput!No description.

MetafieldDefinitionPayload!

Delete a definition, and with it every value stored under it.

deleteValues must be true when valueCount is above zero. Requiring it explicitly means nobody discards a thousand values by clicking through a dialogue.

ArgumentTypeMeaning
idID!No description.
deleteValuesBoolean · default falseNo description.

LocationPayload!

No description.

ArgumentTypeMeaning
nameString!No description.
addressAddressInput!No description.
fulfillsOnlineOrdersBoolean · default trueNo description.

LocationPayload!

No description.

ArgumentTypeMeaning
idID!No description.
nameStringNo description.
addressAddressInputNo description.
fulfillsOnlineOrdersBooleanNo description.
pickupEnabledBooleanNo description.
pickupInstructionsStringNo description.
ifVersionVersionNo description.

LocationPayload!

Deactivate a location. Its stock must be moved first, or the mutation is refused with IN_USE.

ArgumentTypeMeaning
idID!No description.