---
title: Complete Contract API
slug: api-marketplace/complete-contract-api
description: Learn how to complete a contract seamlessly with the Signzy system using this informative guide. Discover the necessary steps, including having at least one sequential signer and one required parallel signer. Ensure a hassle-free process with the API call
createdAt: 2023-05-26T08:54:27.000Z
---

## Introduction

Client can choose to complete the contract from Signzy system once the contract is signed by atleast one signer in sequential signing and atleast one required signer in parallel signing. Parameters contactId and customerId are used to identify the contract to be completed.&#x20;

## 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:&#x20;
1\. Contract ID
2\. Customer ID

### 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 '{
    "contractId": "..contractId..",
    "customerId": "..customer-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 '{
    "contractId": "..contractId..",
    "customerId": "..customer-id.."
}'
```
:::
::::

### Input Parameters

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

### Sample Response

:::CodeblockTabs
200

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

200

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

200

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

### Response Parameter

| **PARAMETERS** | **DESCRIPTION**                                       |
| -------------- | ----------------------------------------------------- |
| status         | SUCCESS/FAIL depending on the status of the API       |
| statusCode     | status code for the API                               |
| message        | Message containing information about the API's status |

## Sample Error

:::CodeblockTabs
400

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

400

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

404

```json
{
    "type": "Error",
    "status": 404,
    "message": "Contract not found.",
    "statusCode": 404
}
```

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             | the status 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. |
| 404      | Not Found             | The contractId given was not found                                   |
| 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](#).
:::

