Skip to content

Login

GET
/authentication/login
curl --request GET \
--url https://api.tradecloud1.com/v2/authentication/login \
--header 'Authorization: Basic <credentials>'

Use basic authentication to get access and refresh tokens.

Successfully authenticated, use the tokens provided in the headers.

Media typeapplication/json
object
username
required

The username of the identity.

string
userId

The user identifier this identity is authorized for.

string format: uuid
userRoles
required
Array<string>
Allowed values: admin integration super_user support actAsSupplier
companyRoles
required
Array<string>
Allowed values: buyer supplier actAsSupplier
companyId
required

The company identifier this identity is authorized for.

string format: uuid
authorizedCompanyIds
required

The additional company identifiers this identity is authorized for.

Array<string>
twoFAEnabled
required

The identity has enabled two factor authentication.

boolean
twoFAEnforced

Two factor authentication is enforced for this identity.

boolean
status
required

The identity authentication status:

  • unauthenticated - the identity needs to authenticate with username & password
  • authenticated - the identity has been completely authenticated
  • needs_2fa_code_verification - the identity needs to authenticate with a TOTP
  • needs_2fa_setup - the identity needs to setup second factor authentication
string
Allowed values: unauthenticated authenticated needs_2fa_code_verification needs_2fa_setup
identityProvider

The provider of the identity.

string
Allowed values: tradecloud azure_ad

Example

{
"userRoles": [
"admin"
],
"companyRoles": [
"buyer"
],
"status": "unauthenticated",
"identityProvider": "tradecloud"
}
Set-Authorization
string

Access token

Set-Refresh-Token
string

Refresh token

Not authenticated, the user should authenticate using basic authentication.

Media typeapplication/json

Not authenticated, the user should authenticate using basic authentication.

object
message
required

The authentication failure message

string
attemptsLeft
required

The number of login attempts that are left

integer
banned

The number of seconds that remain until a next authentication attempt can be made

integer

Example generated

{
"message": "example",
"attemptsLeft": 1,
"banned": 1
}

Service is not healthy (internal error), Tradecloud ops will be alerted.

Service is not healthy (bad gateway), Tradecloud ops will be alerted.

Service is unavailable (overloaded or down for maintenance), Tradecloud ops will be alerted.

Service is unavailable (gateway timeout), Tradecloud ops will be alerted.