---
title: Generate Contract Query API
slug: contract360/generate-contract-query-api
createdAt: 2024-02-28T04:37:32.306Z
---

# Introduction

Welcome to the Generate Contract Query API! It's your go-to tool for quickly searching through databases using unique reference IDs generated by the Generate Contract API. We're all about making it easy to find contract-related info by using a special UUID code (uniquereferenceId) given by clients for each request. It has to be 36 characters long.&#x20;

Key Features:

1. Quick Searches: Find what you need fast by searching with uniquereferenceId for relevant data.
2. Easy Integration: Connect smoothly with your current systems using uniquereferenceId for consistent identification in all transactions.
3. Flexible Scalability: Handle all sorts of contract tasks, from individual searches to big data jobs, and grow with your needs.
4. Secure Access: Keep your data safe with strong security measures, ensuring only authorized users can get sensitive info.

Use the Generate Contract Query API to simplify contract management, boost efficiency, and confidently make decisions across finance, legal, and business management areas.

# Authentication

API authentication is a crucial security process that ensures authorized access to an application programming interface (API). It involves validating the identity of users or systems seeking to interact with the API. Please use the `access token` shared with you by your assigned Signzy's CSM. Please set the value of the key `Authorization` in the headers to the `access token`, while making an API call. In this way, Signzy's system will be able to authenticate you and you will be able to make a successful API call.&#x20;

# API Details

The details of the API can be found here.

## Sample cURL

:::CodeblockTabs
Pre Production

```curl
curl --location 'https://api-preproduction.signzy.app/api/v3/contract/generateQuery' \
--header 'Authorization: ********************************' \
--header 'Content-Type: application/json' \
--data '{
    "x-uniqueReferenceId": ""
}'
```

Production

```curl
curl --location 'https://api.signzy.app/api/v3/contract/generateQuery' \
--header 'Authorization: ********************************' \
--header 'Content-Type: application/json' \
--data '{
    "x-uniqueReferenceId": ""
}'
```
:::

## Input Parameters

| **Key**             | **Description**                                                                                                                                                            | **Type** | **Mandatory/Optional** |
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ---------------------- |
| x-uniqueReferenceId | Unique Reference Id of the Generate Contract API <br />36 characters long, UUID number which has to be unique<br />For example, 82541a35-d494-4fbb-97f3-e2323208986e<br /> | String   | Mandatory              |

## Sample Response

:::CodeblockTabs
200

```json
{
    "status": "success",
    "statusDesp": "url generated successfully",
    "url": "",
    "x-uniqueReferenceId": ""
}
```
:::

## Output Parameters

| **Key**             | **Description**                                                                                                                                                      | **Type** |
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| status              | Status of the operation                                                                                                                                              | String   |
| statusDesp          | Description of the status                                                                                                                                            | String   |
| url                 | Generated URL. It can be in URL or Base64 formats depending on the input that was provided in the API call                                                           | String   |
| x-uniqueReferenceId | Unique Reference Id of the Generate Contract API <br />36 characters long, UUID number which has to be unique<br />For example, 82541a35-d494-4fbb-97f3-e2323208986e | String   |

## Sample Errors

:::CodeblockTabs
400

```json
{
    "name": "error",
    "message": "x-uniqueReferenceId length must be 12-32 characters long",
    "reason": "VALIDATION_ERROR",
    "type": "Bad Request",
    "statusCode": 400
}
```

400

```json
{
    "name": "error",
    "message": "x-uniqueReferenceId is not allowed to be empty",
    "reason": "VALIDATION_ERROR",
    "type": "Bad Request",
    "statusCode": 400
}
```

401

```json
{
    "message": "Invalid authentication credentials"
}
```

404

```json
{
    "name": "error",
    "message": "x-uniqueReferenceId Not Found",
    "reason": "Not Found",
    "type": "Not Found",
    "statusCode": 404
}
```

500

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

## Error Parameters

| **Parameter** | **Type** | **Description**                                                            |
| ------------- | -------- | -------------------------------------------------------------------------- |
| name          | String   | In case of errors, it will have the value "error". It represents an error. |
| message       | String   | Message for the error                                                      |
| reason        | String   | Reasons for the error                                                      |
| type          | String   | Type of error                                                              |
| statusCode    | String   | Status code of the error                                                   |

## Error Codes

| **Error Code** | **Error Message**     | **Explanation**                                                    |
| -------------- | --------------------- | ------------------------------------------------------------------ |
| 400            | Bad Request           | Input parameter has a missing required parameter or invalid inputs |
| 401            | Authorization Failed  | Authorization token is invalid                                     |
| 404            | Not Found             | Contract ID eneterd is not found in the database                   |
| 500            | Internal Server Error | Internal error at Signzy, Please reach out to help\@signzy.com     |

