# Update an inspection batch (/docs/api-reference/quality/QualityController_updateBatch)

`PATCH /api/factories/{factoryId}/quality/batches/{id}`

Base URL: https://api.xentr.ai

Authentication: bearer token (`Authorization: Bearer <token>`).

## Parameters

| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `factoryId` | path | yes | string | Factory ID |
| `id` | path | yes | string | Batch ID |

## Request body

Required.

Content type: `application/json`

```json
{
  "type": "object",
  "properties": {
    "goodQty": {
      "type": "number",
      "description": "Updated good qty."
    },
    "rejectedQty": {
      "type": "number",
      "description": "Updated rejected qty."
    },
    "executedBy": {
      "type": "string",
      "description": "Updated executor id."
    },
    "executedAt": {
      "type": "string",
      "description": "Updated execution time."
    },
    "status": {
      "type": "string",
      "description": "Status.",
      "enum": [
        "submitted",
        "approved",
        "rejected"
      ]
    },
    "notes": {
      "type": "string",
      "description": "Notes."
    }
  }
}
```

## Responses

### 200