Seller Orchestra Internal API Mapping

Account Onboarding

Complete 3-layer API flow: API Gateway -> Orchestration -> Core Microservices for seller account registration and setup

3-Layer Architecture

Seller API Gateway Public
Seller Admin Orchestration
User / Account Service Core Microservices

Future Architecture Note

Currently, all account registration and onboarding logic resides in the Seller Admin orchestration layer. In future releases, this will be migrated to a dedicated Seller Onboarding & Setup Microservice (Orchestra Layer) for better separation of concerns.

Register New Seller Account

Complete seller registration with user, account, domain, and store creation

POST
Seller API Gateway
POST /merchant/api/v1/account
Body: { mode, username, password, first_name, last_name, email, phone, country, currency, timezone, domain: { name, store: { name } }, business_details, locale }
Seller Admin
POST /merchant/api/v1/account

8-Step Registration Flow (AccountService.registerNewAccount):

  1. Generate unique 6-digit account identifier
  2. Register user in User Service (POST /register)
  3. Create account in Account Service (POST /api/accounts)
  4. Create domain with category and module (POST /api/domains)
  5. Create default store for domain (POST /api/stores)
  6. Create default subscription (POST /api/subscriptions)
  7. Copy GCP template folder to domain resource folder
  8. Auto-login user and return token

Rollback: If any step fails, all previously created resources are rolled back

Core Microservices
1 POST /register User Service · Core Microservices
2 POST /api/accounts Account Service · Core Microservices
3 POST /api/domains Account Service · Core Microservices
4 POST /api/stores Account Service · Core Microservices
5 POST /api/subscriptions Account Service · Core Microservices
6 POST /api/cloud/copy-folder Cloud Service · GCP Storage
7 POST /auth User Service · Core Microservices

Check User Exists

Check if a user exists by email or phone before registration

GET
Seller API Gateway
GET /merchant/api/v1/users?email=...&phone=...
Seller Admin
GET /merchant/api/v1/users
Core Microservices
1 GET /users?email=...&phone=... User Service · Core Microservices

Get Account Details

Retrieve seller account with domains and permissions

GET
Seller API Gateway
GET /merchant/api/v1/account
Seller Admin
GET /merchant/api/v1/account

Uses Redis caching (TTL: 1 hour)

Core Microservices
1 GET /api/accounts/:account_id Account Service · Core Microservices
2 GET /api/accounts/:account_id/domains Account Service · Core Microservices

Update Account

Update seller account information

PUT
Seller API Gateway
PUT /merchant/api/v1/account
Seller Admin
PUT /merchant/api/v1/account

Invalidates Redis cache after update

Core Microservices
1 PUT /api/accounts/:account_id Account Service · Core Microservices

Delete/Deactivate Account

Soft delete seller account (via logout with deleteAccount flag)

DELETE
Seller API Gateway
DELETE /merchant/api/v1/auth?deleteAccount=true
Seller Admin
DELETE /merchant/api/v1/auth?deleteAccount=true

Disables user account and removes session

Core Microservices
1 DELETE /auth?deleteAccount=true User Service · Core Microservices

Get Subscription Plans

List available subscription plans for seller onboarding

GET
Seller API Gateway
GET /merchant/api/v1/subscription_plans
Seller Admin
GET /merchant/api/v1/subscription_plans
Core Microservices
1 GET /api/subscription_plans Account Service · Core Microservices

Get Reference Data

Get countries, states, cities for registration form

GET
Seller API Gateway
GET /merchant/api/v1/countries GET /merchant/api/v1/states GET /merchant/api/v1/cities GET /merchant/api/v1/enums
Seller Admin
GET /merchant/api/v1/countries GET /merchant/api/v1/states GET /merchant/api/v1/cities GET /merchant/api/v1/enums
Core Microservices
1 GET /api/countries Utility Service · Core Microservices
2 GET /api/states Utility Service · Core Microservices
3 GET /api/cities Utility Service · Core Microservices
4 GET /api/enums Utility Service · Core Microservices

Account Onboarding Features

Complete seller registration flow with automatic user, account, domain, store, and subscription creation. Includes rollback mechanism for failed registrations.

Multi-step Registration - Auto Domain/Store Setup - GCP Resource Initialization - Rollback Support