API Docs
YMS API
Get Authorization

Default Module

YMS SaaS Platform Base API - Core Functionality Only

Base URLs:

Authentication

  • HTTP Authentication, scheme: bearer

Auth Management/Level 1

POST Login by Password

POST /auth/yms/login-by-password

Body Request Parameters

{
  "username": "string",
  "password": "string",
  "tenantId": "string"
}

Request Parameters

NameLocationTypeRequiredDescription
X-Tenant-IDheaderstringNonone
Item-Time-ZoneheaderstringNonone
AuthorizationheaderstringNonone
bodybodyUserLoginCmdNonone

Response Example

200 Response

{
  "code": 0,
  "msg": "",
  "success": false,
  "data": {
    "refreshToken": "",
    "accessToken": "",
    "idToken": "",
    "userProfile": {
      "userId": "",
      "userName": "",
      "admin": false,
      "tenantId": "",
      "yardList": [
        {
          "yardId": "",
          "yardName": "",
          "timezone": ""
        }
      ],
      "yardIds": [
        ""
      ],
      "defaultYardId": ""
    },
    "userDetail": {
      "email": "",
      "firstName": "",
      "lastName": "",
      "userName": "",
      "userPermissions": [
        {
          "id": 0,
          "name": "",
          "parentId": 0,
          "title": ""
        }
      ]
    },
    "tenants": [
      {
        "tenantId": "",
        "tenantName": "",
        "unisCompany": false,
        "yards": [
          {
            "yardId": "",
            "yardName": "",
            "timezone": ""
          }
        ]
      }
    ],
    "tenantUserProfilesMap": {
      "": {
        "userId": "",
        "userName": "",
        "admin": false,
        "tenantId": "",
        "yardList": [
          {
            "yardId": "",
            "yardName": "",
            "timezone": ""
          }
        ],
        "yardIds": [
          ""
        ],
        "defaultYardId": ""
      }
    }
  }
}

Response

Status CodeStatus Code DescriptionDescriptionData Model
200OK (opens in a new tab)noneRUserLoginView

Data Models

YardIsolatedView

{
  "yardId": "string",
  "yardName": "string",
  "timezone": "string"
}
 

Properties

NameTypeRequiredConstraintsTitleDescription
yardIdstringfalsenonenone
yardNamestringfalsenonenone
timezonestringfalsenonenone

UserProfileView

{
  "userId": "string",
  "userName": "string",
  "admin": true,
  "tenantId": "string",
  "yardList": [
    {
      "yardId": "string",
      "yardName": "string",
      "timezone": "string"
    }
  ],
  "yardIds": [
    "string"
  ],
  "defaultYardId": "string"
}
 

Properties

NameTypeRequiredConstraintsTitleDescription
userIdstringfalsenoneUnique identifier for the user in the system
userNamestringfalsenoneDisplay name of the user as shown in the interface
adminbooleanfalsenoneAdministrative privilege status indicating whether the user has system admin rights (true/false)
tenantIdstringfalsenoneTenant identifier that the user belongs to for multi-tenant isolation
yardList[YardIsolatedView]falsenoneDetailed list of yards the user has access to with complete yard information and isolation settings
yardIds[string]falsenoneSimple list of yard identifiers that the user has access to, used for quick reference
defaultYardIdstringfalsenoneDefault yard identifier that is automatically selected for this user when logging in

UserLoginView

{
  "refreshToken": "string",
  "accessToken": "string",
  "idToken": "string",
  "userProfile": {
    "userId": "string",
    "userName": "string",
    "admin": true,
    "tenantId": "string",
    "yardList": [
      {
        "yardId": "string",
        "yardName": "string",
        "timezone": "string"
      }
    ],
    "yardIds": [
      "string"
    ],
    "defaultYardId": "string"
  },
  "userDetail": {
    "email": "string",
    "firstName": "string",
    "lastName": "string",
    "userName": "string",
    "userPermissions": [
      {
        "id": 0,
        "name": "string",
        "parentId": 0,
        "title": "string"
      }
    ]
  },
  "tenants": "Collections.emptyList()",
  "tenantUserProfilesMap": "Collections.emptyMap()"
}
 

Properties

NameTypeRequiredConstraintsTitleDescription
refreshTokenstringfalsenoneJWT refresh token used to obtain new access tokens
accessTokenstringfalsenoneJWT access token for authenticating API requests
idTokenstringfalsenoneJWT ID token containing user identity information
userProfileUserProfileViewfalsenoneBasic user profile information including name, email, etc.
userDetailUserDetailViewfalsenoneDetailed user information including preferences and settings
tenants[Tenant]falsenoneList of tenant organizations that the user has access to
tenantUserProfilesMapMapUserProfileViewfalsenoneMap of user profiles for each tenant, keyed by tenant ID

RUserLoginView

{
  "code": 0,
  "msg": "string",
  "success": true,
  "data": {
    "refreshToken": "string",
    "accessToken": "string",
    "idToken": "string",
    "userProfile": {
      "userId": "string",
      "userName": "string",
      "admin": true,
      "tenantId": "string",
      "yardList": [
        {
          "yardId": "string",
          "yardName": "string",
          "timezone": "string"
        }
      ],
      "yardIds": [
        "string"
      ],
      "defaultYardId": "string"
    },
    "userDetail": {
      "email": "string",
      "firstName": "string",
      "lastName": "string",
      "userName": "string",
      "userPermissions": [
        {
          "id": 0,
          "name": "string",
          "parentId": 0,
          "title": "string"
        }
      ]
    },
    "tenants": "Collections.emptyList()",
    "tenantUserProfilesMap": "Collections.emptyMap()"
  }
}
 

Properties

NameTypeRequiredConstraintsTitleDescription
codeinteger(int64)falsenonenone
msgstringfalsenonenone
successbooleanfalsenonenone
dataUserLoginViewfalsenonenone

UserLoginCmd

{
  "username": "string",
  "password": "string",
  "tenantId": "string"
}
 

Properties

NameTypeRequiredConstraintsTitleDescription
usernamestringtruenonenone
passwordstringtruenonenone
tenantIdstringfalsenonenone

PermissionDTO

{
  "id": 0,
  "name": "string",
  "parentId": 0,
  "title": "string"
}
 

Properties

NameTypeRequiredConstraintsTitleDescription
idinteger(int64)falsenonenone
namestringfalsenonenone
parentIdinteger(int64)falsenonenone
titlestringfalsenonenone

UserDetailView

{
  "email": "string",
  "firstName": "string",
  "lastName": "string",
  "userName": "string",
  "userPermissions": [
    {
      "id": 0,
      "name": "string",
      "parentId": 0,
      "title": "string"
    }
  ]
}
 

Properties

NameTypeRequiredConstraintsTitleDescription
emailstringfalsenonenone
firstNamestringfalsenonenone
lastNamestringfalsenonenone
userNamestringfalsenonenone
userPermissions[PermissionDTO]falsenonenone

key

{
  "userId": "string",
  "userName": "string",
  "admin": true,
  "tenantId": "string",
  "yardList": [
    {
      "yardId": "string",
      "yardName": "string",
      "timezone": "string"
    }
  ],
  "yardIds": [
    "string"
  ],
  "defaultYardId": "string"
}
 

Properties

NameTypeRequiredConstraintsTitleDescription
userIdstringfalsenoneUnique identifier for the user in the system
userNamestringfalsenoneDisplay name of the user as shown in the interface
adminbooleanfalsenoneAdministrative privilege status indicating whether the user has system admin rights (true/false)
tenantIdstringfalsenoneTenant identifier that the user belongs to for multi-tenant isolation
yardList[YardIsolatedView]falsenoneDetailed list of yards the user has access to with complete yard information and isolation settings
yardIds[string]falsenoneSimple list of yard identifiers that the user has access to, used for quick reference
defaultYardIdstringfalsenoneDefault yard identifier that is automatically selected for this user when logging in

YardInfo

{
  "yardId": "string",
  "yardName": "string",
  "timezone": "string"
}
 

Properties

NameTypeRequiredConstraintsTitleDescription
yardIdstringfalsenoneUnique yard identifier
yardNamestringfalsenoneHuman-readable yard name for display
timezonestringfalsenoneTimezone identifier of the yard, e.g., "America/Los_Angeles"

Tenant

{
  "tenantId": "string",
  "tenantName": "string",
  "unisCompany": true,
  "yards": "Collections.emptyList()"
}
 

Properties

NameTypeRequiredConstraintsTitleDescription
tenantIdstringfalsenoneUnique tenant identifier
tenantNamestringfalsenoneHuman-readable tenant name for display
unisCompanybooleanfalsenoneWhether this tenant is a UniS company
yards[YardInfo]falsenoneList of yards associated with this tenant
Defaults to empty list to ensure safe iteration

MapUserProfileView

{
  "key": {
    "userId": "string",
    "userName": "string",
    "admin": true,
    "tenantId": "string",
    "yardList": [
      {
        "yardId": "string",
        "yardName": "string",
        "timezone": "string"
      }
    ],
    "yardIds": [
      "string"
    ],
    "defaultYardId": "string"
  }
}
 

Properties

NameTypeRequiredConstraintsTitleDescription
keykeyfalsenonenone