最近更新时间:


接口说明

说明
  • 用于查询ES或审批单生成的制度详情
注意
  1. 返回结果中,souece=2或3时,表明此条制度是由需审批类的制度模板,通过员工申请、审批后生成,此时,以institution_id通过当前接口再次查询,可获得制度模板的详细信息

    1. source:1代表通用规则,非审批而来,2代表行前审批,3代表差旅
    2. source=2 & scene_type =1时,代表由行前审批制度,审批而来的自叫车
    3. source=2 & scene_type =91时,代表由行前审批制度,审批而来的代叫车
    4. source=3 & scene_type =1时,代表由差旅制度,审批而来的市内用车
    5. source=3 & scene_type =92时,代表由差旅制度,审批而来的接送服务用车
    6. source=4 无需审批代订场景下的临时制度

基本信息

HTTP URL

/river/Regulation/detail

HTTP Method

GET

权限要求


请求头

参数名称

参数值

Content-Type

application/x-www-form-urlencoded

请求参数

字段名

字段说明

字段类型

必填

备注

client_id

申请应用时分配的AppKey

string

Y


access_token

授权后的access token

string

Y


company_id

公司 ID

string

Y


regulation_id

制度ID

string

Y


timestamp

当前时间戳

bigint

Y


sign

签名

string

Y



请求示例

curl -X GET -H "Content-Type: application/x-www-form-urlencoded" https://api.es.xiaojukeji.com/river/Regulation/detail?client_id=client_id_test&access_token=141ea31466478eab2f1c1ddcca2675b989a16552&timestamp=1566764837&company_id=12345678980&regulation_id=9668294457792204005&sign=091cf244ad5ab16935cfe44fc698bc58

响应参数

字段名

字段说明

字段类型

备注

errno

0表示成功,非0表示失败

int


errmsg

errno=0时为常量"SUCCESS",errno!=0时为错误信息

string


data

制度信息

object



data数组元素格式

字段名

字段说明

字段类型

备注

regulation_id

制度id

string


regulation_name

制度名称

string


regulation_status

制度状态

int

(0-停用 1-正常 2-删除 3-过期)

source

来源

int

来源(1-通用规则 2-行前审批 3-差旅 4-无需审批)

scene_type

因公出行场景

int

(0-个人用车、1-商务出行、2-需审批差旅制度、3-加班、4-办公地点通勤、5-疫期通勤、11-会议用车、91-代叫车、92-接送机、93-包车、94-代驾、95-私车同行、96-行前审批、104-无需审批差旅制度)

is_use_quota

是否使用个人限额

int

(0-不使用、1-使用),差旅制度默认返回不使用

is_approve

制度是否需要审批

int

(0-无需审批,1-行前审批,2-差旅)

institution_id

制度模板ID

string


approval_type

审批类型

int

(0-无需审批 1-差旅 2-行前审批按次数 3-行前审批按日期)

car_rule

用车规则

object


car_rule元素定义

字段名

字段说明

字段类型

备注

call_type

叫车方式

[]int

(1-自用、2-代叫)

use_scene

使用场景

[]int

(1-市内用车、2-接送机、3、4-接送其他)

响应示例

正常示例

{
    "errno": 0,
    "errmsg": "SUCCESS",
    "data": {
        "regulation_id": "1125925277919770",
        "regulation_name": "按日期2",
        "regulation_employee_name": "申请用车",
        "regulation_employee_description": "",
        "regulation_status": "1",
        "is_approve": 1,
        "scene_type": "96",
        "is_use_quota": 0,
        "source": 1,
        "city_type": 0,
        "car_rule": {
            "call_type": [
                1
            ],
            "use_scene": [
                1
            ]
        },
        "institution_id": "",
        "approval_type": 3
    },
    "request_id": "7YN9f1zgAR9yDsVyxKrA1o670UIMYHHgK4bFErHcjz2ouu1Dx61Ner0CJAoxHLO2"
}

异常示例


错误码

通用错误解决方案

  1. 4xx 错误
  2. 1xxx 错误


版本记录

日期

更新人

更新内容

上线时间

2023.11.16

陈继诗

迁移文档