# Calculate contract Nom151 signature

`POST /omni/calculate-contract-nom151-signature`

Base URL: `https://demo-api.incodesmile.com` — Incode demo environment

This api endpoint calculates the Nom151 signature of an already signed contract and returns the signature.

## Path & query parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `api-version` | header | string | yes |  |

## Request body

Content-Type: `application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `includeSignedDocumentInResponse` | boolean |  | Includes the signed document in base64 in response |
| `includeCertificateDetailsInResponse` | boolean |  | Includes the signed document with the Nom 151 signature attached in the pdf in the response |
| `signedContractId` | string | yes | The id of the already signed contract |

## Responses

### 200

OK

Response body (`application/json`):

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `success` | boolean |  | Flag indicating request passed successfully. |
| `sessionStatus` | string |  | Session status Enum: `Alive`, `Closed`, `Deleted` |
| `additionalInformation` | object |  |  |

```json
{
  "success": true,
  "sessionStatus": "Alive",
  "additionalInformation": {
    "signedDocumentNom151": "nom151 signature",
    "signedDocumentBase64": "base64 of signed document",
    "signedDocumentWithNomSignatureBase64": "base64 of signed contract with attached nom151 signature"
  }
}
```

### 400

Bad Request

Response body (`application/json`):

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `timestamp` | integer (int64) |  | UTC timestamp in milliseconds |
| `status` | integer (int32) |  | Custom error code or HTTP status code |
| `error` | string |  | HTTP status error |
| `message` | string |  | Custom error message |
| `path` | string |  | Endpoint path |
| `details` | object |  | Custom error details |
