开放平台

扒书 ERP Open API

合同购书

在学院合同额度内下单购书,价格按合同约定走。

请求方式POST
接口路径/api/college/contract/buy
Content-Typeapplication/json
鉴权X-Nideshop-Token

请求体字段

字段类型必填说明
collegeIdInteger否-

curl 调用

curl -s 'https://www.8shu8.com/api/college/contract/buy' \
  -H 'X-Nideshop-Token: YOUR_LOGIN_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "collegeId": 1
}'

响应示例

{
  "code": 200,
  "message": "操作成功",
  "success": true,
  "data": {
    "id": 1,
    "name": "string",
    "campusCount": 1,
    "contracted": true,
    "mine": true,
    "contractorUserId": 1,
    "contractTime": "string",
    "fee": 0.0
  }
}

返回字段(data)

字段类型说明
idInteger-
nameString-
campusCountLong-
contractedBoolean是否已被承包
mineBoolean当前用户是否承包了这所大学
contractorUserIdLong-
contractTimeLocalDateTime-
feeBigDecimal承包价格,未承包时为应付金额