# Submit Release/Rework/Scrap decision for an inspection (/docs/api-reference/quality/QualityController_submitDecision)

`POST /api/factories/{factoryId}/quality/inspections/{id}/decision`

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 | Inspection Record ID |

## Request body

Required.

Content type: `application/json`

```json
{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "description": "Disposition type for the affected quantity.",
      "enum": [
        "release",
        "rework",
        "scrap"
      ],
      "example": "scrap"
    },
    "quantity": {
      "type": "number",
      "description": "Quantity affected by the decision (parts).",
      "example": 12
    },
    "scrapReasonCodeId": {
      "type": "string",
      "description": "Scrap reason code id (required when type is \"scrap\").",
      "example": "a1b2c3d4-1111-2222-3333-444455556666"
    },
    "scrapReasonDescription": {
      "type": "string",
      "description": "Free-text description of the scrap reason.",
      "example": "Material inclusion detected on cavity 3."
    },
    "dispositionBy": {
      "type": "string",
      "description": "User id making the disposition.",
      "example": "a1b2c3d4-1111-2222-3333-444455556666"
    }
  },
  "required": [
    "type",
    "quantity"
  ]
}
```

## Responses

### 201: Decision submitted