Skip to main content

Internal hub object with comprehensive administrative and operational details

_id
string
required

Unique identifier for the hub (MongoDB ObjectId)

Example:

"65c1f68ea735b522d370ea25"

organizationId
string
required

Organization identifier that owns this hub

Example:

"65c1f4eeca7c4816d94587b2"

name
string
required

Hub name or identifier

Example:

"Jakarta Central Hub"

address
string
required

Full address of the hub

Example:

"Jl. Sudirman No. 123, Jakarta Pusat, DKI Jakarta 10220"

coordinates
object
required

Hub geographic coordinates

status
enum<string>
required

Hub operational status

Available options:
active,
inactive,
maintenance
Example:

"active"

code
string

Short code for the hub

Example:

"JKT-CTR"

timezone
string

Hub timezone

Example:

"Asia/Jakarta"

workingHours
object

Hub operating hours

capacity
object

Hub capacity and limits

contactInfo
object

Hub contact information

services
string[]

Services available at this hub

Example:
[
  "loading",
  "unloading",
  "storage",
  "maintenance",
  "fueling"
]
vehicles
object[]

Vehicles assigned to this hub

users
object[]

Users with access to this hub

statistics
object

Hub operational statistics

createdBy
string

Email of admin who created this hub

Example:

"admin@mile.app"

updatedBy
string

Email of admin who last updated this hub

Example:

"admin@mile.app"

createdTime
string<date-time>

ISO 8601 timestamp when hub was created

Example:

"2024-01-10T08:00:00.000000Z"

updatedTime
string<date-time>

ISO 8601 timestamp when hub was last updated

Example:

"2024-02-06T15:30:00.000000Z"

internalNotes
string

Internal administrative notes (not visible to public API)

Example:

"Hub requires infrastructure upgrade for increased capacity"

maintenanceSchedule
object[]

Scheduled maintenance activities

systemMetadata
object

Internal system metadata

failedCode
enum<string>

Hub Module business failedCode that indicate specific failure conditions or business rule violations during hub module operations. These codes help identify the failed operation of hub-related and provide standardized failure identification across the system.

Possible values:

  • hub-031: Duplicate entry - Hub identifier already exists
  • hub-033: Hub not found - Hub record does not exist
  • hub-034: Hub name already exists - Hub name already used
  • hub-035: Access forbidden - User lacks hub permission
  • hub-036: Hub creation failed - Failed to create hub
  • hub-037: Hub update failed - Failed to update hub
  • hub-038: Hub update failed by coordinate - Invalid coordinates provided
  • hub-039: Hub delete failed assosiated to other things - Hub has associated resources
  • hub-045: Server failure - Internal server failure
Available options:
hub-031,
hub-033,
hub-034,
hub-035,
hub-036,
hub-037,
hub-038,
hub-039,
hub-045