Request
Basic information
| Field | Value |
|---|---|
| HTTP URL | https://api.dingtalk.io/v1.0/doc/workbooks/{workbookId}/sheets/{sheetId}/ranges/{rangeAddress}/insertDropdownLists |
| HTTP Method | POST |
| Supported app type | appType-Internal app |
| Required permission | permission-Document.Workbook.Write-DingTalk Spreadsheet write permission |
Request headers
| Name | Type | Required | Description |
|---|---|---|---|
| x-acs-dingtalk-access-token | String | Yes | The access credential for calling this API. To obtain it, call the Get the access token of an internal app API. |
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
| workbookId | String | Yes | The Spreadsheet file ID. The nodeId(dentryUuid) returned by the Knowledge Base API is the workbookId of the Spreadsheet. To obtain it, call the Get a node or Create a Knowledge Base document API. |
| sheetId | String | Yes | The worksheet ID or title. To obtain the ID and title, call the Get all worksheets API. |
| rangeAddress | String | Yes | The range address. |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
| operatorId | String | Yes | The unionId of the operator. To obtain it, call the Query user details API. If the operator does not have the required permission, the API returns the error The operator has no permission. |
Request body
| Name | Type | Required | Description |
|---|---|---|---|
| options | Array | Yes | The array of dropdown list options. |
| value | String | Yes | The value of the dropdown list option. |
| color | String | No | The color of the dropdown list option, expressed in hexadecimal notation. For example, #ff0000. |
Request example
HTTPResponse
Response body
| Name | Type | Description |
|---|---|---|
| a1Notation | String | The cell address. |
Response body example
Error codes
If an error occurs when you call this API, refer to the Global error codes documentation based on the error message to find a solution.| HttpCode | Error code | Error message | Description |
|---|---|---|---|
| 400 | invalidRequest.inputArgs.invalid | %s | Invalid request parameter. Refer to the error message for details. |
| 400 | invalidRequest.inputArgs.workbookIdIllegal | The workbookId is illegal. | The workbookId is invalid. |
| 400 | invalidRequest.resource.notWorkbook | %s | Unsupported document type. Check the workbookId. |
| 400 | invalidRequest.document.stillInitializing | The document is still initializing. Please try again later. | The document is still initializing. Try again later. |
| 403 | forbidden.operationIllegal | %s | Invalid request operation. Refer to the error message for details. |
| 403 | forbidden.accessDenied | The operator has no permission. | The current user does not have permission to perform this operation. |
| 403 | forbidden.document.sizeOverLimit | The document size is over limit and the server is unable to complete your request. Retry is unlikely to work unless the document size is decreased. | The Spreadsheet content is too large. Try reducing the content. |
| 403 | forbidden.acrossOrg | %s | Invalid request. Verify that the document you are trying to access belongs to the organization specified by the access token. |
| 404 | invalidRequest.resource.notFound | %s | The request failed because the resource you are trying to access cannot be found. |
| 500 | internalError | The server encountered an internal error and was unable to complete your request. Please try again later. | Internal service error. Try again later. |
| 500 | serviceBusy | The server is busy and unable to complete your request. Please try again later. | The service is busy. Try again later. |