VayuDocumentationIntegrationsAPI ReferenceChange Log
SupportGet started now
API EndpointsContracts

Terminate a contract

Use this endpoint to terminate a contract. Provide a terminationDate in the request body to schedule the termination for a specific date, or omit it to terminate the contract immediately. The contract's status is set to PendingTermination and its end date is updated accordingly.

POST
/contracts/{contractId}/terminate

Authorization

BearerAuthorizer
AuthorizationBearer <token>

In: header

Path Parameters

contractId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

terminationDate?string

The date on which the contract should be terminated. If omitted, the contract is terminated immediately.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/contracts/string/terminate" \  -H "Content-Type: application/json" \  -d '{}'
{  "contractId": "string"}
{  "type": "invalid_request_error",  "code": "string",  "message": "string",  "param": "string",  "params": [    {      "param": "string",      "message": "string"    }  ]}
{  "type": "authentication_error",  "code": "authentication_failed",  "message": "string"}
{  "type": "rate_limit_error",  "code": "rate_limit_exceeded",  "message": "string"}
{  "type": "api_error",  "code": "internal_error",  "message": "string"}