Skip to content

Get a single record

Fetches one record by ID or URL. Supports json, json-ld, and markdown.

This page focuses on response structure and integration notes; full schemas and demos live in the companion folder. Example files are sanitized.

Request example

python
import requests

url = 'https://open.cli.im/api/v2/rpc/record/getRecord'
data = {
    'record_id': 10001,
    'format': 'json'
}
headers = {
    'Authorization': 'Bearer <your API Key>',
    'Content-Type': 'application/json'
}
response = requests.post(url, json=data, headers=headers)
print(response.text)
bash
curl -X POST 'https://open.cli.im/api/v2/rpc/record/getRecord' \
  -H 'Authorization: Bearer <your API Key>' \
  -H 'Content-Type: application/json' \
  -d '{"record_id": 10001, "format": "json"}'

Request parameters

ParameterTypeRequiredDescription
record_idintegerNoRecord ID. Use with record_url: at least one required
record_urlstringNoShort record URL, often full URL starting with record code r. At least one of record_id / record_url
formatstringNoOutput format, default json. Values: json, json-ld, markdown

Output format overview

formatdata.content_typedata.data typeTypical use
jsonapplication/json; charset=utf-8objectParsing, field processing, sync
json-ldapplication/ld+json; charset=utf-8objectSemantic exchange, Schema.org style
markdowntext/markdown; charset=utf-8stringReading, archive export, summarization

Full examples:

Full response skeleton

Skeletons below; large samples use the companion files.

json
{
  "code": 0,
  "message": "ok",
  "data": {
    "format": "json",
    "version": "v1",
    "content_type": "application/json; charset=utf-8",
    "data": {
      "record_id": 10001,
      "record_number": "REC-001",
      "record_code": "record_demo_code_001",
      "record_url": "https://example.com/records/record-demo-001",
      "submit_at": 1773056539,
      "submit_at_iso": "2026-03-09 19:42:19(UTC+08:00)",
      "submit_method": "扫一扫填写",
      "recorder": { "auth_id": 20001, "user_id": 30001, "name": "张**" },
      "project": { "id": 40001, "name": "示例园区", "number": "P001" },
      "qrcode": { "id": 50001, "name": "示例点位A", "type": 0, "type_text": "普通二维码", "template_id": 50010, "qrcode_url": "https://example.com/qrcodes/qrcode-demo-001", "number": "", "category_id": 50020 },
      "org": { "id": 60001, "name": "示例企业", "code": "org_demo_code", "logo_url": "https://example.com/assets/logo-demo.png" },
      "record_template": { "id": 70001, "name": "设备巡检示例", "type": 0, "type_text": "普通表单", "number": "TPL-001" },
      "audit": { "enabled": true, "current_stage_id": 80001, "current_stage_title": "组长审批", "status": 0, "status_text": "待审核", "auditor_name": "李**" },
      "process_status": { "enabled": true, "text": "处理中", "color": "#155EB7" },
      "state_changes": [],
      "tpl_groups": [ { "...": "完整字段结构见示例文件与 schema" } ]
    }
  }
}
json
{
  "code": 0,
  "message": "ok",
  "data": {
    "format": "json-ld",
    "version": "v1",
    "content_type": "application/ld+json; charset=utf-8",
    "data": {
      "@context": "https://schema.org",
      "@type": "CreativeWork",
      "identifier": "record-demo-001",
      "name": "设备巡检示例-REC-001",
      "url": "https://example.com/records/record-demo-001",
      "mainEntity": { "@type": "ItemList", "name": "组件数据" }
    }
  }
}
json
{
  "code": 0,
  "message": "ok",
  "data": {
    "format": "markdown",
    "version": "v1",
    "content_type": "text/markdown; charset=utf-8",
    "data": "---\ntitle: 设备巡检示例-REC-001\nrecord_id: 10001\n...\n---\n\n# 设备巡检示例-REC-001\n\n## 基本信息\n\n**记录编号:** REC-001"
  }
}

Response overview

PathTypeDescription
codeintegerPlatform code; 0 success
messagestringMessage
dataobjectWrapper
data.formatstringActual format (matches request)
data.versionstringContent version, currently v1
data.content_typestringMIME type of business payload
data.dataobject | stringPayload; type depends on data.format

Wrapper example:

json
{
  "format": "json",
  "version": "v1",
  "content_type": "application/json; charset=utf-8",
  "data": { "...": "..." }
}

format=json details

When format=json, data.data is a structured record. Full schema: content-json-v1.schema.json; sample: payload-normal.json.

Record object

FieldTypeDescription
record_idintegerRecord ID
record_numberstringRecord number
record_codestringRecord code, unique in platform
record_urlstringRecord access URL
submit_atintegerSubmitted at (Unix seconds)
submit_at_isostringSubmitted at with timezone
submit_methodstringHow it was submitted
recorderobjectSubmitter
projectobjectProject (partition)
qrcodeobjectQR code
orgobjectOrganization
record_templateobjectForm template
auditobjectApproval info
process_statusobjectProcessing status
state_changesarrayState change list
tpl_groupsarrayGroups and field values

Key nested objects

ObjectKey fieldsDescription
recorderauth_id, user_id, nameSubmitter
projectid, name, numberProject
qrcodeid, name, type, qrcode_urlQR code
orgid, name, code, logo_urlOrg
record_templateid, name, type, numberForm
auditenabled, current_stage_id, statusApproval
process_statusenabled, text, colorProcessing
state_changes[]state, from_state_option, to_state_optionChanges

tpl_groups[]

FieldTypeDescription
group_idintegerGroup ID
group_titlestringTitle; "" if none
show_group_titlebooleanWhether to show title
is_page_break_groupbooleanPage-break marker; fields often empty
fieldsarrayFields in the group

tpl_groups[].fields[]

FieldTypeDescription
field_idintegerField ID
field_titlestringTitle
field_descstringDescription / hint
field_typestringType; drives field_value shape
field_short_namestringShort name
group_idintegerGroup ID
field_valuemixedValue
optionsobjectDisplay options: is_result, is_highlight, is_hidden, is_masked

field_type vs field_value

Names and categories: Form component types overview.

Read field_type first, then parse field_value. Full mapping: content-json-v1.schema.json.

Categoryfield_typefield_value shape
Plain textname, tel, recorder, identity, job_number, text, textarea, date, time, customer_name, customer_mobile, customer_number, carnumberstring
Single choicesex, radioobject with option_text, option_id
Numbernumberobject with value, unit, unit_enabled
Multi choicecheckboxobject with values[]
Checklistchecklistarray of items with item_id, item_title, value
Matrixmatrixobject with columns[]
Dynamic matrixdynamic_matrixobject with rows[]
Located addressaddressobject with address, lat, lng
Manual addressowner_addressobject with province, city, district, street, detail, full_address
Cascadedchained_selectsobject with values[]
Image / signatureimage, signaturearray of media objects
Audioaudioarray with url, size, duration, etc.
Videovideoarray with url, size, duration
Filefilearray with url, size, file_name
Descriptiondescriptionobject with description_html
OCRocr_*object with items[] and image
Subcode edit diffsub_qrcode_edit_diffarray with before_value, after_value

format=json-ld

Semantic Schema.org object. Good for knowledge graphs or systems that need explicit semantics.

Files:

format=markdown

data.data is full Markdown for display, export, or LLM reading.

Files:

Schema and examples

Schema

Full examples

Other conventions

Nulls

CaseRule
Empty fieldfield_value may be null
Missing entityStructure kept; nested fields may be null
Empty stringOften ""
Empty arrayOften []

Masking

CaseDescription
Live APIMasking depends on org permission and output settings
Doc samplesSanitized for structure reference only
options.is_maskedMeans masking is enabled for the component; not a guarantee of masked values in every response

AI image audit fields

Optional ai_audit_result may appear on:

  • image / signature items in field_value[]
  • value.images[] in checklists
  • OCR image
  • media_items[] in subcode edit diff
FieldTypeDescription
ai_audit_result.audit_statusinteger0 default, 1 pass, 2 fail, 3 error, 4 pending
ai_audit_result.audit_status_textstringChinese label for audit_status
ai_audit_result.reasonstringAI reason text

Error response

json
{
  "code": 400,
  "error_code": 100300,
  "message": "System error",
  "message_detail": ""
}
FieldTypeDescription
codeintegerHTTP or platform status
error_codeintegerBusiness error code
messagestringSummary
message_detailstringDetail; may be empty

Full error codes: Error codes.