Request
Basic information
| Field | Value |
|---|---|
| HTTP URL | https://api.dingtalk.io/v1.0/notable/bases/{baseId}/sheets/{sheetIdOrName}/records |
| HTTP Method | POST |
| Supported app type | appType-Internal app |
| Permissions | permission-Notable.Base.Write.All-Write permission for the AI Table app |
Request headers
| Name | Type | Required | Description |
|---|---|---|---|
| x-acs-dingtalk-access-token | String | Yes | The access credential for calling this API. Call the Get the access token of an internal app API to obtain it. |
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
| baseId | String | Yes | The ID of the AI Table. For how to obtain it, see Data structure. |
| sheetIdOrName | String | Yes | The table ID or table name. You can obtain the table ID in either of the following ways: - Call the Get all tables API. - Call the Get a table API. |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
| operatorId | String | Yes | The unionId of the operator. Obtain it in either of the following ways: - Call the Query user details API. - Call the Obtain user information by silent login code API. |
| clientToken | String | No | A standard UUID v4 string used for idempotency control. - Empty: Initiates a new request. - Non-empty: Performs an idempotent update. Repeated requests with the same value are not executed multiple times. |
Request body
| Name | Type | Required | Description |
|---|---|---|---|
| records | Array | Yes | The record data to be inserted. |
| fields | Map<String, Any> | Yes | The field values of the record, in the Map<String, Any> format: - key: The field name (String type), corresponding to the field name in the table. - value: The field value (Any type). Pass a value in the appropriate format based on the field type. For details about the field value format, see Record value format. |
| Any | No | The field value. The format varies depending on the field type. For details, see Record value format. |
Request example
HTTPResponse
Response body
| Name | Type | Description |
|---|---|---|
| value | Array | The list of IDs of records that were successfully inserted. |
| id | String | The record ID. |
Response body example
Error codes
If an error occurs when you call this API, look up the solution in the Global error codes document based on the error message.| HttpCode | Error code | Error message | Description |
|---|---|---|---|
| 400 | invalidRequest.inputArgs.invalid | %s | Invalid request parameter. See the error message for details. |
| 400 | invalidRequest.document.stillInitializing | The document is under initialization. Please try again later | The document is being initialized. Try again later. |
| 400 | invalidRequest.document.broken | The document is broken and the server is unable to complete your request. | The document is damaged. |
| 403 | forbidden.operationIllegal | %s | No permission. |
| 403 | invalidRequest.document.typeIllegal | %s | Unsupported document type. Check the baseId. |
| 404 | invalidRequest.document.notFound | Fail to find the requested resource by the given baseId. Please make sure the given baseId is valid, and the operatorId has permission to access it. | The document does not exist. |
| 404 | invalidRequest.resource.notFound | %s | The resource does not exist. The data does not exist or has been permanently deleted. |
| 409 | invalidRequest.duplicateClientToken | Duplicate ClientToken detected. Please generate a new client token and retry. | Duplicate idempotency key. Generate a new idempotency key and try again. |
| 500 | internalError | The server encountered an internal error and was unable to complete your request. Please try again later. | System error. |
| 500 | unknownError | Unknown Error | Unknown error. |
| 504 | service.timeout | The server is busy and unable to complete your request. Please try again later. | Request timed out. |