Skip to main content

Create Sub-Account (Supports API Key)

POST
/api/v1/create-account/sub-account

Creates a new sub-account with specified details (name, prefix, volume, plans, etc.).

🔑 Authentication

  • Client Portal Context: Automatically authenticated via standard JWT Bearer token.
  • External Integration Context: Supports authentication via API Key header: X-API-Key: <your_api_key>.

🔄 Automatic Main Account Association

  • The parent mainAccountId is optional and should normally be omitted.
  • The backend will automatically resolve the correct parent mainAccountId from the authenticated session context (API Key or JWT owner).

📋 Body Parameter Guide & Sourcing Dropdowns

To populate the body parameters, make queries to the following endpoints:

  • monthlyVolumeId: Fetch valid volume IDs from GET /shared/dropdown/monthly-volumes (or GET /create-account/volume)
  • industryTypeId: Fetch valid industry type IDs from GET /shared/dropdown/industry-types (or GET /create-account/industry)
  • serviceUsagePlanIds: Fetch valid usage plan IDs from GET /shared/dropdown/service-usage-plans (or GET /create-account/service-usage-plans)
  • marketAreaIds: Fetch valid market area IDs from GET /shared/dropdown/market-areas (or GET /create-account/market-area)
  • interestServiceIds / defaultShipmentServiceIds: Fetch valid shipment service IDs from GET /shared/dropdown/shipment-services (or GET /create-account/shipment-services)

Request

Responses

200 OK

Sub-account created and initialized successfully

401 Unauthorized

Unauthorized - Invalid or missing credentials

409 Conflict

Conflict - Duplicate sub-account prefix or invalid input configuration