---
title: "Add a new Test Result to the database"
method: POST
path: "/test-result"
tags: ["testresult"]
---

# Add a new Test Result to the database

`POST /test-result`

## Request

- The document declares no server URL.
- Auth: none declared
- TypeScript: <https://skmtc.dev/dvsa/apis/mobile-examiner-result-service/docs/test-result/post.ts> (a function with typed inputs; its response is checked against the schema)

## Request body

- TestResult
  - `candidateId` string, uuid.v1
  - `faults` DrivingFaults[]
    - `id` string: Id of competency
    - `faultsNo` integer: Number of faults in given competency
    - `isDangerous` boolean
    - `isSerious` boolean

## Response `201`

Test Results has been added with success

## Other responses

- `400`: Missing either candidateId or faults property
- `500`: Problem with saving Test Result in database

---

[API](https://skmtc.dev/dvsa/apis/mobile-examiner-result-service.md) - [All operations](https://skmtc.dev/dvsa/apis/mobile-examiner-result-service/llms.txt) - [OpenAPI document](https://skmtc.dev/dvsa/apis/mobile-examiner-result-service/revisions/c1ac286d7132?raw)
