Skip to content

API · campaign-public ​

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.

12 query · 2 mutation.

Query ​

campaignProgress ​

Server progress/estimate of a published Group Buy (UA-06/07). Requires deal.read_public.

query · quyền: deal.read_public

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

Trả về CampaignProgress!

FieldKiểuMô tả
campaignIdID!
statusPublicCampaignStatus!
acceptingOrdersBoolean!
serverTimeDateTime!
products[PublicCampaignProgress!]!

mySearchHistory ​

The caller's last 5 search keywords, newest first. Signed-in APP_USER buyer only.

query · SDL không ghi quyền

Không có tham số.

Trả về: [String!]!

publicCampaign ​

One published Group Buy (UA-07); unpublished = not_found. Requires deal.read_public.

query · quyền: deal.read_public

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

Trả về PublicCampaign!

FieldKiểuMô tả
idID!
typeCampaignType!
nameString!
statusPublicCampaignStatus!
acceptingOrdersBoolean!Server decision (status OPEN); the client clock never decides (UA-06 Rule 2).
opensAtDateTime!
closesAtDateTime!
serverTimeDateTime!Database time the status was derived at.
spinEnabledBoolean!Áp dụng vòng quay: false = the App shows no wheel for this campaign (B006.R10).
spinSchedule[PublicSpinInterval!]!Lượt quay theo thời điểm hệ thống xác nhận cọc, [startsAt, endsAt): the rounds of the configuration in force of the wheel the campaign chose, cut at the campaign's close (BR-VQ-06; a legacy wheel: its intervals); empty when spinEnabled is false or the wheel has no configuration.
participantCountInt!Số người đã tham gia, decided by the server: distinct buyers with a confirmed deposit (committed states) plus the virtual units (lượng ảo, one unit = one participant, #395), so it never shows fewer people than the virtual part of the progress (B006.R05 counts units). After a failed close only the virtual part is left; the App hides it on FAILED.
participantsTodayInt!Of those, buyers whose deposit was confirmed and virtual units added (DAILY step) since 00:00 Asia/Ho_Chi_Minh today.
rewardUnitCampaignRewardUnit
pointCapPctFloatTrần thanh toán bằng Pi-Point of this campaign, % of the order (B064.R07).
payNowBonusIntThưởng thanh toán online, in rewardUnit (B064.R08).
termsPublicCampaignTermsĐiều khoản tham gia Deal the buyer accepts before the deposit (B058.R10).
refundEtaTextStringThời gian hoàn cọc shown on the App (B006.R08, e.g. "1–3 ngày làm việc"): Cấu hình hệ thống refund.eta_text, never set per campaign; null when the parameter is missing.
featuredPublicFeaturedProductFeatured slot of the App home: product 1 and its tag (B006.R17).
policyPublicCampaignPolicy
products[PublicCampaignProduct!]!
milestones[PublicCampaignMilestone!]!
currentTierCampaignPriceTierAuthoritative current tier of the lead (position 1) product (UA-UI-07 HC03, GAP-1876): the tier of Tổng + 1 units, computed on the server, never by the client. Null while that progress is not READY. A basket with several products reads each one's products[].progress.currentTier.
deliverySchedule[PublicDeliveryCycle!]!The delivery periods in order (cycleNo ascending); empty when none is published.
maxPointsPerSpinPointAmountMức tối đa mỗi lượt of the wheel the campaign chose (the largest slot of its configuration in force, R5); null when spinEnabled is false or the wheel has no configuration.
depositWindowMinutesInt!Thời hạn thanh toán cọc in minutes (Cấu hình hệ thống, the value the server uses for Order.depositDueAt). The App shows it, never a hard-coded 24 h.
spinWheelSpinWheelDisplayVQM S14: the wheel the App previews next to spinSchedule (tone, 8 slots, Thể lệ, Mức tối đa); null when spinEnabled is false or no wheel is chosen. Never the wheel name (BR-VQ-02).
spinPrizePoints[PointAmount!]!Points of each slot of the wheel the campaign chose (its configuration in force), in slot order (the slices of the wheel); empty when spinEnabled is false or the wheel has no configuration. Never a probability.

publicCampaignHome ​

App home, Mua chung: one Đang mở + one Sắp mở (null when none). Requires deal.read_public.

query · quyền: deal.read_public

Không có tham số.

Trả về PublicCampaignHome!

FieldKiểuMô tả
openPublicCampaign
upcomingPublicCampaign

publicCampaigns ​

Published Group Buy campaigns (UA-04..06): only Đang mở (OPEN) and Sắp mở (UPCOMING) are listed (CD-US-19 AC06/AC10); a status filter asking for a closed state answers an empty page, and a closed campaign stays readable by id. keyword = campaign name, product SKU/name or brand; windowFrom/windowTo = VN calendar days (YYYY-MM-DD, Asia/Ho_Chi_Minh) the registration window overlaps. Requires deal.read_public.

query · quyền: deal.read_public

Tham sốKiểuMặc địnhMô tả
searchString
status[PublicCampaignStatus!]
windowFromString
windowToString
categoryIdIDG1S (BR-KP-05): a category and its sub-categories; only campaigns with a Deal in it, and products holds only those Deals.
pageInt1
pageSizeInt20

Trả về PublicCampaignPage!

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

publicCategories ​

Level-1 categories with at least one Deal shown on the App (Đang mở or Sắp mở). With campaignId (G2S S8, BR-KPD-02): level-1 categories with at least one product in that campaign (Mua định kỳ basket chips; [] when the campaign is not shown on the App). Requires deal.read_public.

query · quyền: deal.read_public

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

Trả về [PublicCategory!]!

FieldKiểuMô tả
idID!
nameString!
imageUrlStringẢnh đại diện of the category (public URL); null without one (the App shows its default icon).
positionInt!Server order of the chip row, 1..n; the list is already sorted by it.

publicHomeStats ​

App home community figures (system_settings home.* / banner.*). Requires deal.read_public.

query · quyền: deal.read_public

Không có tham số.

Trả về PublicHomeStats!

FieldKiểuMô tả
communityThisWeekInt!Hero core: người cùng mua tuần này.
groupBuyPublicHomeGroupBuyStats!
recurringPublicHomeRecurringStats!
heroRecentJoinedInt!Hero: +{n} người vừa tham gia.
heroTodayNearbyInt!Hero: {n} người mới tham gia hôm nay quanh bạn.
heroInitials[String!]!Hero: initials of the avatar row, in display order.
groupBuyBannerPublicGroupBuyBanner!Banner of the Deal list (G1-02).

publicRecurringCampaign ​

One published Recurring basket; unpublished, unknown or Group Buy = not_found. Requires deal.read_public.

query · quyền: deal.read_public

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

Trả về PublicRecurringCampaign!

FieldKiểuMô tả
idID!
nameString!
statusPublicCampaignStatus!
acceptingOrdersBoolean!Server decision (status OPEN); the client clock never decides.
opensAtDateTime!
closesAtDateTime!
serverTimeDateTime!Database time the status was derived at.
spinEnabledBoolean!Áp dụng vòng quay (B223.R08).
spinSchedule[PublicSpinInterval!]!Lượt quay theo thời điểm hệ thống xác nhận cọc, [startsAt, endsAt): the rounds of the configuration in force of the wheel the campaign chose, cut at the campaign's close (BR-VQ-06; a legacy wheel: its intervals); empty when spinEnabled is false or the wheel has no configuration.
participantCountInt!Số người đã tham gia, decided by the server: distinct buyers with a confirmed deposit (committed states) plus the virtual units (lượng ảo, one unit = one participant, #395), so it never shows fewer people than the virtual part of the progress (B006.R05 counts units). After a failed close only the virtual part is left; the App hides it on FAILED.
participantsTodayInt!+{n} hôm nay. G2S (BR-APP-17, DEC-OWN28-G2S-TODAY-FIXED): the Admin-set value of system_settings recurring.participants_today (placeholder, tech debt G2S-TD-01, GAP-G2S-12), never computed from orders.
rewardUnitCampaignRewardUnit
pointCapPctFloatTrần thanh toán bằng Pi-Point, % of the order.
prepayAllBonusIntThưởng khi trả trước toàn bộ các kỳ, in rewardUnit (B223.R04).
minOrderValueVndVndAmountGiá trị đơn tối thiểu per period (B223.R05).
startMonthStringKỳ bắt đầu giao, YYYY-MM.
termsPublicCampaignTerms
refundEtaTextStringThời gian hoàn cọc (B006.R08): Cấu hình hệ thống refund.eta_text; null when missing.
featuredPublicFeaturedProductFeatured slot of the App home: product 1 and its tag.
maxPointsPerSpinPointAmountG2S S7 (G2-04 Vòng quay đăng ký sớm): Mức tối đa mỗi lượt of the wheel the campaign chose (the largest slot of its configuration in force); null when spinEnabled is false or the wheel has no configuration. Same as PublicCampaign.maxPointsPerSpin.
pointRateVndFloatVND của 1 Pi-Point theo cấu hình đang hiệu lực (BR-APP-07); null = chưa có tỷ giá; App dùng cho ví dụ U-20
depositWindowMinutesInt!G2S S7: Thời hạn thanh toán cọc in minutes (Cấu hình hệ thống, the value the server uses for Order.depositDueAt). Same as PublicCampaign.depositWindowMinutes.
packages[PublicRecurringPackage!]!
windows[PublicDeliveryWindow!]!
policyPublicRecurringPolicy
products[PublicCampaignProduct!]!Products of the basket; progress counts quantity x cycles of committed orders.
deliverySchedule[PublicDeliveryCycle!]!The delivery cycles in order (cycleNo ascending); empty when none is published.
spinWheelSpinWheelDisplayVQM S14: as PublicCampaign.spinWheel (G2-04).

publicRecurringCampaigns ​

Published Recurring baskets (GAP-192): only OPEN and UPCOMING are listed (CD-US-19 AC06/AC10; a closed basket stays readable by id). search = basket name, product SKU/name or brand; status = the list chips. Order is the server's (OPEN by deadline, then UPCOMING by opening). Requires deal.read_public; User App only.

query · quyền: deal.read_public

Tham sốKiểuMặc địnhMô tả
searchString
status[PublicCampaignStatus!]
pageInt1
pageSizeInt20

Trả về PublicRecurringCampaignPage!

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

publicRecurringHome ​

App home, Mua định kỳ: one Đang mở + one Sắp mở (null when none). Requires deal.read_public; User App only.

query · quyền: deal.read_public

Không có tham số.

Trả về PublicRecurringHome!

FieldKiểuMô tả
openPublicRecurringCampaign
upcomingPublicRecurringCampaign

publicSearch ​

Products matching the keyword (product name, brand, campaign / basket name; case ignored, Vietnamese diacritics kept, PAF-P1-16), Đang mở first (closing first) then Sắp mở bán (opening first). categoryIds: a level-1 id includes its sub-categories, several ids are a union. An empty keyword is validation_failed. Requires deal.read_public.

query · quyền: deal.read_public

Tham sốKiểuMặc địnhMô tả
keywordString!
kindPublicSearchKindALL
categoryIds[ID!]
pageInt1
pageSizeInt20

Trả về PublicSearchPage!

FieldKiểuMô tả
items[PublicSearchItem!]!
totalInt!
pageInt!
pageSizeInt!
hasMoreBoolean!
serverTimeDateTime!PAF-P3-12 (R-22): the server's clock at this read (DB now()), so the App's countdowns run on server time.

publicSearchFacets ​

Counts for the U-16 filter (same result set as publicSearch). Requires deal.read_public.

query · quyền: deal.read_public

Tham sốKiểuMặc địnhMô tả
keywordString!
kindPublicSearchKindALL
categoryIds[ID!]

Trả về PublicSearchFacets!

FieldKiểuMô tả
totalInt!Results for the keyword, kind and categories: the n of Áp dụng ({n} kết quả).
kindCountsPublicSearchKindCounts!
categories[PublicSearchCategoryCount!]!

Mutation ​

clearSearchHistory ​

Deletes the caller's search history. Signed-in APP_USER buyer only.

mutation · SDL không ghi quyền

Không có tham số.

Trả về: Boolean!

recordSearchKeyword ​

Puts the keyword first (duplicates ignoring case and spaces removed), keeps 5; returns the new history. Signed-in APP_USER buyer only.

mutation · SDL không ghi quyền

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

Trả về: [String!]!

Sinh từ ad83b0aea · 820 migration · PostgreSQL 17