Giao diện
API · attribution
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.
5 query · 6 mutation.
Query
affiliateLinks
The caller's Affiliate links in this app, newest first. referral_link.read (own).
query · SDL không ghi quyền
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
status | AttributionLinkStatus | ||
page | Int | ||
pageSize | Int |
Trả về AffiliateLinkPage!
| Field | Kiểu | Mô tả |
|---|---|---|
items | [AffiliateLink!]! | |
page | Int! | |
pageSize | Int! | |
total | Int! |
attribution
Orders attributed to the caller's links (masked buyer). attribution.read (own).
query · SDL không ghi quyền
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
page | Int | ||
pageSize | Int |
Trả về AttributionPage!
| Field | Kiểu | Mô tả |
|---|---|---|
items | [Attribution!]! | |
page | Int! | |
pageSize | Int! | |
total | Int! |
publicSaleCompanion
G1S: the Sale đồng hành of a link code; null when the code is unknown, disabled or expired, or the Sale is not ACTIVE. Requires deal.read_public.
query · quyền: deal.read_public
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
code | String! |
Trả về PublicSaleCompanion
| Field | Kiểu | Mô tả |
|---|---|---|
displayName | String! | |
rankName | String | Hạng of the Sale; null without one. |
successfulOrders | Int! | Số đơn thành công: closed-successful orders the Sale referred. |
phone | String | Gọi điện; null when the Sale shows no phone. |
zaloPhone | String | Zalo number; null when none. |
referralCode | String! | The Sale's referral code (Mã). |
avatarUrl | String | Public avatar URL; null without one. |
referralLink
The caller's personal Referral link in this app, or null. referral_link.read (own).
query · SDL không ghi quyền
Không có tham số.
Trả về ReferralLink
| Field | Kiểu | Mô tả |
|---|---|---|
id | ID! | |
ownerApp | String! | App the link belongs to (APP_USER or APP_SALE). |
status | AttributionLinkStatus! | |
share | LinkShare! | |
createdAt | DateTime! | |
disabledAt | DateTime | |
version | Int! |
referralMilestones
People the caller referred in this app (masked). attribution.read (own).
query · SDL không ghi quyền
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
reached | ReferralMilestoneFilter | ||
pending | ReferralMilestoneFilter | ||
page | Int | ||
pageSize | Int |
Trả về ReferralProgressPage!
| Field | Kiểu | Mô tả |
|---|---|---|
items | [ReferralProgress!]! | |
page | Int! | |
pageSize | Int! | |
total | Int! |
Mutation
claimAffiliateTouches
Bind the caller's anonymous Affiliate clicks (72 h, SPEC-02) to itself. referral.claim.
mutation · SDL không ghi quyền
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
input | ClaimAffiliateTouchesInput! |
Trả về AffiliateTouchBindResult!
| Field | Kiểu | Mô tả |
|---|---|---|
aggregateId | ID! | |
version | Int! | |
status | CommandStatus! | |
requestId | ID! | |
correlationId | ID! | |
nextAction | NextAction | |
outcome | AffiliateTouchBindOutcome! | |
boundCount | Int! |
claimReferralSignup
Bind the caller's new account to its sign-up Referral. referral.claim.
mutation · SDL không ghi quyền
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
input | ClaimReferralSignupInput! |
Trả về ReferralClaimResult!
| Field | Kiểu | Mô tả |
|---|---|---|
aggregateId | ID! | |
version | Int! | |
status | CommandStatus! | |
requestId | ID! | |
correlationId | ID! | |
nextAction | NextAction | |
outcome | ReferralClaimOutcome! | |
recorded | [ReferralMilestoneKind!]! | Milestones written by this call. |
createAffiliateLink
Get-or-create an Affiliate link to an open Campaign. referral_link.create (own).
mutation · SDL không ghi quyền
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
input | CreateAffiliateLinkInput! |
Trả về AffiliateLinkResult!
| Field | Kiểu | Mô tả |
|---|---|---|
aggregateId | ID! | |
version | Int! | |
status | CommandStatus! | |
requestId | ID! | |
correlationId | ID! | |
nextAction | NextAction | |
created | Boolean! | False when the same destination already had an ACTIVE link. |
link | AffiliateLink! |
createReferralLink
Get-or-create the caller's personal Referral link. referral_link.create (own).
mutation · SDL không ghi quyền
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
input | CreateReferralLinkInput! |
Trả về ReferralLinkResult!
| Field | Kiểu | Mô tả |
|---|---|---|
aggregateId | ID! | |
version | Int! | |
status | CommandStatus! | |
requestId | ID! | |
correlationId | ID! | |
nextAction | NextAction | |
created | Boolean! | False when the caller's existing ACTIVE link was returned. |
link | ReferralLink! |
disableAffiliateLink
Stop an Affiliate link (AD-ATTR-01). No role may call it yet (GAP-58).
mutation · SDL không ghi quyền
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
input | DisableAffiliateLinkInput! |
Trả về DisableAffiliateLinkResult!
| Field | Kiểu | Mô tả |
|---|---|---|
aggregateId | ID! | |
version | Int! | |
status | CommandStatus! | |
requestId | ID! | |
correlationId | ID! | |
nextAction | NextAction | |
linkStatus | AttributionLinkStatus! |
openAttributionLink
Open a shared link: records the open, returns a safe target. Public.
mutation · SDL không ghi quyền
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
input | OpenAttributionLinkInput! |
Trả về LinkOpenResult!
| Field | Kiểu | Mô tả |
|---|---|---|
requestId | ID! | |
correlationId | ID! | |
linkKind | AttributionLinkKind! | |
outcome | LinkOpenOutcome! | |
target | LinkTarget! | |
tracked | Boolean! |