---
agentTools:
  projectIndex: https://liveconsent.readme.io/llms.txt
---

# Abandon Request function

This method cancels a live LCS request.<br>API function usage type: <b>HigherLevel</b>

## Additional Notes

Table with values for **request\_status**, **request\_status\_info**, **request\_status\_date** and **description**:

| request\_status | request\_status\_info | request\_status\_date                           | description                                         |
| :-------------- | :-------------------- | :---------------------------------------------- | :-------------------------------------------------- |
| 2               | REQUEST\_DRAFT        | Date of creation                                | Request state is draft                              |
| 3               | REQUEST\_ACCEPTED     | Date of last signature                          | Request document(s) is/are signed                   |
| 4               | REQUEST\_LIVE         | Date when request was live (sent to recipients) | Request is still waiting for one or more signatures |
| 5               | REQUEST\_CANCELED     | Date when the requester cancelled               | Request has been cancelled by requester             |
| 6               | REQUEST\_REJECTED     | Date when the recipient rejected                | Request has been declined by a recipient            |
| 7               | REQUEST\_EXPIRED      | Date of expiry                                  | Request is expired                                  |

## HTTP Request

Request Content-Type: **application/json**

JSON BODY PARAMS - name and value pairs description:

* **request\_id**: LCS request identifier to update; Value of "request\_id" or "unique\_submit\_id". JSON Data Type: **String**
* **request\_id\_type** (optional): Type of LCS identifier for "request\_id" field; Values: "**request\_id**" or "**unique\_submit\_id**"; Default value: "request\_id"; JSON Data Type: **String**
* **send\_notification** (optional): Send notification to all recipients; Value: Boolean (true or false); Default value: false
* **custom\_message** (optional): custom message for all recipients; Value: String (UTF-8 chars)

## Exemples of JSON for Abandon Request

Example of HTTP Request JSON Body data to abandon a request with a custom message for recipients:

```json
{
	"request_id": "02GB0G",
	"request_id_type": "request_id",
	"send_notification": true,
	"custom_message": "This is a custom message for recipients"
}
```

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "LiveConsent",
    "description": "LiveConsent Web Service is a REST based web service which allows access to the LiveConsent platform through LiveConsent API.<br><br>In order to use the LiveConsent API, you must have a valid `API key` obtained from the LiveConsent Support.<br><ol><li></b> Create an account on [https://app.liveconsent.com](https://app.liveconsent.com) and/or [https://demo.liveconsent.com](https://demo.liveconsent.com) (LiveConsent test platform)<br><li>For a developer account validation, please send a request to support@liveconsent.com with the following information:<ul><li><b>email:</b> the email address associated with your LiveConsent account</li><li><b>default_callback_url (optional):</b> a valid https URL for your callback script</li><li><b>application_name (optional):</b> the name of your application; this name will be used for the button that will make a redirection to a specified URL (default_return_url or a custom URL defined for each recipient)</li><li><b>default_return_url (optional):</b> The base URL for the recipient redirection after he signed/rejected the document</li></ul><li>You will receive an API key, associated to your developer account.</ol>",
    "contact": {
      "name": "Support LiveConsent",
      "url": "https://www.liveconsent.com/contact/",
      "email": "support@liveconsent.com"
    },
    "license": {
      "name": "Apache 2.0",
      "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
    },
    "version": "1.8"
  },
  "servers": [
    {
      "url": "https://api.liveconsent.com/LCSWS",
      "description": "LiveConsent API",
      "variables": {}
    }
  ],
  "tags": [
    {
      "name": "Manage Request",
      "description": "Request Opertions"
    }
  ],
  "paths": {
    "/request/abandon": {
      "post": {
        "tags": [
          "Manage Request"
        ],
        "summary": "Abandon Request function",
        "description": "This method cancels a live LCS request.<br>API function usage type: <b>HigherLevel</b>",
        "operationId": "abandonRequest",
        "parameters": [
          {
            "name": "developer_key",
            "in": "header",
            "description": "web service developer key",
            "required": true,
            "schema": {
              "type": "string",
              "default": "your developer_key"
            }
          },
          {
            "name": "authorization_token",
            "in": "header",
            "description": "token from authentication",
            "required": true,
            "schema": {
              "type": "string",
              "default": "your authorization_token"
            }
          }
        ],
        "requestBody": {
          "description": "Abandon Request object",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AbandonRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "OK: The request has succeeded. LCS request has been canceled",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseRequestStatus"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request: the server could not understand the request due to invalid syntax. Request Data Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized: invalid developer_key or authorization_token;",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseUnauthorized"
                }
              }
            }
          },
          "412": {
            "description": "Precondition failed: invalid request status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ResponseError": {
        "type": "object",
        "properties": {
          "return_code": {
            "type": "integer",
            "description": "Error code number",
            "format": "int32",
            "example": 1
          },
          "description": {
            "type": "string",
            "description": "Error description",
            "example": "Error: invalid input data format - invalid structure"
          }
        }
      },
      "ResponseUnauthorized": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "description": "Unauthorized",
            "example": "Unauthorized"
          }
        }
      },
      "ResponseRequestStatus": {
        "type": "object",
        "properties": {
          "request_status": {
            "type": "integer",
            "description": "Request status value",
            "format": "int32",
            "example": 3,
            "enum": [
              2,
              3,
              4,
              5,
              6,
              7
            ]
          },
          "request_status_info": {
            "type": "string",
            "description": "Request status value in human readable form",
            "example": "REQUEST_ACCEPTED",
            "enum": [
              "REQUEST_DRAFT",
              "REQUEST_ACCEPTED",
              "REQUEST_LIVE",
              "REQUEST_CANCELED",
              "REQUEST_REJECTED",
              "REQUEST_EXPIRED"
            ]
          },
          "request_status_date": {
            "type": "string",
            "description": "Date the request status changed",
            "example": "2020-09-23T15:27:08Z"
          }
        }
      },
      "AbandonRequest": {
        "required": [
          "request_id"
        ],
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string",
            "description": "id queried by requester request_id or unique_submit_id",
            "example": "02GB0G"
          },
          "request_id_type": {
            "type": "string",
            "description": "type id queried by requester",
            "example": "request_id",
            "default": "request_id",
            "enum": [
              "request_id",
              "unique_submit_id"
            ]
          },
          "send_notification": {
            "type": "boolean",
            "description": "send notification to all recipients",
            "example": true,
            "default": false,
            "enum": [
              true,
              false
            ]
          },
          "custom_message": {
            "type": "string",
            "description": "custom message for all recipients",
            "example": "This is a custom message for recipients"
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 95,
      "1": 145,
      "2": 111,
      "3": 140,
      "4": 37,
      "5": 235,
      "6": 234,
      "7": 0,
      "8": 97,
      "9": 129,
      "10": 217,
      "11": 11
    }
  }
}
```