Skip to content

新增车辆 ​

请求地址 ​

https://www.xxyb.cn/union/api/wlpt/consignor/createVehicle

参数名必选类型说明
Token是String应用令牌
cid是String合作ID

注意事项 ​

部分字段是否必填由业务决定,请联系对接方获取

请求参数 ​

参数名必选类型层级说明备注
vehicleBasicDomain是Object1车辆基础信息
licensePlateNumber是String2车辆牌号
licensePlateColor是Enum2车牌颜色见下方车牌颜色
vehicleAuthDomain否Object1车辆认证信息
vehicleType是Enum2车型见下方车型
vehicleLength是Decimal2车长单位:米
vehicleEnergyType是Enum2车辆能源类型见下方车辆能源类型
vehicleIdentificationNumber是String2车辆识别代码
vehicleLicenseFrontImg是String2行驶证正面图片
vehicleLicenseBackImg是String2行驶证反面图片
vehicleLicenseClipImg否String2行驶证夹页面图片
vehicleLicenseRegisterTime是String2行驶证注册时间yyyy-MM-dd
vehicleLicenseExpireTime是String2行驶证证有效期yyyy-MM
vehicleLicenseIssuingAuthority是String2行驶证发证机关
vehicleLicenseIssuingTime是String2行驶证发证时间yyyy-MM-dd
roadTransportLicense否String2道路运输许可证
roadTransportLicenseImg否String2道路运输许可证图片
roadTransportLicenseAnnualInspectionImg否String2道路运输许可年检页图片
roadTransportLicenseExpireTime否String2道路运输许可证有效期yyyy-MM-dd
roadTransportBusinessLicense否String2道路运输经营许可证
trailerLicenseNumber否String2挂车牌照号
trailerLicenseImg否String2挂车正本图片
trailerLicenseBackImg否String2挂车副本图片
groupPhotoImg否String2人车合照
totalMass是Decimal2总质量单位:吨
approvedLoad是Decimal2核定载质量单位:吨
curbWeight否Decimal2整备质量单位:吨
overallDimensions否String2外廓尺寸6820X2500X3540mm 单位:毫米
useNature是String2使用性质
creditCode否String2统一社会信用代码/身份证号
vehicleOwner是String2车辆所有人
vehicleOwnerExpireTime否String2车辆所有人有效期
vehicleOwnerAuthDomain否Object1车辆自有认证信息车老板模式时此字段生效
ownerId是String2所有人ID车老板ID
affiliationAgreement否Array2挂靠协议
purchaseContract否Array2购车合同
registrationCertificate否Array2机动车登记证
ownershipMaterial否Array2所有权材料

入参示例 ​

json
{
  "vehicleBasicDomain": {
    "licensePlateNumber": "京A12345",
    "licensePlateColor": "YELLOW"
  },
  "vehicleAuthDomain": {
    "vehicleType": "HEAVY_ORDINARY_TRUCK",
    "vehicleLength": 9.6,
    "vehicleEnergyType": "B",
    "vehicleIdentificationNumber": "LSVAG21J0J3000000",
    "vehicleLicense": "1234567890123456789",
    "vehicleLicenseFrontImg": "https://example.com/vehicle_license_front.jpg",
    "vehicleLicenseBackImg": "https://example.com/vehicle_license_back.jpg",
    "vehicleLicenseClipImg": "https://example.com/vehicle_license_clip.jpg",
    "vehicleLicenseRegisterTime": "2015-01-01",
    "vehicleLicenseExpireTime": "2025-01",
    "vehicleLicenseIssuingAuthority": "北京市公安局交通管理局",
    "vehicleLicenseIssuingTime": "2015-01-01",
    "roadTransportLicense": "RT123456789",
    "roadTransportLicenseImg": "https://example.com/road_transport_license.jpg",
    "roadTransportLicenseAnnualInspectionImg": "https://example.com/road_transport_license.jpg",
    "roadTransportLicenseExpireTime": "2025-01-01",
    "roadTransportBusinessLicense": "RTBL123456789",
    "trailerLicenseNumber": "京B12345",
    "trailerLicenseImg": "https://example.com/trailer_license.jpg",
    "trailerLicenseBackImg": "https://example.com/trailer_license.jpg",
    "groupPhotoImg": "https://example.com/group_photo.jpg",
    "totalMass": 48.87,
    "approvedLoad": 40.00,
    "curbWeight": 8.87,
    "overallDimensions": "6820X2500X3540mm",
    "useNature": "货运",
    "creditCode": "91110105MA00123456",
    "vehicleOwner": "张三",
    "vehicleOwnerExpireTime": "2025-01-01"
  },
  "vehicleOwnerAuthDomain": {
    "ownerId": "123456789",
    "affiliationAgreement": [
      "https://example.com/affiliation_agreement_1.pdf",
      "https://example.com/affiliation_agreement_2.pdf"
    ],
    "purchaseContract": [
      "https://example.com/purchase_contract_1.pdf",
      "https://example.com/purchase_contract_2.pdf"
    ],
    "registrationCertificate": [
      "https://example.com/registration_certificate_1.pdf",
      "https://example.com/registration_certificate_2.pdf"
    ],
    "ownershipMaterial": [
      "https://example.com/ownership_material_1.pdf",
      "https://example.com/ownership_material_2.pdf"
    ]
  }
}

入参对象 ​

java

@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
@Schema(description = "创建车辆")
public class ApiConsignorVehicleCreateReq {

    @Schema(description = "车辆基础信息")
    @Valid
    @NotNull(message = "车辆基础信息不能为空")
    private ApiVehicleBasicDomain vehicleBasicDomain;

    @Schema(description = "车辆认证信息")
    @Valid
    private ApiVehicleAuthDomain vehicleAuthDomain;

    @Schema(description = "车辆自有认证信息")
    @Valid
    private ApiVehicleOwnerAuthDomain vehicleOwnerAuthDomain;

    @Setter
    @Getter
    @Accessors(chain = true)
    @Schema(description = "车辆基础信息")
    public class ApiVehicleBasicDomain {

        @Schema(description = "车辆牌号")
        @NotBlank(message = "车辆牌号不能为空")
        @Pattern(regexp = "^(([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-Z](([0-9]{5}[ABCDEFGHJK])|([ABCDEFGHJK]([A-HJ-NP-Z0-9])[0-9]{4})))|([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领]\\d{3}\\d{1,3}[领])|([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-Z][A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳使领]))$", message = "车牌号格式不合法")
        private String licensePlateNumber;

        @Schema(description = "车牌颜色", example = "YELLOW")
        @NotNull(message = "车牌颜色不能为空")
        private ColorEnum licensePlateColor;

    }

    @Setter
    @Getter
    @Accessors(chain = true)
    @Schema(description = "车辆认证信息")
    public class ApiVehicleAuthDomain {

        @Schema(description = "车型", example = "HEAVY_ORDINARY_TRUCK")
        @NotNull(message = "车型不能为空")
        private VehicleTypeEnum vehicleType;

        @Schema(description = "车长(米)", example = "9.6")
        @NotNull(message = "车长不能为空")
        private BigDecimal vehicleLength;

        @Schema(description = "车辆能源类型", example = "B")
        @NotNull(message = "车辆能源类型不能为空")
        private VehicleEnergyTypeEnum vehicleEnergyType;

        @Schema(description = "车辆识别代码")
        @NotBlank(message = "车辆识别代码不能为空")
        private String vehicleIdentificationNumber;

        @Schema(description = "行驶证件号")
        private String vehicleLicense;

        @Schema(description = "行驶证正面图片", example = "https://xx/yy.png")
        @NotBlank(message = "行驶证正面图片不能为空")
        private String vehicleLicenseFrontImg;

        @Schema(description = "行驶证反面图片", example = "https://xx/yy.png")
        @NotBlank(message = "行驶证反面图片不能为空")
        private String vehicleLicenseBackImg;

        @Schema(description = "行驶证夹页面图片", example = "https://xx/yy.png")
        private String vehicleLicenseClipImg;

        @Schema(description = "行驶证注册时间", example = "yyyy-MM-dd")
        @NotBlank(message = "行驶证注册时间不能为空")
        @Pattern(regexp = "^\\d{4}-\\d{2}-\\d{2}$", message = "行驶证注册时间格式不正确")
        private String vehicleLicenseRegisterTime;

        @Schema(description = "行驶证证有效期", example = "yyyy-MM")
        @NotBlank(message = "行驶证证有效期不能为空")
        @Pattern(regexp = "^\\d{4}-\\d{2}$", message = "行驶证证有效期格式不正确")
        private String vehicleLicenseExpireTime;

        @Schema(description = "行驶证发证机关")
        @NotBlank(message = "行驶证发证机关不能为空")
        private String vehicleLicenseIssuingAuthority;

        @Schema(description = "行驶证发证时间", example = "yyyy-MM-dd")
        @NotBlank(message = "行驶证发证时间不能为空")
        @Pattern(regexp = "^\\d{4}-\\d{2}-\\d{2}$", message = "行驶证发证时间格式不正确")
        private String vehicleLicenseIssuingTime;

        @Schema(description = "道路运输许可证件号")
        private String roadTransportLicense;

        @Schema(description = "道路运输许可证图片", example = "https://xx/yy.png")
        private String roadTransportLicenseImg;

        @Schema(description = "道路运输许可年检页图片", example = "https://xx/yy.png")
        private String roadTransportLicenseAnnualInspectionImg;

        @Schema(description = "道路运输许可证有效期", example = "yyyy-MM-dd")
        @Pattern(regexp = "^\\d{4}-\\d{2}-\\d{2}$", message = "道路运输许可证有效期格式不正确")
        private String roadTransportLicenseExpireTime;

        @Schema(description = "道路运输经营许可证")
        private String roadTransportBusinessLicense;

        @Schema(description = "挂车牌照号")
        private String trailerLicenseNumber;

        @Schema(description = "挂车正副本图片", example = "https://xx/yy.png")
        private String trailerLicenseImg;

        @Schema(description = "人车合照", example = "https://xx/yy.png")
        private String groupPhotoImg;

        @Schema(description = "总质量(吨)", example = "48.87")
        @NotNull(message = "总质量不能为空")
        private BigDecimal totalMass;

        @Schema(description = "核定载质量(吨)", example = "40")
        @NotNull(message = "核定载质量不能为空")
        private BigDecimal approvedLoad;

        @Schema(description = "整备质量(吨)", example = "8.87")
        private BigDecimal curbWeight;

        @Schema(description = "外廓尺寸", example = "6820X2500X3540mm")
        private String overallDimensions;

        @Schema(description = "使用性质")
        @NotBlank(message = "使用性质不能为空")
        private String useNature;

        @Schema(description = "统一社会信用代码/身份证号")
        private String creditCode;

        @Schema(description = "车辆所有人")
        @NotBlank(message = "车辆所有人不能为空")
        private String vehicleOwner;

        @Schema(description = "车辆所有人有效期", example = "yyyy-MM-dd")
        @Pattern(regexp = "^\\d{4}-\\d{2}-\\d{2}$", message = "车辆所有人有效期格式不正确")
        private String vehicleOwnerExpireTime;

    }

    @Setter
    @Getter
    @Accessors(chain = true)
    @Schema(description = "车辆自有认证信息")
    public class ApiVehicleOwnerAuthDomain {

        @Schema(name = "所有人ID")
        @NotBlank(message = "所有人ID不能为空")
        private String ownerId;

        @Schema(name = "挂靠协议")
        private List<String> affiliationAgreement;

        @Schema(name = "购车合同")
        private List<String> purchaseContract;

        @Schema(description = "机动车登记证")
        private List<String> registrationCertificate;

        @Schema(description = "所有权材料")
        private List<String> ownershipMaterial;

    }

}

返回参数 ​

参数名类型层级说明备注
codeint1状态码
msgString1请求结果
totalint1返回总条数
requestIdString1请求编号
dataObject1返回数据
idString2业务数据ID

反参示例 ​

json
{
  "code": 200,
  "data": {
    "id": "131321321"
  },
  "msg": "业务处理成功",
  "total": null,
  "requestId": "1eb7cb0e"
}

反参对象 ​

java

@Setter
@Getter
@Schema(description = "创建车辆")
public class ApiConsignorVehicleCreateRes {

    @Schema(description = "业务数据ID")
    private String id;

}

车牌颜色:

NameMessage
BLUE蓝色
YELLOW黄色
GREEN绿色

车型:

NameMessage
HEAVY_SEMI_TRAILER重型半挂牵引车
SMALL_CAR小型轿车
SMALL_ORDINARY小型普通客车
HEAVY_DUMP_TRUCK重型自卸货车
HEAVY_BARN_TYPE_SEMI_TRAILER重型仓栅式半挂车
HEAVY_ORDINARY_TRUCK重型普通货车
HEAVY_TRAILER重型全挂牵引车
HEAVY_GENERAL_SEMI_TRAILER重型普通半挂车
LARGE_UNLOADED_WORK_CAR大型非载货专项作业车
MEDIUM_DUMP_TRUCK中型自卸货车
LIGHT_WAREHOUSE_GRID_TRUCK轻型仓栅式货车
LIGHT_TRAILER轻型全挂牵引车
MINIVAN小型面包车
HEAVY_SILO_TRUCK重型仓栅式货车
VAN轻型厢式货车
HEAVY_FLAT_DUMP_TRUCK重型平板自卸车
HEAVY_VAN重型厢式货车
HEAVY_BOX_TRUCK重型箱式货车
LIGHT_ORDINARY_TRUCK轻型普通货车
HEAVY_SPECIAL_STRUCTURE_TRUCK重型特殊结构货车
HEAVY_FENDER_TRUCK重型栏板货车
HEAVY_FENDER_SEMI_TRAILER重型栏板半挂车
HEAVY_FLAT_TRUCK重型平板货车
MEDIUM_WAREHOUSE_GRID_TRUCK中型仓栅式货车
MEDIUM_VAN中型厢式货车
HEAVY_TANK_TRUCK重型罐式货车
HEAVY_CONTAINER_TRUCK重型集装箱车
MEDIUM_ORDINARY_TRUCK中型普通货车
HEAVY_TRANSPORT_TRUCK重型车辆运输车
MEDIUM_FENDER_TRUCK中型栏板货车
HEAVY_KEY_DUMP_TRUCK重型键式自卸货车
OTHER其它

车辆能源类型:

NameMessage
A汽油
B柴油
C电
D混合油
E天然气
F液化石油气
L甲醇
M乙醇
N太阳能
O混合动力
Y无
Z其他