Temă
Referința API (GraphQL)
Generată automat din schema construită de API (
pnpm docs:generate). Schema completă:docs/generated/schema.graphql.
API-ul expune 73 de interogări și 113 de mutații la POST /api/graphql, cu 120 tipuri de ieșire, 53 tipuri de intrare și 53 enumerări. Autentificarea se face prin cookie HttpOnly (sesiunea clientului sau a echipei); permisiunile echipei sunt verificate pe fiecare operație.
Coloana Acces: public, client conectat sau echipă (cu permisiunile cerute).
Site: autentificare și cont
| Operație | Tip | Argumente | Returnează | Acces | Descriere |
|---|---|---|---|---|---|
changePassword | mutation | input: ChangePasswordInput! | Boolean! | public | Changes the password and logs out every other device. |
confirmPhoneCode | mutation | code: String! | Boolean! | public | |
deleteMyAccount | mutation | password: String! | Boolean! | public | GDPR erasure: anonymises the account and logs out everywhere. Needs the password. |
login | mutation | input: LoginInput! | Viewer! | public | Logs in. Accounts with two-step verification get the error TOTP_REQUIRED with a challengeToken. |
logout | mutation | — | Boolean! | public | |
register | mutation | input: RegisterInput! | Viewer! | public | Creates an account, sends the confirmation email and logs in. |
removeMyAvatar | mutation | — | Boolean! | public | |
requestPasswordReset | mutation | email: String! | Boolean! | public | Always returns true, whether or not the email has an account. |
resendVerificationEmail | mutation | — | Boolean! | public | |
resetPassword | mutation | input: ResetPasswordInput! | Boolean! | public | |
sendPhoneCode | mutation | — | Int! | public | Sends a 6-digit code by SMS to the saved number. Returns its validity in seconds. |
setMarketingConsent | mutation | input: MarketingConsentInput! | Account! | public | Marketing consent per channel; each change is recorded as consent evidence. |
setPayoutAccount | mutation | input: PayoutAccountInput! | Account! | public | IBAN for payouts (checked with the ISO 13616 checksum). |
updateNotificationPreferences | mutation | input: NotificationPreferencesInput! | Account! | public | |
updateProfile | mutation | input: ProfileInput! | Account! | public | |
verifyEmail | mutation | token: String! | Viewer! | public | Confirms the email address with the token from the email link. |
myAccount | query | — | Account! | public | |
viewer | query | — | Viewer | public | The logged-in customer, or null. |
Site: catalog și anunțuri
| Operație | Tip | Argumente | Returnează | Acces | Descriere |
|---|---|---|---|---|---|
addFavorite | mutation | listingId: ID! | Boolean! | public | Saves a listing to favourites. Returns the new state. |
createListing | mutation | asDraft: Boolean! = false, input: ListingInput! | MyListing! | public | Publishes a listing for moderation (or saves a draft). |
deleteListing | mutation | id: ID! | Boolean! | public | |
deleteSavedSearch | mutation | id: ID! | Boolean! | public | |
markListingSold | mutation | id: ID! | MyListing! | public | |
promoteListing | mutation | input: PromoteInput! | ListingCard! | public | Pays (simulated card) for more visibility on an active listing. |
reactivateListing | mutation | id: ID! | MyListing! | public | |
reduceListingPrice | mutation | id: ID!, priceBani: Int! | MyListing! | public | |
removeFavorite | mutation | listingId: ID! | Boolean! | public | Removes a listing from favourites. Returns the new state. |
saveSearch | mutation | input: SaveSearchInput! | SavedSearch! | public | |
updateListing | mutation | asDraft: Boolean! = false, id: ID!, input: ListingInput! | MyListing! | public | Saves changes; a published listing goes back to moderation. |
updateSavedSearch | mutation | alertsEnabled: Boolean, id: ID!, markSeen: Boolean! = false | SavedSearch! | public | Turns alerts on/off, or marks the new listings as seen. |
categories | query | — | [Category!]! | public | |
listing | query | idOrSlug: String! | ListingDetail! | public | A listing by id or slug. Counts a view. |
listings | query | filter: ListingFilterInput, page: PageInput, sort: ListingSort! = NEWEST | ListingPage! | public | Active listings matching the filter. |
myFavorites | query | — | [ListingCard!]! | public | |
myListingCounts | query | — | [MyListingCount!]! | public | |
myListingForEdit | query | id: ID! | EditableListing! | public | |
myListings | query | — | [MyListing!]! | public | |
mySavedSearches | query | — | [SavedSearch!]! | public | |
promotionPackages | query | — | [PromotionPackage!]! | public | |
seller | query | id: ID! | SellerSummary! | public | Public profile of a seller. |
sellerReviews | query | sellerId: ID! | [SellerReview!]! | public | Latest reviews of a seller (public). |
sellingRules | query | — | SellingRules! | public | Limits shown in the "Adaugă anunț" form. |
similarListings | query | listingId: ID! | [ListingCard!]! | public | Other active listings in the same category. |
Site: mesaje și notificări
| Operație | Tip | Argumente | Returnează | Acces | Descriere |
|---|---|---|---|---|---|
makeOffer | mutation | input: MakeOfferInput! | ConversationThread! | public | |
markNotificationsRead | mutation | ids: [ID!] | Int! | public | Marks the given notifications (or all) as read; returns how many changed. |
respondToOffer | mutation | input: RespondToOfferInput! | ConversationThread! | public | |
sendMessage | mutation | conversationId: ID!, text: String! | ChatMessage! | public | |
startConversation | mutation | listingId: ID!, text: String! | ConversationThread! | public | First message about a listing (reuses an existing conversation). |
conversation | query | id: ID! | ConversationThread! | public | Opens a conversation and marks it as read. |
myConversations | query | — | [ConversationSummary!]! | public | |
myNotifications | query | — | [Notification!]! | public | |
viewerCounts | query | — | ViewerCounts! | public | Numbers for the header badges, in one request. |
Site: comenzi, plăți, dispute
| Operație | Tip | Argumente | Returnează | Acces | Descriere |
|---|---|---|---|---|---|
cancelOrder | mutation | code: String! | Order! | public | Buyer or seller, before shipping. Card payments are refunded. |
confirmOrderReceived | mutation | code: String! | Order! | public | Buyer: everything is fine; the seller gets paid. |
contactSupport | mutation | input: ContactInput! | String! | public | Contact form: opens a support ticket and returns its code (T-123456). |
leaveReview | mutation | input: ReviewInput! | Order! | public | |
openDispute | mutation | input: OpenDisputeInput! | Boolean! | public | Buyer: problem with a delivered order (stops the automatic confirmation). |
placeOrder | mutation | input: PlaceOrderInput! | Order! | public | Buys a listing. Card payments are simulated (test cards decide the outcome). |
reportListing | mutation | input: ReportListingInput! | Boolean! | public | |
reportUser | mutation | input: ReportUserInput! | Boolean! | public | Report a person from their public profile. |
respondToDispute | mutation | orderCode: String!, response: String! | Boolean! | public | Seller: their side of the story, within 48 hours. |
shipOrder | mutation | code: String! | Order! | public | Seller: hands the parcel to the courier (simulated AWB). |
simulateDelivery | mutation | code: String! | Order! | public | Development only: the courier reports the parcel as delivered (no courier API yet). |
checkoutQuote | query | couponCode: String, deliveryMethod: DeliveryMethod! = COURIER, listingId: ID!, offerId: ID, paymentMethod: PaymentMethod! = CARD | CheckoutQuote! | public | Price breakdown for buying a listing (with an accepted offer, if given). |
easyboxLockers | query | city: String!, county: String! | [EasyboxLocker!]! | public | |
myDisputes | query | — | [MyDispute!]! | public | |
myOrders | query | role: OrderRole! = BUYING | [Order!]! | public | |
order | query | code: String! | Order! | public |
Echipă: autentificare
| Operație | Tip | Argumente | Returnează | Acces | Descriere |
|---|---|---|---|---|---|
acceptStaffInvitation | mutation | password: String!, token: String! | Boolean! | public | Public: sets the password of an invited team member (one-time link). |
staffLogin | mutation | input: StaffLoginInput! | StaffLoginResult! | public | Step 1: email and password. Usually returns a two-step challenge. |
staffLogout | mutation | — | Boolean! | public | |
verifyStaffTotp | mutation | input: VerifyTotpInput! | StaffViewer! | public | Step 2: the 6-digit code from the authenticator app. |
staffViewer | query | — | StaffViewer | public | The logged-in staff member, or null. |
Backoffice
| Operație | Tip | Argumente | Returnează | Acces | Descriere |
|---|---|---|---|---|---|
addBannedWord | mutation | word: String! | Boolean! | public | |
approveListing | mutation | listingId: String! | Boolean! | public | |
boCancelOrder | mutation | code: String!, reason: CancellationReason! | BoOrder! | public | |
changeStaffRole | mutation | id: ID!, role: StaffRole! | TeamMember! | public | |
decideIdentity | mutation | approve: Boolean!, id: ID!, reason: String | Boolean! | public | |
deleteCategory | mutation | id: ID! | Boolean! | public | |
inviteStaff | mutation | input: InviteInput! | Invitation! | public | |
moveCategory | mutation | id: ID!, up: Boolean! | Boolean! | public | |
reactivateUser | mutation | userId: String! | BoUser! | public | |
rejectListing | mutation | input: ModerationDecisionInput! | Boolean! | public | |
removeBannedWord | mutation | word: String! | Boolean! | public | |
removeListingByStaff | mutation | id: ID!, reason: String! | Boolean! | public | |
removeUserAvatar | mutation | reason: String, userId: ID! | Boolean! | public | |
replyToTicket | mutation | input: TicketReplyInput! | BoTicket! | public | |
requestListingChanges | mutation | input: ModerationDecisionInput! | Boolean! | public | |
resetStaffTwoStep | mutation | id: ID! | TeamMember! | public | |
resolveDispute | mutation | input: ResolveDisputeInput! | BoDispute! | public | |
resolveReport | mutation | input: ResolveReportInput! | BoReport! | public | |
restoreListing | mutation | id: ID! | Boolean! | public | |
retryPayout | mutation | id: ID! | Boolean! | public | |
runDuePayouts | mutation | at: DateTime | [Int!]! | public | Pays the scheduled payouts that are due. Returns [sent, failed]. at (development only) runs it as if it were that moment. |
saveCategory | mutation | input: CategoryInputType! | Boolean! | public | |
setStaffActive | mutation | active: Boolean!, id: ID! | TeamMember! | public | |
suspendUser | mutation | input: SuspendUserInput! | BoUser! | public | |
updateFees | mutation | input: FeesInput! | Boolean! | public | |
updateListingRules | mutation | input: ListingRulesInput! | Boolean! | public | |
updatePromotionPackages | mutation | input: PackagesInput! | Boolean! | public | |
adminCategories | query | — | [AdminCategory!]! | public | |
adminListings | query | categoryId: ID, status: ListingStatus, text: String | [AdminListing!]! | public | |
auditLog | query | filter: AuditFilterInput | [AuditEntry!]! | public | |
bannedWords | query | — | [BannedWordEntry!]! | public | |
boDashboard | query | — | Dashboard! | public | |
boDisputes | query | status: DisputeStatus | [BoDispute!]! | public | |
boOrder | query | code: String! | BoOrder! | public | |
boOrders | query | status: OrderStatus, text: String | [BoOrder!]! | public | |
boReports | query | status: ReportStatus | [BoReport!]! | public | |
boTicket | query | code: String! | BoTicket! | public | |
boTickets | query | status: TicketStatus | [BoTicket!]! | public | |
boUser | query | id: String! | BoUser! | public | |
boUsers | query | status: UserStatus, text: String, type: UserType | [BoUser!]! | public | |
identityQueue | query | — | [IdentityRequest!]! | public | |
moderationQueue | query | — | [ModerationItem!]! | public | |
payoutTotals | query | — | [PayoutTotal!]! | public | |
payouts | query | status: PayoutTransferStatus | [PayoutRow!]! | public | |
platformSettings | query | — | PlatformSettings! | public | |
reportOverview | query | days: Int! = 30 | ReportOverview! | public | |
teamMembers | query | — | [TeamMember!]! | public |
CRM
| Operație | Tip | Argumente | Returnează | Acces | Descriere |
|---|---|---|---|---|---|
addSuppression | mutation | input: SuppressionInput! | Boolean! | public | |
createCoupon | mutation | input: CouponInput! | Coupon! | public | |
deleteSegment | mutation | id: ID! | Boolean! | public | |
deleteTemplate | mutation | id: ID! | Boolean! | public | |
removeSuppression | mutation | email: String! | Boolean! | public | |
runAutomationsNow | mutation | — | [Int!]! | public | Development only: runs the automation job now. Returns [entered, messages sent]. |
runScheduledCampaignsNow | mutation | — | Int! | public | Development only: sends the scheduled campaigns that are due now. |
saveCampaign | mutation | input: CampaignInput! | Campaign! | public | |
saveSegment | mutation | input: SegmentInput! | Segment! | public | |
saveTemplate | mutation | input: TemplateInput! | MessageTemplate! | public | |
sendCampaign | mutation | at: DateTime, id: ID! | Campaign! | public | Sends now or at at. Push/SMS during quiet hours are moved to their end. |
sendCampaignTest | mutation | id: ID! | Boolean! | public | Sends the campaign to the team member’s own inbox (captured in Mailpit). |
setAutomationStatus | mutation | id: ID!, status: AutomationStatus! | Automation! | public | |
setContactTags | mutation | id: ID!, tags: [String!]! | Boolean! | public | |
stopCoupon | mutation | id: ID! | Coupon! | public | |
unscheduleCampaign | mutation | id: ID! | Campaign! | public | |
updateCrmSettings | mutation | input: CrmSettingsInput! | Boolean! | public | |
campaignAudience | query | id: ID! | AudienceEstimate! | public | Who would receive the campaign now, and why others would not. |
crmAnalytics | query | days: Int! = 30 | CrmAnalytics! | public | |
crmAutomations | query | — | [Automation!]! | public | |
crmCampaign | query | id: ID! | Campaign! | public | |
crmCampaigns | query | — | [Campaign!]! | public | |
crmConsentLog | query | — | [ConsentRecord!]! | public | Latest consent changes (append-only evidence). |
crmContact | query | id: ID! | ContactDetail! | public | |
crmContacts | query | optIn: MarketingChannel, stage: LifecycleStage, text: String | [Contact!]! | public | |
crmCoupons | query | — | [Coupon!]! | public | |
crmDashboard | query | — | CrmDashboard! | public | |
crmSegments | query | — | [Segment!]! | public | |
crmSuppressions | query | — | [Suppression!]! | public | |
crmTemplates | query | — | [MessageTemplate!]! | public | |
segmentCount | query | matchMode: SegmentMatchMode!, rules: [SegmentRuleInput!]! | Int! | public | Live count while editing rules. |
Diagnoză și stare (dezvoltare)
| Operație | Tip | Argumente | Returnează | Acces | Descriere |
|---|---|---|---|---|---|
confirmReturnReceived | mutation | code: String! | Order! | public | Seller: the returned item arrived; the buyer gets everything back. |
confirmTwoStepSetup | mutation | code: String! | Boolean! | public | Turns two-step verification on, after checking a code from the app. |
decideBusiness | mutation | input: BusinessDecisionInput! | Boolean! | public | |
deleteLegalDraft | mutation | id: ID! | Boolean! | public | |
disableTwoStep | mutation | code: String!, password: String! | Boolean! | public | |
publishLegalDocument | mutation | effectiveAt: DateTime!, id: ID! | Boolean! | public | |
requestReturn | mutation | code: String!, reason: String | Order! | public | Buyer, purchase from a business: the 14-day right of withdrawal. |
resetCustomerTwoStep | mutation | userId: ID! | Boolean! | public | |
respondToLegal | mutation | input: LegalResponseInput! | Boolean! | public | Accepts (terms, rules) or acknowledges (privacy, cookies) a published version. |
runJobNow | mutation | name: String! | Boolean! | public | Development only: runs a periodic job now, through its lock. False when another run holds the lock. |
runOrderAutoConfirm | mutation | — | Float! | public | Development only: runs the 48-hour auto-confirmation job now; returns how many orders completed. |
saveCookieConsent | mutation | input: CookieConsentInput! | Int! | public | Records a cookie choice; returns the cookie policy version it applies to. |
saveLegalDraft | mutation | input: LegalDraftInput! | LegalAdminDocument! | public | |
sendTestEmail | mutation | to: String! | TestEmailResult! | public | Sends a test email (only when DIAGNOSTICS_ENABLED=true). |
sendTestPush | mutation | — | String! | public | Sends a test push notification through the configured driver. Returns the channel used. |
sendTestSms | mutation | to: String! | String! | public | Sends a test SMS through the configured driver (capture by default). Returns the channel used. |
setPlatformCharging | mutation | enabled: Boolean! | Boolean! | public | Turns the platform's commission on or off (CHANGE_FEES); the fee amounts are kept. |
startTwoStepSetup | mutation | — | TwoStepSetup! | public | |
submitBusinessDetails | mutation | input: BusinessDetailsInput! | Boolean! | public | Saves the company details; the account becomes a business, pending verification. |
switchToIndividual | mutation | — | Boolean! | public | Back to a private person (orders keep the seller type they were placed with). |
verifyLoginCode | mutation | challengeToken: String!, code: String! | Viewer! | public | Second login step for accounts with two-step verification (after login returned TOTP_REQUIRED). |
allowedMailRecipients | query | — | [String!]! | public | Addresses that are allowed to receive email. |
businessQueue | query | — | [BusinessRequest!]! | public | |
executiveDashboard | query | months: Int! = 18 | ExecutiveDashboard! | public | Business overview for leadership: KPIs, 6–24 months of history, trend and a 3-month forecast. |
health | query | — | HealthReport! | public | Status of the API and every service it depends on. |
legalAdminDocuments | query | kind: LegalKind | [LegalAdminDocument!]! | public | |
legalDocument | query | kind: LegalKind!, version: Int | LegalDocument! | public | The version in force, or a given published version. |
legalPendingPeople | query | documentId: ID! | [LegalPendingPerson!]! | public | |
legalVersions | query | kind: LegalKind! | [LegalDocument!]! | public | Every published version, newest first (history and announced versions). |
myLegalStatus | query | — | LegalStatus! | public | |
mySellerStats | query | days: Int! = 30, listingId: ID | SellerStats! | public | Views, saves and new conversations per day (last 7–90 days), for all listings or one. |
platformStatus | query | — | PlatformStatus! | public | Status of every web app (site, Backoffice, CRM, documentation), checked from inside the network. |
userBusinessRequests | query | userId: ID! | [BusinessRequestHistory!]! | public | Every company request of a customer, newest first (user card). |
userLegalRecords | query | userId: ID! | [LegalRecord!]! | public | A customer’s acceptance history (user card). |
userPayoutAccounts | query | userId: ID! | [PayoutAccountHistory!]! | public | Every payout account of a customer, newest first, IBANs masked (user card). |
Erori
Fiecare eroare are extensions.code; unele au și detalii (fields, reason, retryAfterMinutes, attemptsLeft).
| Cod | Când |
|---|---|
UNAUTHENTICATED | nu există sesiune (sau a expirat) |
FORBIDDEN | membrul echipei nu are permisiunea |
VALIDATION_FAILED | date invalide; fields spune ce câmpuri și de ce |
NOT_FOUND | resursa nu există sau nu e a ta |
CONFLICT | starea nu permite acțiunea (de exemplu comandă deja expediată); reason precizează |
INVALID_CREDENTIALS | e-mail sau parolă greșite |
TOO_MANY_ATTEMPTS | prea multe încercări; retryAfterMinutes |
INVALID_TOTP | cod greșit (TOTP sau SMS); attemptsLeft |
INVALID_TOKEN | link sau cod expirat ori folosit |
WEAK_PASSWORD | parola nu respectă politica |
EMAIL_TAKEN | există deja un cont cu acest e-mail |
ACCOUNT_SUSPENDED | contul clientului e suspendat |
ACCOUNT_DISABLED | contul membrului echipei e dezactivat |
PAYMENT_DECLINED | cardul a fost refuzat; reason |
LISTING_UNAVAILABLE | anunțul nu mai e de vânzare |
COUPON_INVALID | cuponul nu se poate folosi; reason (unknown, expired, used_up…) |