API 向导 (1.0.0)

Download OpenAPI specification:Download

Records API

记录的增删改查接口

获取记录列表

Authorizations:
BearerAuth
path Parameters
objectName
required
string
Example: contracts

对象API名称

query Parameters
filters
string
Example: filters=[["amount", ">", 100000]]

过滤条件

fields
string
Example: fields=["name", "amount", "created"]

字段名

sort
string
Example: sort=created desc

排序,多个用逗号隔开

top
integer
Example: top=10

获取条数,最多5000

skip
integer
Example: skip=1

跳过条数

header Parameters
Authorization
required
string
Example: Bearer apikey,${apikey}

身份验证

Responses

Response samples

Content type
application/json
{
  • "status": 0,
  • "msg": "",
  • "data": {
    }
}

新增一条记录

Authorizations:
BearerAuth
path Parameters
objectName
required
string
Example: contracts

对象API名称

header Parameters
Authorization
required
string
Example: Bearer apikey,${apikey}

身份验证

Request Body schema: application/json
doc
required
object

记录内容

Responses

Request samples

Content type
application/json
{
  • "is_bidding": "已询价比价",
  • "amount": 500000,
  • "amount_type": "immobilization",
  • "collection": true,
  • "company_id": "ziAGMt53otTKj4iRt",
  • "contract_fulfillment_state": "toperformthe",
  • "contract_object": "超能城市广场灯光工程设计、调试、安装等。\n",
  • "currency_type": "63884b0e7afcfb99c989be03_6261092232cc250032e1a973",
  • "end_date": "2022-08-16T00:00:00.000Z",
  • "name": "test",
  • "othercompany": [
    ],
  • "payment": false,
  • "receive_payment_type": "single_use",
  • "signed_date": "2022-07-18T00:00:00.000Z",
  • "start_date": "2022-03-18T00:00:00.000Z",
  • "subject": "就超能城市广场灯光工程设计、指定设备、型号及数量相关事宜签订的合同约定。",
  • "space": "63884b0e7afcfb99c989be03",
  • "created": "2022-12-01T06:34:56.658Z",
  • "modified": "2022-12-01T06:34:56.658Z",
  • "created_by": "63884b0e7afcfb99c989be04",
  • "modified_by": "63884b0e7afcfb99c989be04",
  • "no": "HT-2021-0005",
  • "contract_type": "63884b0e7afcfb99c989be03_62623e9d87e5c50032d9bdbb",
  • "contract_action_type": "新增",
  • "applicant_organization": "63884b0e7afcfb99c989be03_6jJafbSSHxnCuvhEM",
  • "cash_flow_type": "receive",
  • "approving_invoice_amount": 0,
  • "approving_paid_amount": 0,
  • "project": "62620e5787e5c50032d9bd39",
  • "locked": true,
  • "amount_capital": "伍拾万元整",
  • "amount_description": "",
  • "remark": "",
  • "is_valid": "valid"
}

Response samples

Content type
application/json
{
  • "status": 0,
  • "msg": "",
  • "data": {
    }
}

查询记录列表

Authorizations:
BearerAuth
path Parameters
objectName
required
string
Example: contracts

对象API名称

header Parameters
Authorization
required
string
Example: Bearer apikey,${apikey}

身份验证

Request Body schema: application/json
filters
Array of strings (过滤条件) [ items ]

如:[["amount", ">", 100000]]

fields
Array of strings (字段名)

如:["name", "amount", "created"]

sort
string (排序)

如:created desc,多个用逗号隔开

top
integer (获取条数)

最多5000

skip
integer (跳过条数)

Responses

Request samples

Content type
application/json
{
  • "filters": [
    ],
  • "fields": [
    ],
  • "sort": "created desc",
  • "top": 10,
  • "skip": 1
}

Response samples

Content type
application/json
{
  • "status": 0,
  • "msg": "",
  • "data": {
    }
}

获取单条记录

Authorizations:
BearerAuth
path Parameters
objectName
required
string
Example: contracts

对象API名称

id
required
string
Example: 626240ac87e5c50032d9bdc1

记录id

query Parameters
fields
string
Example: fields=["name", "amount", "created"]

字段名

header Parameters
Authorization
required
string
Example: Bearer apikey,${apikey}

身份验证

Responses

Response samples

Content type
application/json
{
  • "status": 0,
  • "msg": "",
  • "data": {
    }
}

更新一条记录

Authorizations:
BearerAuth
path Parameters
objectName
required
string
Example: contracts

对象API名称

id
required
string
Example: 63884b0e7afcfb99c989be03_6262243287e5c50032d9bda5

记录id

header Parameters
Authorization
required
string
Example: Bearer apikey,${apikey}

身份验证

Request Body schema: application/json
doc
required
object

更新的内容

Responses

Request samples

Content type
application/json
{
  • "doc": {
    }
}

Response samples

Content type
application/json
{
  • "status": 0,
  • "msg": "",
  • "data": {
    }
}

删除一条记录

Authorizations:
BearerAuth
path Parameters
objectName
required
string
Example: contracts

对象API名称

id
required
string
Example: 5e7d1b9b9c9d4400001d1b9b

记录id

header Parameters
Authorization
required
string
Example: Bearer apikey,${apikey}

身份验证

Responses

Response samples

Content type
application/json
{
  • "status": 0,
  • "msg": "",
  • "data": {
    }
}

下载附件

Authorizations:
BearerAuth
path Parameters
fileId
required
string
Example: 650cede7157c5a3dfb79ab21

附件id

header Parameters
Authorization
required
string
Example: Bearer apikey,${apikey}

身份验证

Responses

Response samples

Content type
application/json
{
  • "status": "string",
  • "message": "string"
}

上传附件

Authorizations:
BearerAuth
Request Body schema: multipart/form-data
file
required
string <binary>

Responses

Response samples

Content type
application/json
{
  • "_id": "650d09cd9da18d458c2f61f4",
  • "original": {
    },
  • "metadata": {
    },
  • "uploadedAt": "2023-09-22T03:28:13.147Z",
  • "copies": {
    }
}