---
title: Complete Contract
slug: v2-apis/complete-contract
description: Learn how to complete a contract using an API. Discover how the client can conveniently finalize the contract at any desired moment. Ensure a secure process by logging in and passing the received access token as the authorization header in the request. Th
createdAt: 2023-02-28T10:32:10.000Z
---

## Introduction

Client can choose to complete the contract at any point of time after creating the contract.&#x20;
Sequential Signing: Atleast one of the signer must have completed the signing process.
Parallel Signing: Atleast one of the mandatory signers must have completed the signing process.

## How to call the API

You will need to log in before sending the request. You are required to pass the access token received from the login call, as the authorization header in the request.

## API Input Guidelines

Need to pass follow information

### Sample Curl

::::Tabs
:::Tab{title="Preproduction"}
```curl
curl --location --request POST 'https://contracting-preproduction.signzy.tech/api/contractdetails/completeContract' \
--header 'Content-Type: application/json' \
--header 'Authorization: <auth-token>' \
--data-raw '{
    "customerId": "..customer-id..",
    "contractId": "..contract-id.."
}'
```
:::

:::Tab{title="Production"}
```curl
curl --location --request POST 'https://contracting.signzy.tech/api/contractdetails/completeContract' \
--header 'Content-Type: application/json' \
--header 'Authorization: <auth-token>' \
--data-raw '{
    "customerId": "..customer-id..",
    "contractId": "..contract-id.."
}'
```
:::
::::

### Input Parameters

| **PARAMETERS** | **DESCRIPTION**           | **REQUIRED/OPTIONAL** |
| -------------- | ------------------------- | --------------------- |
| contractId     | Unique Id of the contract | Required              |
| customerId     | Unique Id of the customer | Required              |

### Sample Response

:::CodeblockTabs
```json
{
    "status": "SUCCESS",
    "statusCode": "000",
    "message": "Contract Successfully completed"
}
```

```json
{
    "status": "FAIL",
    "statusCode": 101,
    "message": "Contract is already completed"
}
```

```json
{
    "status": "FAIL",
    "statusCode": 101,
    "message": "No signer has completed signing, minimum one signature is needed."
}
```
:::

### Response Parameter

| **PARAMETERS** | **DESCRIPTION**                           |
| -------------- | ----------------------------------------- |
| status         | Status of the api - SUCCESS/FAIL          |
| statusCode     | StatusCode of the API - 000 / 101 / 102   |
| message        | Message describing the status of the api. |

## Sample Error

:::CodeblockTabs
400

```json
{
    "type": "Error",
    "status": 400,
    "message": "Invalid Customer Id",
    "statusCode": 400
}
```

400

```json
{
    "type": "Error",
    "status": 400,
    "message": "Invalid Contract Id",
    "statusCode": 400
}
```

401

```json
{
    "type": "Error",
    "status": 401,
    "message": "Authorization failed",
    "statusCode": 401
}
```

500

```json
{
    "error": {
        "name": "Error",
        "message": "Internal Server Error",
        "statusCode": 500
    }
}
```
:::

### Error Parameter

| **PARAMETER NAME** | **DESCRIPTION**                 |
| ------------------ | ------------------------------- |
| statusCode         | Request Status code from Signzy |
| status             | status of the api               |
| name               | the name of the error           |
| message            | the error message               |
| type               | type of the error               |

### Error Codes

| **CODE** | **DESCRIPTION**       | **INTERPRETATION**                                                   |
| -------- | --------------------- | -------------------------------------------------------------------- |
| 400      | Bad Request           | Input Parameter has a missing required parameter or not a valid one. |
| 401      | Authorization Failed  | Authorization token is invalid.                                      |
| 500      | Internal Server Error | Internal error at Signzy, please contact support.                    |





:::hint{type="info"}
### Getting help

Please feel free to contact us if you have any questions, require clarification, or have ideas for how to make the documents or any of our services better.


You can reach out to us at [help@signzy.com](#).
:::

