`PUT /entities/items/{item_id}/labels/{language_code}`
`PUT /entities/items/{item_id}/description/{language_code}`
Request Payload (label)
```
{
label: LABEL-TEXT
(optional) comment: Edit comment
(optional) tags: Edit tags (array/list)
(optional) bot: true/false
}
```
Request Payload (description)
```
{
description: DESCRIPTION-TEXT
(optional) comment: Edit comment
(optional) tags: Edit tags (array/list)
(optional) bot: true/false
}
```
The respective successful responses should present the relevant data as a string -- similar to the responses of `GET /entities/items/{item_id}/labels/{language_code}`, and `GET /entities/items/{item_id}/descriptions/{language_code}` respectively.
The automated summaries for the edits made should be generated as described:
- if the label in the given language is created (has not been defined before the API request): `/* wbsetlabel-add:1|{language_code} */ LABEL-TEXT`
- if the label in the given language is replaced/updated (has been defined before the API request): `/* wbsetlabel-set:1|{language_code} */ LABEL-TEXT`
- if the description in the given language is created (has not been defined before the API request): `/* wbsetdescription-add:1|{language_code} */ DESCRIPTION-TEXT`
- if the description in the given language is replaced/updated (has been defined before the API request): `/* wbsetdescription-set:1|{language_code} */ DESCRIPTION-TEXT`
Error cases to consider:
- if {item_id} does not exist, the API should generate a 404 response `{ "code": "item-not-found", "message": "Could not find an item with the ID: {item_id}" }`
- if {item_id} is not a valid item ID, the API should generate a 400 response `{ "code": "invalid-item-id", "message": "Not a valid item ID: {item_id}"} `
- if {language_code} is not a valid language code, the API should generate a 400 response `{ "code": "invalid-language-code", "message": "Not a valid language code: {language_code}"} `
- if {item_id} is a redirect, the API should generate a 409 response `{ "code": "redirected-item", "message": "Item {item_id} has been merged into {other_id}." }`
- if the provided label/description is invalid (in the sense of Wikibase label/description validation logic) the API should generated 400 response { "code": "invalid-label, "message": "Not a valid label: {label-text}." }`, or { "code": "invalid-description, "message": "Not a valid description: {description-text}." }`
- If an invalid Mediawiki edit tag is provided, the API should generate a 400 response `{ "code": "invalid-edit-tag", "message": "Invalid MediaWiki tag: {tag}"} `
- If a value for `bot` parameter other than `true` or `false`is provided, Mediawiki REST API framework's error is to be used