Skip to content

API · order ​

Trang sinh tự động

Parse từ schema.graphql (SDL backend export) bằng parser graphql. Mô tả và quyền lấy nguyên văn từ description trong SDL.

13 query · 5 mutation.

Query ​

adminOrder ​

U19-P2-11. One order for the Admin detail. Requires order.read (OPS-02 ALL; M-02 TEAM: attributed orders of a managed team). Full phone, street line and note only for customer readers; otherwise masked. Missing or out of scope = not_found.

query · quyền: order.read

Tham sốKiểuMặc địnhMô tả
idID!

Trả về AdminOrderDetail!

FieldKiểuMô tả
idID!
codeString!
campaignTypeOrderCampaignType!
createdAtDateTime!
approvedAtDateTimeNgay duyet (order confirmed); null until then.
cancelLockedAtDateTimeNgay khoa huy = the confirmation instant; null until then.
sourceAdminOrderSource!
campaignAdminOrderCampaignBlock!
statusCardsAdminOrderStatusCards!
lines[AdminOrderDetailLine!]!
piiAdminOrderPii!
customerAdminOrderCustomerBlock!
deliveryAdminOrderDelivery!
paymentAdminOrderPaymentBlock!U19-P2-12. Khoi Thanh toan (order.read, no Finance permission needed).
shipmentAdminOrderShipmentBlockU19-P2-12. Khoi Giao hang of a Group Buy order; null while it has no shipment (and for Recurring).
cycleShipments[AdminOrderShipmentBlock!]!U19-P2-12. Recurring: the shipment of each cycle that has one, by cycle; empty for Group Buy.
rewardsAdminOrderRewards!U19-P2-12. Diem thuong cua don: the reward entries (moc nhan hang, vong quay, Affiliate, online bonus).
versionInt!U19-R19. Same as AdminOrder.version of the list (orders.version): the expectedVersion of the order commands.
pointAdjustmentLinkAdminOrderPointAdjustmentLinkU19-R19. Same as AdminOrder.pointAdjustmentLink of the list: set only for an order (or a cycle) in Hoàn hàng.
actionsAdminOrderActions!U19-R19. Buttons for this caller (grants + order state), decided by the server.
recurringAdminOrderRecurringU19-P2-13. Mua định kỳ: progress, values and the cycles table; null for Group Buy.
depositDueAtDateTimePAF (S1): Hạn thanh toán cọc = payment.deposit_due_at of the order's creation instant (the same window as Order.depositDueAt).
excessDeposits[OrderExcessDeposit!]!PAF (S2b): Cọc dư of this order, one entry per case (oldest first), same as AdminOrder.excessDeposits.
excessDepositTotalVndIntPAF (S2b): the sum of excessDeposits; null when the order has no case.
returnOutcomes[OrderReturnOutcome!]!#479 B. The same as AdminOrder.returnOutcomes, on the order detail (adminOrder). Requires order.read.
excessRefundRequests[OrderExcessRefundRequest!]!#479 C. The same as AdminOrder.excessRefundRequests, on the order detail (adminOrder). Requires order.read.

adminOrderHistory ​

Order history of every change (order status, payment, delivery, Pi-Point, notifications) from the append-only activity log (U19-P1-09), newest first. Requires order.read at TEAM/ALL (same guard as orderEvents; a buyer is refused here). Filters combine with AND; cycleNo null = all. A missing or out-of-scope order is not_found.

query · quyền: order.read

Tham sốKiểuMặc địnhMô tả
orderIdID!
categoryOrderHistoryCategory
actorKindOrderHistoryActorKind
cycleNoInt
pageInt
pageSizeInt

Trả về OrderHistoryPage!

FieldKiểuMô tả
items[OrderHistoryEntry!]!
pageInt!
pageSizeInt!
totalInt!Record count of the same filters.
sourceStatusSourceStatus!
missingSources[OrderHistoryMissingSource!]!

adminOrders ​

Staff order list/search, newest first. Requires order.read (OPS-02 ALL; M-02 TEAM: orders attributed to a Sale currently in the caller's team). U19-P2-10 (Word B024.R02): keyword = order code / customer name (partial, any case, diacritics ignored) / phone (customer readers only); filters AND; dates are Vietnam days YYYY-MM-DD (inclusive), from > to = validation_failed reason date_range; pageSize 1..500, default 50 (50/100/500). PAF (S3): hasExcessDeposit / hasFailedDeliveryCycle filter as adminOrderTabCounts does, so the tab counts match.

query · quyền: order.read

Tham sốKiểuMặc địnhMô tả
keywordString
campaignTypeOrderCampaignType
campaignStatusCampaignAxisFilter
orderStatusOrderAxis
paymentAxisPaymentAxis
shippingStatusShippingStatus
paymentMethodPaymentMethodFilter
createdOnFromString
createdOnToString
approvedOnFromString
approvedOnToString
campaignIdID
statusOrderState
customerIdID
asOfDateTimeLeave out orders created after this instant (stable pages).
searchString
searchByOrderSearchBy
paymentStatusOrderPaymentStatus
deliveryStatusOrderDeliveryStatus
campaignStateCampaignState
methodAdminOrderMethod
hasExcessDepositBooleanPAF (S3): true = only orders with at least one excess deposit case (Cọc dư), Mua chung and Mua định kỳ.
hasFailedDeliveryCycleBooleanPAF (S3): true = only Mua định kỳ orders with a cycle whose delivery failed for good (DELIVERY_FAILED, no attempt left) and is not paid in full.
pageInt
pageSizeInt

Trả về AdminOrderPage!

FieldKiểuMô tả
items[AdminOrder!]!
pageInt!
pageSizeInt!
totalInt!

adminOrderTabCounts ​

U19-P2-10. Tab counts (Tat ca / Mua chung / Mua dinh ky) of adminOrders under the same search and filters, the type tab excluded. Requires order.read (OPS-02 ALL; M-02 TEAM). Phone search: customer readers only.

query · quyền: order.read

Tham sốKiểuMặc địnhMô tả
keywordString
campaignIdID
campaignStatusCampaignAxisFilter
orderStatusOrderAxis
paymentAxisPaymentAxis
shippingStatusShippingStatus
paymentMethodPaymentMethodFilter
createdOnFromString
createdOnToString
approvedOnFromString
approvedOnToString
asOfDateTime
hasExcessDepositBooleanPAF (S3): the same filter as adminOrders.hasExcessDeposit.
hasFailedDeliveryCycleBooleanPAF (S3): the same filter as adminOrders.hasFailedDeliveryCycle.

Trả về AdminOrderTabCounts!

FieldKiểuMô tả
allInt!
groupBuyInt!
recurringInt!

groupQuote ​

Server quote for one Group Buy product. Requires order.create (U-02, own).

query · quyền: order.create

Tham sốKiểuMặc địnhMô tả
inputGroupQuoteInput!

Trả về OrderQuote!

FieldKiểuMô tả
idID!
versionInt!Send it back as quoteVersion when submitting.
statusOrderQuoteStatus!
campaignIdID!
campaignTypeOrderCampaignType!
campaignVersionInt!
policyVersionIdID!
cycleCountInt!
lines[OrderLine!]!
priceKindOrderPriceKind!
v0VndVndAmount!
depositRateBpInt!
depositVndVndAmount!Mua chung: cash deposit = (v0Vnd - pointsValueVnd) x depositRateBp / 10000 on Khách phải trả (U19-P2-36), rounded UP to 1 VND (G1S BR-APP-06; orders created before it keep half-up). Mua định kỳ: v0Vnd x depositRateBp until U19-P2-37.
pointCapBpInt!The campaign's Pi-Point payment cap in basis points (0 = Pi-Point cannot be used).
maxPointsPointAmount!floor(cap x V0 / rate); 0 when pointsUnavailableReason is set. Available points are checked by PiPoint at redemption.
pointsUnavailableReasonPointsUnavailableReason#377 PiPoint port: why points cannot be used in this environment (the quote then uses 0 points: hide the option); null when they can.
usablePointsPointAmount!G1S (BR-DC-03, P5): min(maxPoints, the buyer's available Pi-Point balance); 0 when points cannot be used. The buyer uses all of it by default, no input.
pointsUsedPointAmount!
pointsValueVndVndAmount!PI_POINT tender value (points x rate snapshot), taken off Khách phải trả = v0Vnd - pointsValueVnd.
pointRateRateSnapshot!
milestones[OrderMilestone!]!Delivery milestones to choose from (Group Buy).
remainingCapVndIntPAF (S6, DEC-PAF-12): Còn lại tối đa khi chốt = the order value at the current tier - pointsValueVnd - depositVnd, from the server (the App shows it as is, never computes it); null when unknown.
createdAtDateTime!
expiresAtDateTime!After this instant the quote cannot be submitted; request a new one.
referrerOrderReferrerXem trước. Đơn được ghi nhận lúc tạo; có thể khác nếu có lượt mở link mới giữa quote và đặt. Null when nobody would be credited.

myOrderCounts ​

Chip counts of the caller's own orders, same filters as myOrders. Requires order.read (U-01, own).

query · quyền: order.read

Tham sốKiểuMặc địnhMô tả
campaignTypeOrderCampaignType
placedFromDateTime
asOfDateTime

Trả về MyOrderCounts!

FieldKiểuMô tả
allInt!
awaitingDepositInt!
depositedInt!
awaitingPaymentInt!
shippingInt!
completedInt!
cancelledInt!

myOrders ​

The caller's own orders, newest first. Requires order.read (U-01, own).

query · quyền: order.read

Tham sốKiểuMặc địnhMô tả
statusOrderState
campaignTypeOrderCampaignTypeP2-14: Group Buy / Recurring filter (UA-17 AC02).
asOfDateTimeP2-14: leave out orders created after this instant (stable pages).
placedFromDateTimeG2I-P3-02 (O15): only orders created at or after this instant (the 6-month footer); after asOf is validation_failed.
bucketMyOrderBucketG2I-P3-02 (O1, E6): only the orders of this chip, the same rule as myOrderCounts.
campaignProductIdIDPAF (S4, DEC-PAF-04, BR-DC-03): only the caller's orders with a line of this Deal (Campaign Product), for the Bạn đã có đơn cho Deal này popup. Without status and bucket the Đã hủy states (CANCELLED, DEPOSIT_FAILED, FORFEITED) are left out (PAF-P1-11).
pageInt
pageSizeInt

Trả về OrderPage!

FieldKiểuMô tả
items[Order!]!
pageInt!
pageSizeInt!
totalInt!

order ​

One own order; another account's order is not_found. Requires order.read.

query · quyền: order.read

Tham sốKiểuMặc địnhMô tả
idID!

Trả về Order!

FieldKiểuMô tả
idID!
codeString!Business order code, unique and immutable (#298; temporary format PO + 8 A-Z0-9).
stateOrderState!
versionInt!
quoteIdID!
campaignIdID!
campaignTypeOrderCampaignType!
campaignVersionInt!
policyVersionIdID!
committedCycleCountInt!
lines[OrderLine!]!
v0VndVndAmount!
depositRateBpInt!
depositVndVndAmount!
pointCapBpInt!
pointsUsedPointAmount!
pointsValueVndVndAmount!
pointRateRateSnapshot!
finalPriceVndVndAmountNull until the campaign close outcome exists (never a false 0).
remainingVndVndAmountNull until the final price exists (never a false 0).
milestoneOrderMilestone
deliveryAddressOrderDeliveryAddress!Snapshot at order time; profile edits never change it.
quotedAtDateTime!
stateChangedAtDateTime!
createdAtDateTime!
updatedAtDateTime!
depositDueAtDateTime#377 D2: the deposit is due before this instant (createdAt + the governing payment window, Word B056.R02: 24 h); after it the order is Da huy. Null when the order no longer waits for its deposit.
remainingCapVndIntPAF (S6, DEC-PAF-12): Mua chung with the deposit paid and the campaign not closed yet: Còn lại tối đa khi chốt (the order value at the current tier - pointsValueVnd - depositVnd), from the server; null otherwise.
serverTimeDateTime!PAF-P3-12 (R-22): the server's clock when the order was read (DB now() of that read), so the App's countdowns (Hạn thanh toán cọc) run on server time.
participantOrdinalIntNgười thứ n (BR-MC-02 per owner 30/10, DEC-OWN30-S1-ORDINAL): the participant count of the Deal (RECURRING: of the basket) at the instant the deposit is confirmed, this buyer included (real people with a committed order + virtual units, the participantCount rule), fixed then; null before that.
spinOrderSpin!Lucky Wheel facts of the order (never null; NOT_APPLIED when there is nothing to show).
shipments[OrderShipment!]!Own shipments of this order; empty means no shipment yet (UA-19 AC04).
paymentMethodOrderPaymentMethod!U19-P2-21. Remaining payment method (U-04 payment.read, own order).
paymentMethodVersionInt!Version of the choice, the expectedVersion of selectRemainingPaymentMethod (0 = never chosen).
remainingSwitchOrderRemainingSwitchU28-P2-03. After the close: the COD -> ONLINE switch as computed now; null before the close. PAF (S9, DEC-PAF-09): Mua chung too (lockedCycleNos always empty; blockedReason all_cycles_locked = the order is at Đang đóng gói or later), Mua định kỳ per cycle.
shortageCancellationOrderShortageCancellationThe latest supply-shortage cancellation of this order, whole or partial (A-OD-07 AC08).
shortageCancellations[OrderShortageCancellation!]!Every supply-shortage cancellation of this order, newest first (a partial shortage keeps the order alive).
codReturnOrderCodReturnThe RETURN case of this Order when its COD was refused (FU-OIFF01), else null.
statusOrderStatus!
overpaymentVndVndAmountDeposit + points value above the final price (offline case); null until close.
paymentOrderPayment!Own payment section. Requires payment.read (U-04, own).
orderStatusOrderAxis!Stored order status (Word), the same values staff see.
paymentStatusPaymentAxis!Stored payment status (Word, 8 values), the same values staff see.
cancelReasonOrderAxisCancelReasonWhy the order is Da huy (#377 D2, Word closed list, the values staff see); null unless orderStatus is CANCELLED. An unpaid order cancelled at the campaign close reads DEPOSIT_UNPAID_AT_CLOSE (G1S; DEPOSIT_TIMEOUT on older orders).
addressVersionInt!U19-P2-11. Revision of the delivery address. PAF (DEC-PAF-03): the address no longer changes once the order exists.
customerNoteStringU19-P2-11. Ghi chu cua khach entered at order time.
rewards[OrderReward!]!The buyer's own reward entries; empty when the order has none yet.
referrerOrderReferrerThe credited referrer; null when nobody is credited (no link, window expired, own link, locked owner, not assigned yet).
currentCycleOrderCurrentCycleThe current cycle of a Mua định kỳ order; null for Mua chung and when no cycle is open (all delivered, stopped, cancelled).
campaignClosedAtDateTime#412 O-37F: when the campaign closed (the close instant of its outcome); null before the close and for Mua định kỳ.
invitedFriendCountInt!#412 G1-09: Người bạn mời of the buyer who joined this Deal. Always 0 for now (owner 28/10: the rule comes later).
overpaymentCaseOrderOverpaymentCase#412 U-64b: the offline overpayment case of this order; null when there is none. Requires payment.read (U-04, own).
refunds[OrderRefund!]!Own refunds of this order, newest first; empty when nothing is refunded (#302). Requires payment.read (U-04, own).
refundAccountOrderRefundAccount#412 G1-10: where the refund goes, from the latest refund request the buyer sent; null before one. Requires payment.read (U-04, own).

orderCancellationEligibility ​

Server-computed cancellation eligibility of an own order. Requires order.read (U-01, OWN).

query · quyền: order.read

Tham sốKiểuMặc địnhMô tả
orderIdID!

Trả về OrderCancellationEligibility!

FieldKiểuMô tả
orderIdID!
versionInt!
statusOrderState!
campaignTypeCampaignType!
cutoffAtDateTime!Group/basket cutoff (campaign closes_at); the check at submit time is authoritative.
eligibleBoolean!
reasonOrderCancelReason
selfServiceLockedBoolean!True after the cutoff/close: the order is read-only for the buyer.
afterCloseConsequenceOrderAfterCloseConsequenceOnly when selfServiceLocked.
afterClosePolicyRefStringOpen decision behind afterCloseConsequence, e.g. DEC-CP-SKIP.
estimatedRefundOrderCancelRefundEstimateOnly when eligible.

orderEvents ​

Order history, oldest first. Requires order.read (U-01 own, M-02 TEAM).

query · quyền: order.read

Tham sốKiểuMặc địnhMô tả
orderIdID!
pageInt
pageSizeInt

Trả về OrderEventPage!

FieldKiểuMô tả
items[OrderEvent!]!
pageInt!
pageSizeInt!
totalInt!

paymentStatus ​

Canonical status of one payment attempt. Requires payment.read (U-04 own, F-01 Finance).

query · quyền: payment.read

Tham sốKiểuMặc địnhMô tả
intentIdID!

Trả về PaymentIntent!

FieldKiểuMô tả
idID!
obligationIdID!
obligationKindString!DEPOSIT or REMAINING.
obligationStatusString!OPEN | SETTLED | CANCELLED | REVERSED (PI_POINT: returned, tendered again by the next deposit attempt, #377).
orderIdID
orderCodeString#298 business order code of orderId (temporary format, NEW-SL-12); null with orderId and in a command result.
orderStateOrderState
providerString!
providerModePaymentProviderMode!
liveBoolean!Always false: no real money is collected while G-FIN is open.
amountVndVndAmount!
currencyString!
statusPaymentIntentStatus!
versionInt!
statusChangedAtDateTime
createdAtDateTime
expiresAtDateTimeWhen the provider session ends (the provider's own expiry when reported, #479 T5; else createdAt + the session TTL); null when unknown or the intent is no longer open.
payUrlString#479 T5: the provider's web checkout page (https) of the open session; null when not open or not reported.
deeplinkString#479 T5: the provider app deeplink of the open session; null when not open or not reported.
qrDataString#479 T5: the text the session's QR code encodes; null when not open or not reported.

publicRecurringQuote ​

G2S S12: quote of a guest's device basket for a published OPEN Recurring campaign (closed: conflict campaign_closed; unknown, unpublished or Group Buy: not_found; an empty cycle: validation_failed cycle_empty). No sign-in needed (deal.read_public, PUB-01; a Sale reads not_found); x-pi-app is still required.

query · SDL không ghi quyền

Tham sốKiểuMặc địnhMô tả
inputPublicRecurringQuoteInput!

Trả về PublicRecurringQuote!

FieldKiểuMô tả
campaignIdID!
packageNoInt!
deliveryWindowNoInt!
cycleCountInt!Số kỳ cam kết of the package.
lines[OrderLine!]!Order-time lines (quantity = the default per cycle, units = Σ over the cycles).
v0VndVndAmount!Tạm tính {n} kỳ.
depositRateBpInt!
depositVndVndAmount!Cọc hôm nay without Pi-Point: depositRate x v0Vnd rounded up to 1 VND (equals depositBeforePointsVnd).
depositBeforePointsVndVndAmount!
pointCapBpInt!The campaign's Pi-Point payment cap in basis points.
minOrderValueVndVndAmountGiá trị đơn tối thiểu per period; null when none is set.
minOrderShortfallVndVndAmount!The largest periods[].minOrderShortfallVnd (0 when every period reaches the minimum).
defaultTotalVndVndAmount!So với mặc định: every period at the default quantities.
totalUnitsInt!
skipMaxInt!Được bỏ qua tối đa of the package.
periods[OrderPeriod!]!
packages[RecurringPackagePreview!]!
remainingCapVndIntPAF (S6, DEC-PAF-12): Còn lại khi rổ chốt at most (no Pi-Point for a guest) = the order value at the current tier - deposit, from the server; null when unknown.

recurringQuote ​

Server quote of the caller's own Recurring basket. G2S (DEC-FS27-MD-EMPTY-CYCLE; the same rule as U28-P2-04 DEC-U28-03): a cycle where every product is 0 is validation_failed reason cycle_empty with details.cycleNo (the first one); every cycle must reach the minimum. Requires order.create (U-02, own).

query · quyền: order.create

Tham sốKiểuMặc địnhMô tả
inputRecurringQuoteInput!

Trả về RecurringOrderQuote!

FieldKiểuMô tả
quoteOrderQuote!The persisted quote (lines: quantity = the default per period); submit it by id/version.
basketIdID!
basketVersionInt!Basket version the quote was priced at; a later basket edit makes it stale.
packageNoInt!The package (Gói kỳ cam kết) the quote is priced for.
deliveryWindowNoInt!The delivery window (Khung ngày giao) of the periods.
oneCycleVndVndAmount!Order-time value of one period at the default quantities (Σ quantity x giá tạm tính).
minOrderValueVndVndAmountGiá trị đơn tối thiểu per period of the campaign; null when none is set.
minOrderShortfallVndVndAmount!The largest periods[].minOrderShortfallVnd (0 when every period with goods reaches the minimum); submit refuses a quote with a shortfall.
defaultTotalVndVndAmount!So với mặc định: every period at the basket default quantities, at this quote's unit prices.
totalUnitsInt!Σ quantity of every product over every period.
emptyCycleCountInt!Periods where every product is 0. G2S (BR-MD-05, DEC-FS27-MD-EMPTY-CYCLE): an empty period is refused (validation_failed cycle_empty), never a skip; always 0.
skipMaxInt!Được bỏ qua tối đa of the package (Bỏ qua kỳ in Order management, BR-MD-10); no longer an allowance for empty cycles.
allocationBasisPeriodAllocationBasis!
periods[OrderPeriod!]!The scheduled periods the term commits to, first to last.
availablePointsPointAmountG2S S1: số dư khả dụng of the buyer's Ví của tôi; null when there is no wallet or the balance cannot be read (quote.pointsUnavailableReason says why), never a false 0. The points used by default are quote.usablePoints.
depositBeforePointsVndVndAmount!G2S S1 (G2-06 Cọc giữ chỗ (x%, chưa trừ Pi-Point)): depositRate x quote.v0Vnd rounded up to 1 VND, before Pi-Point. The deposit to pay is quote.depositVnd (after Pi-Point, BR-MD-07).
packages[RecurringPackagePreview!]!G2S S1 (G2-05): every package of the campaign in Admin order, priced at this quote's quantities.
remainingCapVndIntPAF (S6, DEC-PAF-12): Còn lại khi rổ chốt at most = the order value at the current tier - Pi-Point value - deposit, from the server (the App shows it as is); null when unknown.
referrerOrderReferrerXem trước. Đơn được ghi nhận lúc tạo; có thể khác nếu có lượt mở link mới giữa quote và đặt. Null when nobody would be credited.

Mutation ​

dropOrderPoints ​

U-30b "Tiếp tục không dùng điểm" (BR-DC-06): the caller's own Group Buy or (G2S, BR-DCD-05) Mua định kỳ order, still waiting for its deposit and with no accepted or pending point hold, goes to 0 points; the value after Pi-Point and the deposit are recomputed (Mua định kỳ: rate x Tạm tính {n} kỳ; rounded up to 1 VND), code and depositDueAt unchanged. Any other state is conflict. An order already at 0 points is returned as it is. Then pay it with startDepositCheckout. Requires payment.start (U-05, own order).

mutation · quyền: payment.start

Tham sốKiểuMặc địnhMô tả
inputDropOrderPointsInput!

Trả về Order!

FieldKiểuMô tả
idID!
codeString!Business order code, unique and immutable (#298; temporary format PO + 8 A-Z0-9).
stateOrderState!
versionInt!
quoteIdID!
campaignIdID!
campaignTypeOrderCampaignType!
campaignVersionInt!
policyVersionIdID!
committedCycleCountInt!
lines[OrderLine!]!
v0VndVndAmount!
depositRateBpInt!
depositVndVndAmount!
pointCapBpInt!
pointsUsedPointAmount!
pointsValueVndVndAmount!
pointRateRateSnapshot!
finalPriceVndVndAmountNull until the campaign close outcome exists (never a false 0).
remainingVndVndAmountNull until the final price exists (never a false 0).
milestoneOrderMilestone
deliveryAddressOrderDeliveryAddress!Snapshot at order time; profile edits never change it.
quotedAtDateTime!
stateChangedAtDateTime!
createdAtDateTime!
updatedAtDateTime!
depositDueAtDateTime#377 D2: the deposit is due before this instant (createdAt + the governing payment window, Word B056.R02: 24 h); after it the order is Da huy. Null when the order no longer waits for its deposit.
remainingCapVndIntPAF (S6, DEC-PAF-12): Mua chung with the deposit paid and the campaign not closed yet: Còn lại tối đa khi chốt (the order value at the current tier - pointsValueVnd - depositVnd), from the server; null otherwise.
serverTimeDateTime!PAF-P3-12 (R-22): the server's clock when the order was read (DB now() of that read), so the App's countdowns (Hạn thanh toán cọc) run on server time.
participantOrdinalIntNgười thứ n (BR-MC-02 per owner 30/10, DEC-OWN30-S1-ORDINAL): the participant count of the Deal (RECURRING: of the basket) at the instant the deposit is confirmed, this buyer included (real people with a committed order + virtual units, the participantCount rule), fixed then; null before that.
spinOrderSpin!Lucky Wheel facts of the order (never null; NOT_APPLIED when there is nothing to show).
shipments[OrderShipment!]!Own shipments of this order; empty means no shipment yet (UA-19 AC04).
paymentMethodOrderPaymentMethod!U19-P2-21. Remaining payment method (U-04 payment.read, own order).
paymentMethodVersionInt!Version of the choice, the expectedVersion of selectRemainingPaymentMethod (0 = never chosen).
remainingSwitchOrderRemainingSwitchU28-P2-03. After the close: the COD -> ONLINE switch as computed now; null before the close. PAF (S9, DEC-PAF-09): Mua chung too (lockedCycleNos always empty; blockedReason all_cycles_locked = the order is at Đang đóng gói or later), Mua định kỳ per cycle.
shortageCancellationOrderShortageCancellationThe latest supply-shortage cancellation of this order, whole or partial (A-OD-07 AC08).
shortageCancellations[OrderShortageCancellation!]!Every supply-shortage cancellation of this order, newest first (a partial shortage keeps the order alive).
codReturnOrderCodReturnThe RETURN case of this Order when its COD was refused (FU-OIFF01), else null.
statusOrderStatus!
overpaymentVndVndAmountDeposit + points value above the final price (offline case); null until close.
paymentOrderPayment!Own payment section. Requires payment.read (U-04, own).
orderStatusOrderAxis!Stored order status (Word), the same values staff see.
paymentStatusPaymentAxis!Stored payment status (Word, 8 values), the same values staff see.
cancelReasonOrderAxisCancelReasonWhy the order is Da huy (#377 D2, Word closed list, the values staff see); null unless orderStatus is CANCELLED. An unpaid order cancelled at the campaign close reads DEPOSIT_UNPAID_AT_CLOSE (G1S; DEPOSIT_TIMEOUT on older orders).
addressVersionInt!U19-P2-11. Revision of the delivery address. PAF (DEC-PAF-03): the address no longer changes once the order exists.
customerNoteStringU19-P2-11. Ghi chu cua khach entered at order time.
rewards[OrderReward!]!The buyer's own reward entries; empty when the order has none yet.
referrerOrderReferrerThe credited referrer; null when nobody is credited (no link, window expired, own link, locked owner, not assigned yet).
currentCycleOrderCurrentCycleThe current cycle of a Mua định kỳ order; null for Mua chung and when no cycle is open (all delivered, stopped, cancelled).
campaignClosedAtDateTime#412 O-37F: when the campaign closed (the close instant of its outcome); null before the close and for Mua định kỳ.
invitedFriendCountInt!#412 G1-09: Người bạn mời of the buyer who joined this Deal. Always 0 for now (owner 28/10: the rule comes later).
overpaymentCaseOrderOverpaymentCase#412 U-64b: the offline overpayment case of this order; null when there is none. Requires payment.read (U-04, own).
refunds[OrderRefund!]!Own refunds of this order, newest first; empty when nothing is refunded (#302). Requires payment.read (U-04, own).
refundAccountOrderRefundAccount#412 G1-10: where the refund goes, from the latest refund request the buyer sent; null before one. Requires payment.read (U-04, own).

requestOrderCancellation ​

Cancels an own order before the cutoff: a PLACED order requests its refund; an unpaid one is cancelled free (O3; conflict reason payment_pending while a deposit attempt is in flight). Requires order.request_cancel (U-03, OWN).

mutation · quyền: order.request_cancel

Tham sốKiểuMặc địnhMô tả
inputRequestOrderCancellationInput!

Trả về RequestOrderCancellationResult!

FieldKiểuMô tả
aggregateIdID!The order id.
versionInt!The order version after the cancellation.
statusCommandStatus!
requestIdID!
correlationIdID!
nextActionNextAction
orderIdID!
orderStatusOrderState!
settlementString!REFUND: a paid order's cancellation is refunded (forfeiture is another path). NONE: an unpaid order (O3), nothing was collected.
refundRequestKeyString!Tracking id of the refund request (an unpaid order answers NOTHING_TO_REFUND under the same key).
refundHandoffString!REQUESTED (refund case opened or found, P3-10), DEFERRED (an original is unresolved; the consumer opens it later), NOTHING_TO_REFUND, or NOT_WIRED for an unwired port (GAP-84). Not a completed refund.
estimatedRefundOrderCancelRefundEstimate!

settleFailedDeliveryCycle ​

#479 A. Operations settle a Mua định kỳ cycle whose delivery failed for good (DELIVERY_FAILED) and is not paid in full: the cycle is Đã hủy (giao hàng thất bại), earns no reward and its Pi-Point is not given back; past Được bỏ qua tối đa (skips + failed cycles) the whole order is Đã hủy with the deposit forfeited. Idempotent by requestId. Requires order.cancel; the buyer of the order is refused.

mutation · quyền: order.cancel

Tham sốKiểuMặc địnhMô tả
inputSettleFailedDeliveryCycleInput!

Trả về SettleFailedDeliveryCycleResult!

FieldKiểuMô tả
aggregateIdID!The order id.
versionInt!The order version after the settlement.
statusCommandStatus!
requestIdID!
correlationIdID!
nextActionNextAction
orderIdID!
cycleNoInt!
outcomeFailedDeliveryOutcome!
skipsUsedInt!
failedDeliveryCountInt!
allowedSkipsInt!
orderStatusOrderAxis!The order axes after the settlement (CANCELLED + DEPOSIT_FORFEITED + DELIVERY_FAILED for ORDER_CANCELLED; PARTIAL_SUCCESS when the order just ended).
paymentStatusPaymentAxis!
cancelReasonOrderAxisCancelReason
excessDepositVndVndAmount!Cọc dư opened by this settlement (kind FAILED_DELIVERY); 0 when the cycles still to deliver absorbed the deposit share.
settledAtDateTime!

submitGroupOrder ​

Creates a DEPOSIT_PENDING order from an open own quote. Requires order.create.

mutation · quyền: order.create

Tham sốKiểuMặc địnhMô tả
inputSubmitGroupOrderInput!

Trả về SubmitOrderResult!

FieldKiểuMô tả
aggregateIdID!The order id.
versionInt!
statusCommandStatus!
requestIdID!
correlationIdID!
nextActionNextActionstart_deposit_payment: P3 redeems points (if any) then collects the deposit.
paymentObligationIdIDThe DEPOSIT payment obligation recorded with the order (P3-01).
orderOrder!
priceChangeOrderPriceChangeNull when the order was written at the quoted price. Set: the order already holds the new price and deposit (same code, same depositDueAt); the App shows U-62, then pays this order with startDepositCheckout, never a second submitGroupOrder.

submitRecurringOrder ​

Commits the quoted basket (its package and window) into one DEPOSIT_PENDING Mua định kỳ order; refused below Giá trị đơn tối thiểu or without the terms tick. G2S S4 (BR-DCD-02/05, DEC-FS27-MD-G1S-FLOW): the order is created first at the prices in force (priceChange when they moved); the basket becomes COMMITTED. Campaign no longer OPEN: conflict campaign_closed, no order (an order already waiting for its deposit is cancelled at the close, DEPOSIT_UNPAID_AT_CLOSE, TB-18). Requires order.create.

mutation · quyền: order.create

Tham sốKiểuMặc địnhMô tả
inputSubmitRecurringOrderInput!

Trả về SubmitRecurringOrderResult!

FieldKiểuMô tả
aggregateIdID!The order id.
versionInt!
statusCommandStatus!
requestIdID!
correlationIdID!
nextActionNextActionstart_deposit_payment: P3 redeems points (if any) then collects the deposit.
paymentObligationIdIDThe DEPOSIT payment obligation recorded with the order (P3-01).
orderOrder!
basketIdID!The basket this order committed (now COMMITTED).
periods[OrderPeriod!]!
priceChangeRecurringPriceChangeG2S S4: null when the order was written at the quoted prices. Set: the order already holds the new prices and deposit (same code, same depositDueAt); the App shows U-62, then pays this order with startDepositCheckout, never a second submitRecurringOrder.

Sinh từ ad83b0aea · 820 migration · PostgreSQL 17