Docs/Reseller API
Reseller API

SparkGlim White-Label Reseller API

Authenticated portal API for approved reseller organizations managing profile, reseller relationship records, approvals, payment methods, payout rules, and OTP flows.

API context

Base path

/api/white-label/portal/reseller

Audience

Signed-in reseller operators using the SparkGlim portal session.

Authentication

Existing authenticated SparkGlim session via requireAuth. This is not HMAC white-label v1 authentication.

Overview

Overview

Use this API for reseller portal operations only.

Reseller records are white-label relationship and oversight records. They are not a second replacement for SparkGlim creator team login.

Team and member relationship

SparkGlim creator team add-member, member login, organizer OTP, and team sessions are handled by the existing creator team system backed by organizer_teams and organizer_sessions.

Use POST /portal/reseller/members to add the member. Separate reseller invitation endpoints are not advertised; the member completes their information through the normal organizer/team flow.

Errors

Most reseller portal handler errors return 400, unauthorized returns 401, and missing/not-enabled console routes can return 404.

Implementation audit

These docs are tied to the current backend implementation.

Mounted inside the same white-label router, but under /api/white-label/portal/reseller.
Relationship records use whiteLabelResellerMemberCreateSchema. No direct creator creation endpoint is documented.
SparkGlim creator team invite, team login, organizer OTP, and organizer sessions remain the existing organizer_teams and organizer_sessions flow.
Responses use { success, data } or { success: false, error } without white-label requestId.

Overview

GET
Overview
server/src/api/routes/white-label.ts:754

Load reseller console

Loads reseller console data for the signed-in user.

GET /api/white-label/portal/reseller

Authentication

Authenticated SparkGlim session

Permissions

None documented for this route

NameLocationTypeRequiredDescription
AuthorizationheaderBearer session tokenYesExisting authenticated SparkGlim user session. The server reads req.auth.userId.

Profile

PATCH
Profile
server/src/api/routes/white-label.ts:766; server/src/white-label/schemas.ts:191

Update reseller profile

Updates reseller profile settings such as status, risk level, approval requirements, public signup, and settings.

PATCH /api/white-label/portal/reseller/profile

Authentication

Authenticated SparkGlim session

Permissions

None documented for this route

NameLocationTypeRequiredDescription
AuthorizationheaderBearer session tokenYesExisting authenticated SparkGlim user session. The server reads req.auth.userId.
statusbodydraft | enabled | suspended | disabledNoReseller profile status.
requireSubCreatorApprovalbodybooleanNoWhether sub-creator approval is required.
allowPublicSignupbodybooleanNoWhether public signup is enabled.

Members

POST
Members
server/src/api/routes/white-label.ts:779; server/src/white-label/schemas.ts:205

Create reseller relationship record

Adds the member through the SparkGlim creator team flow, then stores the white-label reseller relationship link.

POST /api/white-label/portal/reseller/members

Authentication

Authenticated SparkGlim session

Permissions

None documented for this route

NameLocationTypeRequiredDescription
AuthorizationheaderBearer session tokenYesExisting authenticated SparkGlim user session. The server reads req.auth.userId.
userIdbodyuuid | nullNoOptional linked existing user ID.
creatorIdbodyuuid | nullNoCreator account whose SparkGlim team should receive this member. Defaults to the reseller owner creator where available.
memberTypebodyowner | operator | finance | support | sub_creatorNoMember type.
displayNamebodystringNoDisplay name.
rolesbodyrole[]NoReseller roles.
permissionsbodycapability[]NoCapability list.
PATCH
Members
server/src/api/routes/white-label.ts:792

Update reseller relationship record

Partially updates the white-label reseller relationship and syncs the linked SparkGlim creator team member where applicable.

PATCH /api/white-label/portal/reseller/members/:memberId

Authentication

Authenticated SparkGlim session

Permissions

None documented for this route

NameLocationTypeRequiredDescription
AuthorizationheaderBearer session tokenYesExisting authenticated SparkGlim user session. The server reads req.auth.userId.
memberIdpathuuidYesMember ID.

Approvals

POST
Approvals
server/src/api/routes/white-label.ts:818; server/src/white-label/schemas.ts:277

Create approval request

Creates a reseller approval request for implemented entities such as member, campaign, withdrawal, payout, payment_method, ussd, provider, or setting.

POST /api/white-label/portal/reseller/approval-requests

Authentication

Authenticated SparkGlim session

Permissions

None documented for this route

NameLocationTypeRequiredDescription
AuthorizationheaderBearer session tokenYesExisting authenticated SparkGlim user session. The server reads req.auth.userId.
entityTypebodymember | campaign | withdrawal | payout | payment_method | ussd | provider | settingYesEntity type.
reasonbodystring | nullNoReason for review.
requestPayloadbodyobjectNoRequest payload.

OTP

POST
OTP
server/src/api/routes/white-label.ts:870; server/src/white-label/schemas.ts:232

Send reseller OTP

Creates a reseller OTP challenge for login, signup, withdrawal approval, payment method verification, or campaign approval.

POST /api/white-label/portal/reseller/otp/send

Authentication

Authenticated SparkGlim session

Permissions

None documented for this route

NameLocationTypeRequiredDescription
AuthorizationheaderBearer session tokenYesExisting authenticated SparkGlim user session. The server reads req.auth.userId.
channelbodysms | email | whatsappYesDelivery channel.
recipientbodystringYesRecipient address or number.
purposebodylogin | signup | withdrawal_approval | payment_method_verification | campaign_approvalYesOTP purpose.