Проверка предложения
POST /v1/contributions/{contribution_id}/review
POST /v1/contributions/{contribution_id}/review
Только назначенный подтверждённый сотрудник через сессию кабинета. Принятие требует новой успешной строгой проверки, неизменной канонической идентичности реакции и явных source_verified, license_verified и quality_approved. Публикация принятой записи и допустимый бонус выполняются атомарно и идемпотентно. Обычные владельцы и администраторы, API-ключи и внешние MCP-клиенты не могут утверждать предложения.
Доступ
Требуется bearer-авторизация. Описание операции задаёт дополнительные права, роли и ограничения для сессий кабинета. Сам по себе API-ключ их не предоставляет.
Параметры
| Поле | Тип | Обязательно | Описание |
|---|---|---|---|
contribution_id (path) | string | да |
Тело запроса
| Поле | Тип | Обязательно | Описание |
|---|---|---|---|
decision | "accepted" ∣ "rejected" ∣ "needs_review" | да | |
rationale | string | да | |
idempotency_key | string | да | |
source_verified | boolean ∣ null | нет | |
license_verified | boolean ∣ null | нет | |
quality_approved | boolean ∣ null | нет |
Полная схема: ContributionReview
{
"properties": {
"decision": {
"type": "string",
"enum": [
"accepted",
"rejected",
"needs_review"
],
"title": "Decision"
},
"rationale": {
"type": "string",
"maxLength": 2000,
"minLength": 10,
"title": "Rationale"
},
"idempotency_key": {
"type": "string",
"maxLength": 128,
"minLength": 8,
"pattern": "^[A-Za-z0-9_.:-]+$",
"title": "Idempotency Key"
},
"source_verified": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "Source Verified"
},
"license_verified": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "License Verified"
},
"quality_approved": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "Quality Approved"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"decision",
"rationale",
"idempotency_key"
],
"title": "ContributionReview"
}Ответы
| HTTP | Описание | Тип |
|---|---|---|
| 200 | Успешный ответ | application/json: ReactionContribution |
| 401 | Требуется авторизация | application/problem+json: ProblemDetails |
| 403 | Доступ запрещён | application/problem+json: ProblemDetails |
| 404 | Не найдено | application/problem+json: ProblemDetails |
| 409 | Конфликт | application/problem+json: ProblemDetails |
| 413 | Превышен размер запроса | application/problem+json: ProblemDetails |
| 422 | Ошибка входных данных | application/problem+json: ProblemDetails |
| 429 | Превышен лимит | application/problem+json: ProblemDetails |
| 502 | Ошибка шлюза | application/problem+json: ProblemDetails |
| 503 | Сервис недоступен | application/problem+json: ProblemDetails |
Ответ: ReactionContribution
| Поле | Тип | Обязательно | Описание |
|---|---|---|---|
id | string | да | |
observation_id | string | да | |
reaction_smiles | string | да | |
canonical_reaction_smiles | string ∣ null | да | |
source | ContributionSource | да | |
conditions | ContributionConditions ∣ null | нет | |
summary | string ∣ null | нет | |
state | "pending" ∣ "needs_review" ∣ "accepted" ∣ "rejected" ∣ "duplicate" | да | |
created_at | string | да | |
updated_at | string | да | |
validation | ContributionValidation | да | |
rewards | ContributionRewards | да | |
review | ReviewedDecision ∣ null | нет | |
duplicate_of | string ∣ null | нет |
Полная схема
{
"properties": {
"id": {
"type": "string",
"title": "Id"
},
"observation_id": {
"type": "string",
"title": "Observation Id"
},
"reaction_smiles": {
"type": "string",
"title": "Reaction Smiles"
},
"canonical_reaction_smiles": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Canonical Reaction Smiles"
},
"source": {
"$ref": "#/components/schemas/ContributionSource"
},
"conditions": {
"anyOf": [
{
"$ref": "#/components/schemas/ContributionConditions"
},
{
"type": "null"
}
]
},
"summary": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Summary"
},
"state": {
"type": "string",
"enum": [
"pending",
"needs_review",
"accepted",
"rejected",
"duplicate"
],
"title": "State"
},
"created_at": {
"type": "string",
"title": "Created At"
},
"updated_at": {
"type": "string",
"title": "Updated At"
},
"validation": {
"$ref": "#/components/schemas/ContributionValidation"
},
"rewards": {
"$ref": "#/components/schemas/ContributionRewards"
},
"review": {
"anyOf": [
{
"$ref": "#/components/schemas/ReviewedDecision"
},
{
"type": "null"
}
]
},
"duplicate_of": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Duplicate Of"
}
},
"additionalProperties": true,
"type": "object",
"required": [
"id",
"observation_id",
"reaction_smiles",
"canonical_reaction_smiles",
"source",
"state",
"created_at",
"updated_at",
"validation",
"rewards"
],
"title": "ReactionContribution"
}Эта страница генерируется из OpenAPI. Примеры показывают схемы, а не вымышленные успешные ответы.