Kunlun-CRS
  1. 用户
Kunlun-CRS
  • kunlun-crs-kws-rest
    • v1
      • 用户
        • 登录
          POST
        • 用SessionId登录
          POST
      • 房价策略
        • 检查房价策略
      • 库存
        • 采集库存变化
      • 酒店
        • 初始化 酒店 已售房到mongo
        • 初始化 酒店可用房到mongo
        • 酒店房量变化信息采集
        • 查询酒店促销信息
        • 查询酒店在渠道下限量售卖库存
        • 查询单个酒店单个渠道日历价格
      • 房价
        • 查房
  1. 用户

登录

POST
/rest/v1/user/login
通过用户名、密码登录获取token

请求参数

Body 参数application/json
traceID
string 
请求ID
必需
调用链ID,链路请求的唯一标识,用于链路追踪
timestamp
number 
请求时间
必需
每次请求发起的时间
languageCode
string 
语言编码
可选
语言编码
默认值:
cn
data
object  | null 
业务数据
必需
根据业务接口定义
username
string 
用户名
必需
password
string 
密码
必需
示例
{
    "traceID": "aCB28eAF-B3bE-b795-a5fC-4141C2553CA8",
    "timestamp": 1685344081,
    "languageCode": "cn",
    "data": {
        "username": "CRS1",
        "password": "dlSJKLgx1#"
    }
}

示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST '/rest/v1/user/login' \
--header 'Content-Type: application/json' \
--data-raw '{
    "traceID": "aCB28eAF-B3bE-b795-a5fC-4141C2553CA8",
    "timestamp": 1685344081,
    "languageCode": "cn",
    "data": {
        "username": "CRS1",
        "password": "dlSJKLgx1#"
    }
}'

返回响应

🟢200成功
application/json
Body
code
integer 
响应状态码
必需
默认值:
0
示例值:
0
message
string  | null 
响应信息
可选
errorStack
string  | null 
错误堆栈详情
可选
data
object 
必需
accessToken
string 
必需
expiresIn
integer 
必需
tokenType
string 
必需
默认值:
Bearer
示例值:
Bearer
示例
{
    "code": 33,
    "data": {
        "accessToken": "est occaecat non",
        "expiresIn": 60,
        "tokenType": "enim"
    },
    "message": null,
    "errorStack": null
}
修改于 2024-12-31 02:40:03
下一页
用SessionId登录
Built with