This API should be called on the server side and cannot be called directly on the client side (Mini Program, web page, APP, etc.). For details, please refer to API Call Guide.
API English Name: setPreviewSetting
Set the number of preview words for book chapters.
1. Call Method
HTTPS Call
POST https://api.weixin.qq.com/wxa/business/novelreader/setpreviewsetting?access_token=ACCESS_TOKEN
Cloud Call
- This API does not support cloud call.
Third-party Call
-
This API supports third-party platforms on behalf of Merchant call.
-
The permission set ID of this API is: 169
-
After the service provider obtains one of the permission set authorizations, it can use authorizer_access_token to call on behalf of Merchant, for details please refer to Third-party Call documentation.
2. Request Parameters
Query Parameters Query String Parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| access_token | string | Yes | ACCESS_TOKEN | API call credential, you can use access_token, authorizer_access_token |
Request Body Request Payload
| Parameter | Type | Required | Description |
|---|---|---|---|
| book_id | string | Yes | Work ID |
| default_words | number | Yes | Default preview word count |
| chapter_index | number | No | Chapter index, starting from 0. Chapters without a specific setting will use default_words as the preview word count. |
| words | number | No | Chapter word count |
3. Response Parameters
Response Body Response Payload
| Parameter | Type | Description |
|---|---|---|
| errcode | number | Error code |
4. Notes
No special notes for this API
5. Code Example
Request Example
{
"setting": {
"book_id": "test",
"default_words": 240,
"chapter_setting": [
{
"chapter_index": 1,
"words": 123
}
]
}
}
Response Example
{
"errcode": 0
}
6. Error Codes
The following is the error code list of this API, other error codes can refer to Common Error Codes; When encountering errors in calling the API, you can use the official API Diagnostic Tool to assist in locating and analyzing problems.
| Error Code | Error Description |
|---|---|
| -1 | System failure |
| 0 | Success |
| 10140001 | Invalid parameter |
| 10140002 | Please use UTF-8 encoding |
| 10140003 | Invalid work title |
| 10140004 | Invalid work description |
| 10140005 | Invalid cover image |
| 10140006 | Invalid author |
| 10140007 | Invalid work type |
| 10140008 | Invalid completion status |
| 10140009 | Invalid upload scenario |
| 10140010 | Invalid chapter index list. Please check for duplicates or uncovered chapters. |
| 10140011 | Invalid chapter ID list. Please check for duplicates, chapter IDs not belonging to this work, or uncovered chapters. |
| 10140012 | Invalid volume list. Please check if volume titles are standard, and if ranges overlap or fail to cover all chapters. |
| 10140013 | Missing chapter information |
| 10140014 | Too much chapter information |
| 10140015 | Missing work ID |
| 10140016 | Too many work IDs |
| 10140017 | Invalid maximum pagination result count |
| 10140018 | Invalid chapter title |
| 10140019 | Invalid chapter content |
| 10140020 | Invalid sort operation |
| 10140021 | Invalid chapter sorting method |
| 10140022 | Missing chapter seq |
| 10140023 | Duplicate provider primary key exists in the request parameters |
| 10140024 | Invalid provider primary key |
| 10140025 | Invalid priority |
| 10140026 | Invalid custom information |
| 10141001 | Corresponding information not found |
| 10141002 | Operation not allowed |
| 10141003 | Work is under review |
| 10141004 | Failed to add review information |
| 10141005 | Too many failed checks |
| 10141006 | Work has not passed review and cannot be published |
| 10141007 | Work is missing chapters |
| 10141008 | Work volume information needs to be updated |
| 10141009 | Provider primary key conflict |
| 10141010 | This API is incompatible with the current work's chapter sorting method. Please modify the chapter sorting method before making this call. |
| 10145001 | Operation result is empty |
| 10145002 | System call failed |
| 10145003 | Missing input parameters |
| 10145004 | Invalid authorized work ID |
| 10145005 | Authorizer is not in the Novel category |
| 10145006 | Authorizee is not in the Novel category |
| 10145007 | Expired time information or abnormal authorization time |
| 10145008 | Too many or too few works submitted for authorization at once (count = 0 or count > 20) |
| 10145009 | Too many records fetched in one authorization list query (count > 100) |
| 10145010 | Some authorization records failed to be added |
| 10145011 | Invalid AppID |
| 10145012 | Authorizer and authorizee cannot be the same |
7. Applicable Scope
The callable account types for this API are not yet clear, or are determined by the calling parameters in business. Please refer to the actual calling situation.